Rust-Doom: A Doom renderer in Rust, with no unsafe code - <AUTHOR> https://github.com/cristicbz/rust-doom?updated <comment><USER2> In related news, note that Rust 1.4 was just released yesterday: [http://blog.rust-lang.org/2015/10/29/Rust-1.4.html](http://blog.rust- lang.org/2015/10/29/Rust-1.4.html) , which I figure is worth mentioning here as the announcement thread didn't get much traction on HN.

<comment><USER3> Definitely worth mentioning! I completely missed this release. A bit sad too, since it's the first release (since Rust started listing contributors) that I didn't contribute to :'(

<comment><USER2> There's still time to get back on the horse for Rust 1.6. :)

<comment><USER3> I just need to find the time!

</comment></comment></comment></comment><comment><USER4> What's the status of Rust these days? I can see it's hit 1.x, but in practice is it ready for production use? How comprehensive is the standard library, dependency management, etc.?

From a brief glance through the examples it looks pretty functional... is it basically a systems-ish scala?

<comment><USER5> It's pretty stable at this point (1.x means that no backwards compatibility will be lost as in the past), and it's already used in production (e.g. Skylight [0] is written in Rust, as far as I know, and don't forget about Servo).

Dependency management with Cargo is hands down one of the best out there, it just works. The standard library continues to expand, but there are also many other external libraries you can find on crates.io.

> it looks pretty functional... is it basically a systems-ish scala?

I think it's better to compare Rust to ML languages family (OCaml, F#, and so on), as it was clearly influenced by it. It has many features you can find in ML languages - pattern matching, ADTs (algebraic types that are enums in Rust), and many other similarities.

Overall, the language feels very robust now, and I enjoy it much - it's a very decent replacement for C++, basically "C/C++ done right".

[0] [https://www.skylight.io/](https://www.skylight.io/)

<comment><USER6> Scala was also heavily ML influenced and is sometimes considered part of that family, so I think it's fair to relate the two.

<comment><USER2> Rust and Scala may be cousins due to their ML influence, but Rust itself isn't particularly influenced by Scala. In contrast, there are quite a few design decisions in Rust that were lifted directly from OCaml. Calling Rust "C++20 + OCaml" would be a decent categorical starting point.

(Caveat: the lead designer of Rust's type system, Niko Matsakis, has done a fair bit of work with Scala, so there may be subtle influences.)

<comment><USER7> > Rust itself isn't particularly influenced by Scala

Agree! Sadly, they didn't use all the lessons Scala could offer them when designing their own language. :-(

Painful to watch as they introduce stuff where Scala developers already know that it's completely broken.

<comment><USER8> Would you mind expanding on what these things are?

<comment><USER6> The cascade of efforts at error handling, which I think at one point involved a macro and a magic method name, rather than getting on with higher-kinded types to allow them to do it right.

Allowing "return".

Mandating braces for functions and control flow constructs.

Rust iteration, which is both more limited and less safe (laziness) than the scala/ruby style of passing a closure.

<comment><USER2>
      > The cascade of efforts at error handling

You must be referring to ancient Rust with its condition system and such. Modern Rust code just uses Result types.

      > rather than getting on with higher-kinded types to allow
      > them to do it right

Er, no, you don't need HKTs to "do it right", you'd just need HKTs to do it generically. Rust's error handling works fine for specific types; you can even write macros to emulate do-notation (and people have).

      > Allowing "return"

Welcome to the realities of imperative programming. :) Unlike Scala, Rust does not aspire to functional godhood.

      > Mandating braces for functions and control flow constructs

Scope in Rust is very, very important for expressing when references go out of scope and when resources are freed. Leaving scope implicit would be massively frustrating.

      > the scala/ruby style of passing a closure

Rust _had_ internal iterators for years, and the entire `for` construct was based around them. They were removed because they were found wanting.

As I've mentioned in a sibling comment, the lessons that Scala may have learned in its life do not necessarily apply to Rust. They are very, very different languages.

<comment><USER9> I am a Scala developer but I agree with your points. The only thing that just simply drives me mad in Rust is mandatory semicolons. Once you are used to be able to omit them then it gets really annoying to go back using them.

<comment><USER2> I actually agree with this one. :) The usual argument in their favor is that having to explicitly return `()` all the time would get tired in low-level C-alike functions that mostly operate via side effects, but I'm not particularly swayed that we should be optimizing for that use case (but then again I'm also of the opinion that bitwise operators don't deserve their own symbols, so I may already be an enemy of this crowd :P ).

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> Can anyone tell how performant this code is vs original C code? How much do we lose (if anything) by using Rust in comparison to C?

<comment><USER11> In general Rust is fast but slower then C: "Rust is safe indeed but, unfortunately, far from fast. By the moment of writing this article, it is comparable to Java, Go, and Haskell regarding performance" [http://www.viva64.com/en/b/0324/](http://www.viva64.com/en/b/0324/)

<comment><USER12> Please not this again. The article you mentioned is incorrect in many places, and was heavily criticized in various communities.[1][2] It doesn't qualify as a valid criticism. It is rather a badly written static analyzer promotion.

Also, microbenchmarks are usually not very good at representing the real world characteristics. But then again, please look at the current version of the linked benchmark.[3] Rust now positions itself in the second place, thanks to the recent improvements given to the Rust programs used in the benchmarks. I believe Rust isn't as fast as highly optimized C, but I think it is safe to say that Rust is just as fast as C++, and both Rust and C++ are much faster than GC'ed languages such as Java, Haskell, and Go.

Edit: I would even say that if Rust's performance is comparable to GC'ed languages, there's no point in using Rust in the first place. Rust is paying a lot of complexity to achieve memory safety without relying on garbage collection.

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

[2] [https://www.reddit.com/r/cpp/comments/35pn6h/criticizing_the...](https://www.reddit.com/r/cpp/comments/35pn6h/criticizing_the_rust_language_and_why_cc_will/cr6o9tz)

[3] [http://benchmarksgame.alioth.debian.org/u64q/which- programs-...](http://benchmarksgame.alioth.debian.org/u64q/which-programs-are- fastest.html)

<comment><USER13> > Edit: I would even say that if Rust's performance is comparable to GC'ed > languages, there's no point in using Rust in the first place. Rust is paying > a lot of complexity to achieve memory safety without relying on garbage > collection.

Rust has a lot of nice safety features not related to memory management that I'd love to see even in a language with GC. On top of the obvious lack of data races, linear types and borrowing are great for ensuring other kinds of sanity like preventing you from mutating a collection while you iterate over it.

<comment><USER14> Technically Rust doesn't have proper linear typing, only affine typing. Destructors give you "basically" linear typing, but there's ways to bypass destructors both explicitly and accidentally (though if memory safety isn't at stake, this isn't a worth worrying about IMO):

[https://doc.rust-lang.org/nomicon/leaking.html](https://doc.rust- lang.org/nomicon/leaking.html)

</comment></comment></comment></comment></comment><comment><USER15> Can someone tell me what it means to have "no unsafe code"? (I'm a JavaScript developer with very little experience of languages like Rust and C++.)

<comment><USER5> To understand unsafe code you need to understand what's safe code and pointers first.

Basically, safe code is automatically managed to get rid of memory leaks [0], dangling pointers [1], null pointer dereferencing [2], race conditions [3], and many other memory management bugs.

You don't encounter any of these in JavaScript because it's a managed language, meaning there's a garbage collector [4] that looks after all your memory allocations.

Contrary to the managed languages, C & C++ are unsafe and "native" (meaning that they're very close to the hardware level) - it's a wild land where you manage memory manually yourself. If you miss a single deallocation, you're left with a memory leak. If you deallocate a memory region twice, you have a double free situation [5]. So you have to be very cautious when writing code in C & C++. There are many techniques to make it easier (e.g. smart pointers [6]), but not all developers use them.

Rust takes the middle ground: it combines safety with unsafety by using a know-how affine type system with a borrow checker, which allows values/variables to have only one owner. This system has properties of both managed and unmanaged code. "Unsafe" code in the context of Rust means that you consciously turn off the borrow checker, leaving on your own and managing memory deallocations manually, as in C. That makes it possible to interface your Rust code with the native code, at the cost of making you prone to all errors and bugs that are listed above. So it's a good thing to minimize usage of unsafe code, to allow the Rust compiler to check your code for safety.

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

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

[2] [https://en.wikipedia.org/wiki/Null_pointer#Dereferencing](https://en.wikipedia.org/wiki/Null_pointer#Dereferencing)

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

[4] [https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...](https://en.wikipedia.org/wiki/Garbage_collection_\(computer_science\))

[5] [http://stackoverflow.com/questions/21057393/what-does- double...](http://stackoverflow.com/questions/21057393/what-does-double-free- mean)

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

<comment><USER16> > . So you have to be very cautious when writing code in C & C++. There are > many techniques to make it easier (e.g. smart pointers [6]), but not all > developers use them.

Not everyone has security as a requirement. Some people jsut want to write something that is both fast, predicable. Most banks don't make any security demands of internal applications because they are not accessible to the internet. At which point safety is just a way to slow you do.

<comment><USER17> _> >Most banks don't make any security demands of internal applications because they are not accessible to the internet. At which point safety is just a way to slow you do._

This is a bad way of doing things. That means as soon as someone finds a way to get inside the network, the bank is wrecked. You need to look at security from the point of assuming the attacker somehow got inside because it'll happen one day.

[http://digg.com/2015/ashley-madison-hack](http://digg.com/2015/ashley- madison-hack)

 _" "" MOTHERBOARD: How did you hack Avid Life Media? Was it hard?

The Impact Team: We worked hard to make fully undetectable attack, then got in and found nothing to bypass.

MOTHERBOARD: What was their security like?

The Impact Team: Bad. Nobody was watching. No security. Only thing was segmented network. You could use Pass1234 from the internet to VPN to root on all servers. """_

</comment></comment></comment></comment><comment><USER18> This is awesome. Now to go dig up my WAD files. To add to the list of languages where bringing up Doom was helpful in vetting the language, Java. Patrick Naughton built a BSP rendering platform in Oak using the Doom WAD files and found a number of places where the JVM needed tweaks.

</comment><comment><USER19> Nice. Someone previously ported Doom to Rust, but they kept the general form of the C data structures and had to use lots of unsafe code.

<comment><USER20> It's the same project, I just been keeping it up to date and removed all the unsafe code. It never _needed_ unsafe code, but it was my first Rust project and I didn't know what the hell I was doing---it's now much cleaner, safer and faster than the incarnation you saw last year :)

<comment><USER21> That's awesome! I'm just learning rust and I'm really enjoying it, though it was more challenging getting into the right mindset after working on GCed languages for most of the last 4-5 years. Certainly wrestled with the ownership system for a while but it's all making a lot more sense now, and I'd much rather have the compiler telling me about these problems than incorrectly dereferencing memory in C code.

How long have you worked on only this project?

<comment><USER20> > How long have you worked on only this project?

It's hard to quantify how much time _this_ project took, since when I started a year ago I knew nothing about Doom or Rust. If I started writing it now from scratch, I could probably hammer it out in a working week. A better programmer could probably do it in a weekend. It's neither very big nor very hard.

But that's not how programming works, is it? In fairness, you'd need to count some of the time I spent working on a lot of other random Rust side projects and reading blog posts over the last year, while only spending a couple of hours ever other week or so on rust-doom.

> Certainly wrestled with the ownership system for a while

I think my background in modern C++ helped me a lot with this, since the "one owner per thing, move semantics" model is how you're supposed to write C++ too.

That said, figuring out the cleanest design is not easy and I'm still wrestling with it today. The code was an absolute mess last year and now it's better, but still needs plenty of work: just yesterday I decoupled WAD parsing from the rest of the code properly ([https://github.com/cristicbz/rust- doom/pull/53](https://github.com/cristicbz/rust-doom/pull/53)).

I'm still learning a lot a year after dedicating all my free-time programming to Rust.

</comment></comment></comment></comment><comment><USER22> This is great. I've wanted to start a project in Rust but I'm hesitant since I haven't found any profiling tools akin to VisualVM. I'd feel a bit blind writing multi-threaded code where I can't see what's going on. What do people use to sanity check this sort of thing?

<comment><USER8> One nice aspect is that Rust gives you many kinds of threading errors at compile time, so that helps. :)

Any profiling tool that works for C or C++ should work just fine for Rust. For example, people often use perf for performance work.

</comment></comment><comment><USER23> What a great project! The author should do a talk about his experiences. I searched for something like this on YouTube, and only found this: [https://www.youtube.com/watch?v=0_-TRvbo54Y](https://www.youtube.com/watch?v=0_-TRvbo54Y).

<comment><USER20> Thanks! Uh, I'm not good at writing/saying things that are not checked by a compiler. But I'll try to write a blogpost about it.

</comment></comment><comment><USER24> I love stuff like this. I and some other students made a Quake 3 engine in C# using OpenTK (OpenGL 4) in about 6 weeks. None of us had ever done real game development before. It was a great learning experience and overall we're pretty happy with what we accomplished.

It's still very preliminary and not optimised, but I might tinker away at it now that my degree is all but done. At this point it can load and render any Q3 (or OpenArena) BSP map, but most all other things are missing.

[https://github.com/aggregates/tk-quake](https://github.com/aggregates/tk- quake)

</comment><comment><USER25> Rust will push C++ becoming much better!

</comment><comment><USER26> I have a sinking feeling: [https://github.com/cristicbz/rust- doom/blob/master/src/game/...](https://github.com/cristicbz/rust- doom/blob/master/src/game/camera.rs#L33)

<comment><USER27> Can you please elaborate?

<comment><USER28> It's a joke - the comment references a song [0] from the movie Titanic, which prominently features a sinking ship.

[0] [https://en.wikipedia.org/wiki/My_Heart_Will_Go_On](https://en.wikipedia.org/wiki/My_Heart_Will_Go_On)</comment></comment></comment>


The Moral Bankruptcy of Manipulating Human Psychology to Turn Users into Addicts - <AUTHOR> https://hackernoon.com/the-complete-moral-bankruptcy-of-manipulating-human-psychology-to-turn-users-into-addicts-d09b98281ef <comment><USER2> [https://news.ycombinator.com/item?id=15717649](https://news.ycombinator.com/item?id=15717649)

<comment><USER3> (280+ points, 96+ comments)

</comment></comment><comment><USER4> I do not usually do this, given that this conversation has already been posted on hacker news, but i felt compelled.

At the top of the page is an icon, i'm presuming of the author, and a description:

"I created a story-driven strategy framework to help transformational companies achieve planetary scale. Learn what I do at [http://exponents.co"](http://exponents.co")

Since I couldn't actually parse that sentence, i went to [http://exponents.co](http://exponents.co)

I've only got one question hacker news might be able to answer for me...is this a parody? Am i part of a joke i don't get?

<comment><USER5> I thought the same. It makes no sense to me what-so-ever.

Can only assume that it's either parody or for a very, very select audience!</comment></comment>


Lever (YC S12) Raises $20M for Hiring Software at Netflix, Reddit and Lyft - <AUTHOR> http://www.forbes.com/sites/alexkonrad/2016/01/26/lever-raises-20-million-to-help-lyft-hire <comment><USER2> Lever is an awesome product, really excited for them. One feature that I'd love to see is something like calendly or x.ai that allows the candidate to schedule a time based on the interviewers calendar availability–going back and forth in emails to schedule a time for phone interviews can get very tedious.

</comment><comment><USER3> HR software hadn't seen much innovation for years, it's refreshing to see newer entrants getting money and traction. We use Lever's API, it's a delight.

</comment><comment><USER4> Lever is probably the most innovative ATS on the market currently; amazing platform and excited to see what they're going to do with this additional funding!

</comment><comment><USER5> Lever is a fantastic product with a fantastic team. Recommended for stressed out recruiting teams and hiring managers everywhere!</comment>


Vim as you IDE - <AUTHOR> http://haridas.in/vim-as-your-ide.html <comment><USER2> When will be the day when this sort of a thing gets shipped with the default vim installation?

The reasons I say this is every time somebody brings up the apparent ancientness of vim/emacs people point to something like this. I agree that all this is doable, but you must realize tailoring a vanilla installation with plugins to do all this is really difficult for most programmers. Especially if you want newbies to start with using vim.

If people wanted to use an IDE, they would use an IDE- There are plenty available these days. All it takes is going to go to the eclipse website, and downloading one. Why in the world would any body spend hours(days?) hunting all these basic plugins which are must have for today's software development needs?

Somethings like auto complete in ST2 looks to just give what the user wants. In vim you would be doomed press ctrl-n as and when you need it, but it happens automatically with ST2.All these modern GUI based editors are basically these many tiny optimization on old concepts .There is also that file browser that gets opened by default on the left hand side. The minimap on the right hand side. The search functionality using ctrl-p. These are few tiny yet useful automations that should ship with vim/emacs by default. I see no reason why they shouldn't. Apart from trying to sell themselves as endlessly customizable editors, they must also do many of tiny day to day needs by default.

Things like package managers, a proper good looking GUI et al are must have things in any software tool these days. Arcane 80's style GUI, default tooling support for software development needs going two decades back is not going to fly.

<comment><USER3>
      Why in the world would any body spend hours(days?) hunting all these basic
      plugins which are must have for today's software development needs?

These plugins are "must haves" if you are used to using an IDE. But they are not prerequisities of creating good software. Proof: plenty of good software has been and is being created without such plugins.

You are used to the file browser on the left, the minimap on the right, the search function bound just so. So you want that. But not all vim users are used to that.

The simplicity of vim is what drew me. There aren't a hundred and one "project files" (whatever those are) added to any bit of code I want to work on. There aren't a hundred and one buttons everywhere. There is the code on the screen. Nothing else.

Adding lots of extra file-trees and variable-lists and computer-guessing-what- you-want-to-do in the default vim install seems like it would scare away more users from vim than it would draw. For the modern GUI kid (like me and I assume you), getting used to modes and the vim keybindings was hard enough. Let the user add windows and features at her own pace, as she gets comfortable.

One other thing before you write off the "arcane 80's style" editors:

The second fact that drew me to vim is that it was esteemed by men who I respected.

Look at the powerful minds that have built such beautiful things with vim and emacs. There are two explanations for their devotion to their editors:

1) They are used to vim/emacs. They like them because they are used to them.

2) They are technologists. They have an innate fascination with the novel, the bold, the capacity for an innovative idea to change everything. Yet even with this prejudice, they love truth enough not to sacrifice the old superior tool for the new, fashionable one.

After the first few frustrated sessions with vim, where I cursed at it for not behaving like a text editor "should" behave, I believed very strongly that explanation 1 must be true.

But the power (sorry, that's the right word) I feel when I fire up vim grows everyday. It grew today after reading this excellent blog post and discovering some new, wonderful plugins. And everyday I grow more convinced that explanation 2 drives the loyalty to vim.

<comment><AUTHOR> I got your point. I explained the same thing on my summary portion of my blog. I left eclipse for Vim was after seeing its advantage of basic mode based editing. All others are just additions, you can add them when ever required. Check this out also about my detailed explanation of how did that happen to me - <http://haridas.in/how-i-came-in-to-vim.html>

<comment><USER4> If you're coming from Eclipse, did you check out IntelliJ's VIM plugin?

I'm a decades-old Vim user, but I still fire up IntelliJ for Java Android development. Java is less painful in an IDE that was designed for it, and with the IntelliJ plugin it's like having one's cake and eating it too.

<comment><AUTHOR> Cool. Right now I'm not in the java world, but it will be helpful to my friends.

</comment></comment></comment></comment></comment><comment><USER5> I think it's a Vim rite of passage to write these posts. Just reading this one now makes me want to write my own, even though I know everyone has seen them a million times and has little interest in my Vim special flower.

<comment><USER6> Would anyone be interested in a writeup of my setup? Arch Linux + xmonad + tmux + urxvt + zsh + vim. No desktop environment, just a setup optimized for reliable web development. I've been building this setup from scratch at work and at home for the past year, so I've got most of the minor annoyances figured out.

<comment><USER7> First off, I'm sure that with the (recent?) surge in "check out my super efficient setup" posts, a write up of your config would be fairly well received.

The _real_ reason I'm responding is to throw in my $0.02 that for those that want an easy and efficient tiling window manager setup, but don't want to go through the relative pain of xmonad, `awesome` is a great substitute. I've used it for years now, and although my office hardware changed from an old-ish ArchLinux box to a Macbook Pro, I'm still an avid fan of tiling WM's. Even on OS X, the first app I install is always 'DoublePane' to mimic the functionality. [1]

As efficient as vim shortcuts can make you while banging out code, I am a _firm_ believer that most window managers are absolutely and completely inefficient. Most people whom I convince to give a tiling, scriptable WM a try never look back.

It's vim efficiency for _everything you do!_

[1] I'm not affiliated with DoublePane in any way, and there are alternatives out there. That said, for $1.99 (last I checked), it does an incredible job of increasing my efficiency on my Mac.

<comment><USER8> If you like DoublePane you might like size-up better. I use that and cinch but I am considering a switch to Moom. It has even more interesting features and combines the size-up features with cinch.

<comment><USER9> I've actually been looking for something like this, and Moom seems to do the trick. It's got some nice customization, so I can at least set my own shortcuts for different areas of the screen. It works really well since I don't like straight 50/50 screen splits (I prefer a sort of pseudo-golden ratio layout -- Moom can't do it precisely, but it's close enough).

Pretty good use of $10, I think, unless I suddenly need that $10 for an emergency, like beer or coffee or a raw turkey. So, thanks, even if I'm stuck without a supply of raw turkey for a week.

</comment></comment></comment></comment></comment><comment><USER10> Over the years I seem to have gone full circle with Vim. These days I lean towards few or even no plugins - snipmate is the last plugin i'm struggling to eliminate.

This is more than likely a factor of my environment though. I'm frequently using Vim "away from home" so to speak.

Best approach for this i've found so far is to set a $VIMINIT on remote login (i.e. an admittedly clunky combination of SendEnv set for Host * in ~/.ssh/config). Still on the lookout for a better way though.

</comment><comment><USER11> I have been so spoiled. I have never been much of a Microsoft fan (except for Excel, best software ever) but have done most of my development in C, C++, C# using Microsoft IDE's which as everyone knows are pretty much the dogs bollocks. I do Java development using Eclipse.

Always wanted to know what to use as a general purpose IDE that is ideally cross platform and was looking for opinions on whether these VIM layouts might be suitable?

<comment><USER12> Honestly, for an IDE replacement rather than just an editor, I'd suggest Emacs rather than Vim.

Reasons:

* Emacs plays well with other programs, you can start other shells, language interpreters etc, from within Emacs and interact with them easily. There are some Vim plugins that try to enable this but I've always found them less satisfying.

* Emacs is usable in all the same scenarios as Vim (i.e. cross-platform, over ssh, dual GUI/Terminal ability, screen/tmux/dvtm compatible etc)

Random Thoughts:

Vim is an amazing editor but I've always found that these attempts to add features to make it into an IDE cause it to start to feel clunky.

Emacs on the other hand, plugins generally work well (except when they don't).

Vim (or at least vi) is installed on basically every Unix install (and available for install everywhere). Emacs is installable everywhere also but setup generally takes a bit longer.

If you are going to use Emacs and you are intrigued by Vim style keybindings, I've found Emacs Evil-mode to be one of the best Vim emulation packages that I've tried (most Vim emulation packages will eventually cause frustration - Evil mostly doesn't).

I find that I use Vim more when I'm switching between a lot of different computers, and Emacs when I'm mostly developing on one stable computer setup.

So my workflow in a particular environment is usually, first install Vim so I can get work done, and as I use the environment more I'll end up installing Emacs and gradually switching over to it.

<comment><USER13> But if you look at Emacs-as-IDE route taken by EDE/CEDET suite, it's a kludgy beast... (I don't know how large the EDE/CEDET user community is, but most people I know forsake it in favor of the simpler facilities in Emacs).

</comment></comment></comment><comment><USER14> If you're using a language that (practically) requires an IDE, or, you really want what the modern idea of IDE is. You probably want to look elsewhere.

That, or grok that Unix is the IDE. Vim is just the editor component.

<comment><USER15> There's plenty of middle ground to stand on. By choosing vim alone, you already deviated from Unix purism (rabid Unix purists aren't that happy with bog-standard vi, either).

Saving round-trips to she shell ain't necessarily evil. Separate unix tools are great, but e.g. presenting info in the editor is quite helpful. Ctags does your parsing, but you can display it with tagbar. Language-specific tools do linting, but you can display it in the editor with syntastic…

</comment></comment><comment><USER16> I love vim and I've used it for many years, but for programming I've found the "code understanding" features of an IDE to be as valuable as the dexterity that vim allows in terms of input and navigation. I do not simply mean syntax checking--a baseline in my opinion, but more of things like inheritance hierarchy navigation, refactoring of code (e.g. renaming all instances of a particular local variable, a particular function, etc etc, without the risk of a simple text substitution), mark occurrences (showing all of the reads and/or writes of a particular the variable under the cursor in all views), and so on. It is even better if your IDE can run parts of the compiler on the fly (an instructor once told me that eclipse does this with java. However, I'm not sure if it's feasible for something like C++ due to the complexity of the language). And then you have all of the other features of the IDE at your fingertips too (e.g. an integrated debugger or profiler).

A few years ago I searched high and low for something satisfactory that combines the text editing/navigation of vim with the extremely useful features of an IDE. The closest thing I could find for C++ was Netbeans combined with the jVi plugin. The VIM functionality provided by such a setup is not _too_ barebones, and the IDE fills in the gaps where other VIM plugins may have been used. There may be something better now, but I've grown accustomed to this setup and it takes a substantial amount of time and effort to reroll.

There is also Eclipse CDT and the "eclim" plugin for it (which actually uses an existing vim process. Since this means that all of the other vim functionality and vim plugins work in tandem with the IDE, this is the ideal setup), but I recall that there was much lacking with both Eclipse CDT and "eclim" itself (I do not recall exactly what, but, again, this was a few years ago). Things may be different now and I encourage anyone looking for something similar to take a peek at both Netbeans with the jVi plugin and Eclipse CDT with the eclim plugin.

</comment><comment><USER17> HAH, vim looks more and more like emacs :)

<comment><USER18> As I recall, that was always the idea behind Vim. To bring the power and flexibility the author appreciated in EMACS to the style and interface of Vi.

There's value to be found in taking the best of multiple worlds into one product.

I for example, cut my teeth on Bill Joy VI, and the keystrokes are burned permanently and naturally into my brain. I love the extra stuff that Vim gives me, because it is a natural extension of that toolset that I started with.

</comment></comment><comment><USER19> I've been content with the Janus[1] extensions for about a year now but I just added MiniBufExplorer and I'm really enjoying that.

I typically keep three panes open, one of which is NERDTree. Right now my biggest gripe is the strange highlighting of the Play! framework's template files. The files are name.scala.html which results in weird highlighting of the inline Scala. I have yet to find a good solution (admittedly I haven't looked in a while) to this but if someone knows of one I'd love to hear it.

[1] <https://github.com/carlhuda/janus>

<comment><AUTHOR> I hope this would be helpful to you - <https://github.com/sjl>

</comment></comment><comment><USER20> Everytime someone writes a post about vim we see these editor wars emerge again and there seems no real solution, as it is mostly "use what works best for you". There are amazing software engineers using vim, and others using Eclipse with Java on Windows like notch or Visual Studio like John Carmack. Use whats you feel comfortable with.

Personally i like the simplicity of vim for editing taks, i could see me writing javascript or any other scripting language with it. But for complex software i definately would miss the abilities of modern IDEs, be it only for refactoring.

</comment><comment><USER21> Funny. I was at more or less that point about two years ago. My desire for more of that lead down a slippery slope that ended in Emacs. And for some reason I am now coming full circle and realize that I don't actually require a lot of these plugins any more.

I'm still trying to figure out why I feel that way.

</comment><comment><USER22> If your IDE doesn't do isomorphic refactorings reliably it is really just an editor.

</comment><comment><USER23> I didn't get how to get syntastic to check PEP8 compliance. I have it along with pyflakes, and never seen such an error (I don't believe I'm that PEP8 compliant myself)

EDIT: oh, nevermind, just needed pip's flake8 package

</comment><comment><USER24> this post might be interesting to some looking into zsh + vim + tmux

<http://www.mahdiyusuf.com/post/24784023641/beautiful-tools>

<comment><AUTHOR> I tried zsh for a while after seeing its colorful features. But IMHO it lacks command rendering and auto complete speed compared to bash.

</comment></comment><comment><USER25> I really would like ctags to work well with JavaScript, but I'm using require.js and Exuberant ctags really doesn't like that.

</comment><comment><USER26> Shouldn't it be VIM + Shell as your IDE?

<comment><AUTHOR> Hmm... That make sense. But the title should be a simple one.

</comment></comment><comment><USER27> Or I can use a text editor like TM2 or ST2 and turn on vim bindings and get 80% of the way there (that's a generous 20% for all of the vim hotkeys that don't work in the emulated modes).

<comment><USER5> 80%? Every attempt I make to use a Vim emulation mode doesn't get 20 seconds without failing to replicate Vim behavior on even fairly basic things.

<comment><USER21> Then check out Evil for Emacs and ViEmu for Visual Studio.

ViEmu even supports something like nnoremap in its .viemurc.

Case in point: My first introduction to Vim was through ViEmu.

<comment> qu4z-2 Alternatively VsVim for Visual Studio. I prefer it, although I couldn't give any reasons why.

It still fails the "Does it break flow by not implementing some feature or other?" test fairly frequently though. First thing that comes to mind is that while it has text objects, it seems to be lacking "tag" though (vit, not vi<). Which is a shame, as it's quite useful for web dev.

</comment></comment></comment></comment><comment><USER28> I don't read tutorials written by people with bad English. Life's too short, and too many better alternatives already exist.

<comment><USER29> I agree, but also find it hilarious that this title is on the front page.

<comment><USER30> You'd almost think the mods on HN were more interested in screwing up useful titles than fixing ones that are actually broken.

<comment><USER31> I like to tell myself it's a principled protest rather than heartless moderation.

<http://en.wikipedia.org/wiki/Work-to-rule>

</comment></comment></comment></comment><comment><USER32> I'm sure the article is interesting, but the writing is awful.

<comment><AUTHOR> Thanks for the feed back. Actually I'm not good at explaining things,Sorry that's not an excuse. I'm always trying to improve my language and presentation skill.

<comment><USER33> It's a great article. Assuming English isn't your first language, I think @insertnickname is being unfair.

<comment><AUTHOR> I feel happy about that. I want to know how I performing :).</comment></comment></comment></comment>


AMD is having its day - <AUTHOR> https://www.economist.com/business/2019/10/31/amd-a-chipmaking-underdog-is-having-its-day <comment><USER3> Jim Keller, the designer of "Zen" architecture, is now working for Intel... [https://web.archive.org/web/20180426124248/https://www.kitgu...](https://web.archive.org/web/20180426124248/https://www.kitguru.net/components/cpu/matthew- wilson/zen-architecture-lead-jim-keller-heads-to-intel/)

<comment><USER4> It's kind of his "thing" to bounce around to different, interesting projects. He wrote the x86_64 spec while working at AMD (and was responsible for the K8s ala Athlon 64s), he played a big part in Apple getting their SoCs to best-in- class, and that's not nearly all he's done.

Incredibly accomplished man, I don't think he's going to stay in one place for very long. He'll probably come back to AMD at some point or another.

<comment><USER5> I wish I knew what his secret is.

He can't be a genius of THAT magnitude, that would be a miracle.

<comment><USER4> If you ask most people who have familiarity with x86_64, I'm certain they would use a different term than "genius."

Though the first step for you would be to work on projects you're more passionate about, and that are more technically challenging. A billing site (judging by your HN about section) won't challenge you in a way that will make you get better.

<comment><USER6> _> If you ask most people who have familiarity with x86_64, I'm certain they would use a different term than "genius."_

What term do you think they'd use, and why?

<comment><USER4> "The reason we're stuck with this shitty fifty year old architecture that's steadily gotten worse through every iteration," "Satan," "Evil Computational War Criminal," a few less nice terms.

If you ask a Sun employee: "Enemy #1."

Less sarcastically: "slightly above average."

x86_64 is a nightmare, and we're a decade behind where we could be because it was what the industry settled for.

<comment><USER7> That seems extremely unlikely. If a new architecture could offer that much advantage (a decade is _massive_ in this space) surely there'd be some pressure to move. One could easily imagine Apple moving to ARM, for example.

Unfortunately, I think a much more likely situation is that x86 (/64) is only slightly hobbling things, and Intel are easily able to push past that with technical craftiness. As in many other cases, implementation trumps theoretical design.

<comment><USER4> Apple _is_ moving to ARM, the most recent iPad Pro outperforms its laptop line (last I saw, at least), they've spent a fraction of what Intel, AMD, and VIA have invested into x86_64, and basically every major Apple leak mentions that they're investigating moving the Mac line to ARM in a generation or two.

A new architecture _can_ offer that much advantage; x86_64 wasn't even the third most-performant implemented ISA when it was released, and every other ISA makes gains far faster than it. SPARC and POWER are still competitive with it despite having 1/1,000,000th the amount invested in them, and in just a few years and with comparatively nothing invested into it, RISC-V is starting to rival a portion of the chips (though not the upper line of them yet).

It "won" because of backwards compatibility, nothing more.

<comment><USER7> That's just not the case; Apple were already well behind in performance at the point x86_64 came out, due to them being stuck on POWER. They actively moved _to_ x86, despite big compatibility issues, because of how much better they were.

The evidence is that architectures are just not as important as all that. x86 is clearly pretty bad in many ways, but clever tricks and microcoding have been able to overcome those issues.

<comment><USER8> > Apple were already well behind in performance at the point x86_64 came out, > due to them being stuck on POWER.

The issue was chipsets and peripherals, not POWER performance (which generally always beat x86 at the same point).

The problem was that the entire ecosystem was built around communicating with an x86. So, you couldn't get a Northbridge or Southbridge equivalent that was even remotely close in performance or power consumption to those in x86 space.

Unless you decided that you were going to take on _everything_ in chip design, you couldn't compete. And Apple didn't decide to take on everything until Intel told Apple to pound sand and pissed Jobs off.

<comment><USER9> There has never been a PowerPC system that beats x86 at any price point.

<comment><USER8> You are far too young.

The 601 based PowerPC's were the first to be able to do 3D graphics on the microprocessor well.

The G4 based titanium Powerbooks were sufficiently better that they became iconic at a time that Apple wasn't regarded that well.

Sure, the G5 and up were disastrous, but the writing was on the wall well before that. Chipsets on the G3 and G4-based systems used _more power than the processor_ and that only became untrue because the G5 was quite so poor.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> Interesting timing for this article.

I'm in Canada, and for the first time in over a decade, I decided I couldn't pay the premium of $3200 (taxes included) for a Macbook Pro with 512GB SSD and 16GB of RAM.

I bought a Lenovo 2 in 1 touch laptop with lots of ports, and an AMD Ryzen 3700U with RX Vega 10 graphics, for $700 (taxes included).

The AMD Ryzen 3700U is just as good as the 8th Gen i5. Plenty for me at home. And with the money I saved, I can upgrade my NAS.

This combination of AMD + Windows + Lenovo has finally pushed me to try the world outside of Apple.

<comment><USER11> How's the trackpad? I have heard people say that they've found an apple comparable trackpad, but I have yet to encounter one.

<comment><USER12> I switched to ThinkPads last year (first a X250, now T470s) and this was my big concern too. I just sat down one day and spent an hour or so tweaking the various options for the trackpad driver until I got it how I was used to from Apple. I'd say it's 95% as good, and some things like dragging are infact easier as there are physical mouse buttons (as well as tap to click).

I have no idea why the defaults are so bad, but I've kind of got used to that as a Linux user ¯\\_(ツ)_/¯

<comment><USER13> Can you detail your distro and the tool you used to tweak? What settings worked well?

</comment></comment></comment></comment><comment><USER14> AMD lags not because of hardware only. There is very weak support for drivers and libraries in software. Intel and Nvidia spend huge amount of money in supporting library maintainers and thereby creating a lobby.

For example, look into the list of supported GPUs in the Github repositories of popular machine-learning libraries PyCharm, Tensorflow etc. AMD and OpenCL is nowhere as compared to Nvidia's CUDA.

<comment><USER15> On the other hand, Nvidia's Linux drivers are blobs (that don't even support Wayland) while AMD and Intel actively contribute to Mesa, and treat their users well (or at least much better than nvidia).

<comment><USER16> There have been numerous situations just this year where I've stumbled on problem from having an AMD card, whereas Nvidias with their "blobs" have worked just fine. Gaming, video editing, even ML, they all seem to work perfectly on Linux with Nvidia, and AMD always has some problems. So at the very least this is contested. Nvidia seems much more supporting of the open source OS.

<comment><USER17> I have had exactly the opposite experience, issues with Nvidia cards / drivers that I couldn't fix. Over the last 5~10 years AMD support on Linux (and other open source OSes) have been much better. To the point that for some of my workloads AMD on Linux is faster than AMD on Windows.

<comment><USER18> It is not surprising, AMD OpenGL drivers for Windows are horribly slow.

</comment></comment></comment></comment></comment><comment><USER19> "For now, AMD's resurgence is good news for consumers, IT departments, cloud- computing firms and anybody who uses software. Like any good monopolist, Intel charges a steep price for its products—unless AMD is doing well. Sure enough, Intel's newest set of desktop chips, due in November, are some of its thriftiest in years."

</comment><comment><USER20> I just built a new PC with Ryzen 3700x. I use it mostly for music production. Fantastic performance so far. 10 instances of Serum and my CPU doesn't even cross 15%.

Moreover, I feel like I'm buying for the future with Ryzen. Intel is going to change its architecture after the 10th gen. Buying a 9th gen Intel right now seems like throwing money at a dead end

<comment><USER21> Same. My new 3700x build can push dozens of Diva instances.

If you want to see more details: [https://vi-control.net/community/threads/my- ryzen-3700x-buil...](https://vi-control.net/community/threads/my- ryzen-3700x-build-for-music-production.86352/)

<comment><USER22> ryzen 3000 benefits a lot from faster ram. you may consider upgrading.

<comment><USER21> Depends on the type of workload.

In Cinebench or Blender rendering it makes practically no difference.

I updated my RAM from 2133 to 3200Mhz and it made no difference either for DSP audio processing.

<comment><USER22> yep it depends on workload. cb20 doesn't scale well with memory.

</comment></comment></comment></comment></comment><comment><USER23> From the game theorist point of view I think its better if one company is the underdog. Think about it, if one company is the underdog, one company has a lot to gain by competing, while the other has a lot to lose if they don't compete. Therefore we get competition. Now, the more equal the market share of the companies the grater the risk and less the reward for competition... A better strategy would be not to undercut your competitor and instead divide the market share. Which leads to stagnation.

Do people here think it sound reasonable?

Edit: Mathematically the argument would be as follows:

Consider two company A and B. A has market share 'a' and B has b. n is the total market. Then a + b = n.

A's reward for competing will be n - a = b.

A's risk for competing will be a, (it's remaining market share).

A's will compete as long as the reward is greater than risk.

This will reach an equilibrium at a = b.

<comment><USER24> Take it for what you will, but an Intel engineer relayed to me (many years ago, in the aftermath of the Microsoft antitrust trial), that they attempt to ensure that AMD maintains a certain level of competitiveness as a hedge against antitrust. Sometimes that involves actually helping AMD via partnerships or technology sharing, if they are struggling too much - <USER2> times it means giving them a swift kick to the crotch if they are gaining to much ground. It may have been BS, it may not have - and much has certainly changed over the years... but...

AMD has always been nipping at Intel's heels, for 20+ years now, never really losing or gaining too much to pose a real threat. Yet we've seen how ruthlessly Intel will snuff out potential contenders (such as Transmeta, RIP), it does kind of make you think there's something to it.

<comment><USER25> This actually would mesh pretty well with that one Kaby Lake G NUC, released in 2017 and probably had roots in 2016 when AMD's stock was at $3, that had Radeon graphics inside [https://www.tomshardware.com/news/intel-discontinue- kaby-lak...](https://www.tomshardware.com/news/intel-discontinue-kaby-lake-g- amd-graphics,40577.html)

<comment><USER26> There's a simpler explanation for why Intel used AMD GPUs for a while: Intel's new integrated GPU design couldn't ship until they sorted out their 10nm issues, and their older design wasn't competitive. When Intel went shopping for GPUs on the open market, they could get them cheaper from AMD than Nvidia (though the HBM2 requirement was a clear downside). They actually paired AMD GPUs with both 14nm Kaby Lake and their failed 10nm Cannon Lake processors that had broken integrated GPUs. The short-lived Intel/AMD GPU partnership came to an end because Nvidia's lead over AMD got too big, but it was doomed to be cancelled as soon as Intel gets 10nm working.

<comment><USER27> What is Nvidia's lead over AMD? Intel's non-AMD gpus are Intel gpus

Do Nvidia integrated gpu (mpgu) exist?

Nnvidia claims they exist but all their weblinks to details are dead. [https://www.nvidia.com/object/main_mobo_gpus.html](https://www.nvidia.com/object/main_mobo_gpus.html)

<comment><USER26> Nvidia and AMD both make discrete mobile GPUs, and those are the only two options for offering better GPU performance on an Intel laptop when Intel's own GPU is inadequate. Nvidia's GPUs have for years generally had a substantial power efficiency over AMD's.

</comment></comment></comment></comment></comment></comment><comment><USER28> Nipping at the heels, market share wise.

Crushing it on the actual CPU performance side. The new Epyc Romes are pretty amazing chips compared to the Intel warmed over Xeon 82xx series.

<comment><USER29> Problem is that in the enterprise segment there is almost no AMD offering with the big brands so it is going to take a while to displace the Xeons. I looked at Lenovo workstations recently and their offering is 90% Intel.

<comment><USER30> Time to go super micro or Gigabyte for a cycle. Let the big brands feel the pain of not incorporating AMD.

<comment><USER31> SuperMicro's ILO and rack mounting hardware were really poor a few years ago. Has that changed? Keep in mind the big brands have improved those parts since then, so unless SM made amazing progress, they're not a drop in replacement.

<comment><USER32> SuperMicro's rails and OOB management are still horrendous.

<comment><USER33> What's the problem with their OOB?

<comment><USER34> Same Avocent garbage as everyone else I assume, it's not like any of the OEMs make their own.

<comment><USER35> iDrac is MILES ahead of SM ipmi, in my experience.

<comment><USER36> Be more specific, because the basic stuff needed by 99% of setup has been covered for ages. We are managing hundreds of machine with just SP IPMI.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER37> AMD needs to figure out a way to get CUDA support on its integrated GPU or get Tensorflow/Pandas/etc etc to adopt its GPU acceleration libraries.

Their brand is still not thought of as equal to intel. So the other way to build the brand is through developer adoption.

<comment><USER38> So why aren't they handing out free GPUs to colleges and universities like nVidia?

<comment><USER37> because nobody wants their GPU.

AMD integrated GPU laptops are very common in India and are very cheap compared to equivalent intel. For example Ryzen 5 Vega 11.

People would rather shell out for expensive nvidia. Because no academic/research software can use the AMD GPU.

If CUDA was available on AMD, then the sale of their laptops (and servers) would 10x overnight.

</comment></comment></comment><comment><USER39> AMD HD 4770, HD 6870, HD 7870, R9 290, RX Vega 64, all the graphic cards that I bought recently have been AMD. And thought my previous CPUs where Intel, my next CPU will be an AMD.

</comment><comment><USER40> [http://archive.is/c6fKX](http://archive.is/c6fKX)

</comment><comment><USER41> And I sure hope they keep it up. Intel was getting way too comfortable in its dominant position, and that hurts everyone (including Intel in the longer term). The best outcome for all is to have two companies with approximately equal marketshare competing on merit. There isn't much you can squeeze out of general purpose CPUs anymore, but I'd be quite grateful for the next 2 or 3x. And then they can start competing in acceleration hardware and GPUs.

</comment><comment><USER42> There's a strange cohort of "meme" stocks that I see in certain male-dominant internet subcultures. Tesla and AMD seems to be at the top of that list.

<comment><USER43> Can you expand on what you mean by this? I don't understand. Are you saying people pick these stocks because of cultural reasons and they're actually not good investments? Are you saying that male-dominated internet subcultures have a cultural reason to pick these stocks, specifically?

<comment><USER44> Probably the second one leading to a bias causing the first one. Some tech/geek communities really like those 2 stocks. There are other male communities as well that are into other stocks. Even in tech the culture leads to some stocks becoming overvalued and others undervalued. AMD is overvalued while FB is undervalued because of the cultural feelings toward those companies.

<comment><USER45> AMD is worth ~40B today. FB is worth ~550B today. AMD supplies a product in growing demand while FB supplies access to demographics in growing demand. But the downside risks are not the same. It only took FB's viral growth to end MySpace. User loyalty is far more fleeting than the market for CPUs. Within five years or your preferred investment time horizon, compare the valuations of each firm and see how your assessment stood the test of time.

<comment><USER46> Facebook has a plan A and a plan B for dealing with competition. Plan A is to buy out competitors to acquire users and diversify their brand (Instagram, Whatsapp). Plan B is to use FB's overwhelming resource advantage to copy their product (Snapchat). It's fair to say that FB is well aware of what happened to MySpace.

Any potential "Facebook killer" needs to circumvent both of these tactics. Not impossible but not easy either.

<comment><USER47> Facebook's Lasso doesn't seem to be killing TikTok

<comment><USER48> Zuckerberg went to Washington in September & October and took care of that. While he was busy with several other topics, you can be sure he leaned on the right members of Congress about TikTok.

The US has a very strong interest in every possible regard to protect Facebook's dominance and to kill or restrain TikTok by forcing it apart from Bytedance or burying it through the app stores.

If it gets separated from Bytedance it's either toast or it ends up in the belly of a US giant (or maybe even Spotify depending on the valuation).

<comment><USER49> Even if the us Congress somehow blocks tiktok, FB appears to be losing a lot of ground to it in the rest of the planet.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER50> Are there any good alternatives to Nvidia GPUs/cuDNN for deep learning?

<comment><USER51> ROCm doesn't completely suck with the Radeon VII, which is a Radeon Instinct MI50. Deep learning is not my day job and I'd like to avoid supporting NVidia's insane prices for DL-capable cards, so I've been dealing with the performance hit, and only using the R7 for DL tasks then switching it off when the power isn't needed. The XFX Radeon VII is actually on sale for Newegg for $569 so it's a lot of power (and 16 GB HBM2) for that price.

<comment><USER52> Agreed. The Radeon VII is currently the best price/compute GPU out there for deep learning. It's performance on RESNET-50 is about the same as the 2080Ti -

[https://github.com/ROCmSoftwarePlatform/tensorflow- upstream/...](https://github.com/ROCmSoftwarePlatform/tensorflow- upstream/issues/173)

<comment><USER53> That's only theoretical. Try to use ROCm on latest frameworks or on external models that write custom CUDA operations/losses. Basic stuff might work in a more complicated way than on NVidia, advanced stuff is guaranteed to either not work or work in a couple of months when it lands into ROCm.

Radeon VII is a beast for FP64 computation, if you do simulation or heavy computations that require supercomputer-level of precision, then grab one while you can, it's the best price/performance of all GPUs on the market.

However folks, please don't follow the advice about using for it Deep Learning if you want to actually have Deep Learning business in any way.

</comment></comment></comment></comment><comment><USER54> No mention of Spectre / Meltdown?

[https://www.csoonline.com/article/3247868/spectre-and- meltdo...](https://www.csoonline.com/article/3247868/spectre-and-meltdown- explained-what-they-are-how-they-work-whats-at-risk.html)

</comment><comment><USER55> If I block web fonts, all references to AMD are lowercase. MiloTE and MiloSCTE (small caps).

        .blog-post small {
            text-transform: lowercase;
        }

<comment><USER56> Can I ask -- What was your line of thinking that led you to find this out?

I'm the kind of guy who could probably figure out how to do this if it was, like, given to me as a task. But never in a million years would I just stumble across this.

<comment><USER55> I don't like it when different websites look very different. So in my primary browser (Firefox), I only allow sites to use my preferred sans-serif, serif, and monospace fonts. (In the options page's font dialog, I unchecked "Allow pages to choose their own fonts, instead of your selections above".)

I noticed that all occurrences of AMD are lowercase, so I noticed that it's set to lowercase. Opening in Chrome, I noticed that there was a giant banner on the bottom covering 1/3 of my page, and another on the top which closed when I closed the bottom banner. In Chrome, I noticed that AMD was written in small-caps with font MiloSCTE, and the rest of body text was using MiloTE.

</comment></comment></comment><comment><USER57> Full article is behind a paywall :-/

</comment><comment><USER58> Is there a non-paywalled version?

<comment><USER59> Check the FAQ.

<comment><USER4> _In comments, it 's ok to ask how to read an article and to help other users do so._

<comment><USER60> So where do we complain? This posting is essentially an advert.

<comment><USER61> Often times people will upvote the topic / headline as something interesting or noteworthy or because the discussion in the comments is interesting. I'm sure a double digit percentage of people are not even clicking over to TFA, and then another double digit percentage click and then bounce back to the comments (after hitting the paywall) for the discussion and may still upvote.

</comment></comment></comment></comment></comment><comment><USER62> Intel has had the smallest nodes since the beginning.

With Moore's law's death, everyone is catching up.

Isn't it that simple?

<comment><USER63> I don't think so. Because now TSMC has the highest transistor density. It is more that Intel fumbled 10nm so badly that others have passed them. Intel's 7nm had better be good and timely or they're in some serious trouble. TSMC's 5nm is starting early next year and with 1.84x scaling.

<comment><USER62> But nm are marketing terms now; TSMC's 7nm is said to be equal to Intel's 10nm.

Nodes are still shrinking, but not at the rate implied by their nm names. In addition, thermal constraints mean they can't actually be used at their theoretical capacity.

<comment><USER63> Intel's 10nm is finally shipping now, according to Intel, but it seems small scale yet. TSMC's 7nm has been shipping for over a year, in very ubiquitous devices (iPhones).

</comment></comment></comment></comment><comment><USER64> I think China will try to acquire AMD

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

</comment><comment><USER65> Congrats to AMD, but I'm still very pessimistic on their long term prospects. It seems like Intel's advantages come from a system that produces improvements over years. You can see this just in their R&D spending: Intel spends nearly 2x AMD's revenue just on R&D. Whereas this development from AMD was thanks to Jim Keller (who now works at Intel)... It was a one-off event.. and once they've extended it as far as it'll go.. then what? Unless they develop their ability to innovate (they've had issues keeping top talent at the firm), this will probably be another one of AMD's boom and bust cycles.

<comment><USER45> Intel decided to invest more heavily in share buybacks than R&D as of their recent earnings call.

But that's only half of the story. They need that R&D budget because they have the (massive and growing) expense of building and upgrading their own fabs, which have undergone a series of costly mistakes in the last decade. I wonder what % of intel's R&D budget is actually comparable to AMD's if you exclude the amount poured into fabs—betting those figures are much closer despite enormous differences in market cap. TSMC, who along with GloFo fab the AMD chips, is basically all-in on R&D investment and taking on debt to facilitate the construction of the most advanced fabs to date. And their prior investments in 7nm have scaled rapidly and panned out well. I think it was the fastest ramp for a node shrink that they've done.

Oh and Keller is definitely smart but you imply that he's got a monopoly on talent in the semiconductor industry. There's no way that's the case lmao

<comment><USER66> TSMC is all-in on R&D and latest fabs, but GloFo is not. GF gave up on 7nm:

[https://www.eetimes.com/document.asp?doc_id=1333637](https://www.eetimes.com/document.asp?doc_id=1333637)

AMD's recent success partially has to do with renegotiating its contracts with GloFo, allowing AMD to use TSMC more:

[https://wccftech.com/amd-is-negotiating-a-7th-amendment- to-t...](https://wccftech.com/amd-is-negotiating-a-7th-amendment-to-the-wsa- wafer-supply-agreement/)</comment></comment></comment>


When Will We Be Able to Build Brains Like Ours? - <AUTHOR> http://www.scientificamerican.com/article.cfm?id=when-build-brains-like-ours <comment><USER2> I almost dislocated my jaw while reading this article.

 _When we come to understand how brains function, we should become able to build amazing devices with cognitive abilities -- such as cognitive cars that are better at driving than we are because they communicate with other cars and share knowledge on road conditions._

Later:

 _As this cognitive infrastructure evolves, it may someday even reach a point where it will rival our brains in power and sophistication. Intelligence will inherit the earth._

Uhh... talk about lack of imagination. Self-driving cars? Smart power grids? Those are _toys_ compared to other consequences of brain emulation. And "someday"? If you can model 1/1000th of a human brain at full speed today, then you'll be able to model a whole brain in 20 years (assuming no software speedups). 2 years after that, you'll have a model that runs at 2x human speed. Then it's off to the races. Biological humans are nowhere near the upper bound for intelligence. Just one example of our inefficient brains: Our neurons conduct signals at 0.000001c. If these things are as smart or smarter than us, then they'll be able to build _even smarter_ intelligences _even faster_ than us. Lather, rinse, repeat; you have I. J. Good's intelligence explosion.

A minor detail in this future would be, "Oh by the way, biological humans can upload themselves and become practically immortal." Seriously, cars are the best the writer can come up with?! What's the point of cars if you can transfer consciousness at the speed of light?

<comment><USER3> I don't think it's a given that our brains are "ruthlessly inefficient". In a complex system of trade-offs, they are actually pretty damn good at what they do. Human vision alone is incredibly complex. Anyone interested in how difficult it is to replicate the brain should read Steven Pinker's "How the Mind works".

<comment><USER2> Sure, the brain is impressive. It's not bad considering the limitations of biology. Likewise, I think the human eye is impressive. I'd certainly have a hard time designing a video camera made of jelly. But the brain, like the eye, is highly sub-optimal compared to non-biological solutions. The laws of physics allow for brains that run a million times faster than ours while consuming the same amount of energy. And that's without using tricks like quantum or reversible computing.

Evolution can only hill-climb. It can't jump to the highest points of the solution space, and it can't explore any areas of the solution space surrounded by valleys. This is why no animal has evolved wheels, treads, or impeller pumps. This is also why animals haven't evolved brains made out of materials that conduct signals at speeds close to c.

<comment><USER4> "This is why no animal has evolved wheels"

instead animals evolved brains and hands that invent and build wheels. Nice way to jump out of the supposed limitation of hill-climbing algorithm.

<comment><USER2> Evolution has limitations that go beyond inefficiency. For example: it is completely indifferent to the organisms it operates on. Evolution has absolutely no compassion. It will not select for traits that reduce suffering in dying organisms. Evolution isn't forward-looking. It doesn't notice when it starts on a journey to trap itself in a local maxima. Evolution is _slow_. Life started on this planet not long after the surface solidified, but it took 4 billion years for general intelligence to evolve. 4 billion years and countless organisms suffering and dying just to get 3lbs of gray matter. Had it taken much longer, the Sun would have gotten farther along in its life cycle and sterilized the Earth before evolution stumbled on general intelligence.

Sorry for that mini-diatribe, but I don't like it when people paint evolution in a positive light. It really is one of the dumbest possible ways to explore a solution space.

</comment></comment></comment></comment></comment><comment><USER5> Ridiculous. Large-scale neuron simulations currently are like an algorithms assignment where I have some code written but don't understand the algorithm so I just tweak things all night and never get anywhere. In other words: "let's hope it does something interesting by just connecting millions of these things that we can kind of describe but don't understand at all."

We are VERY far from understanding the brain. Even for single neurons, we do not understand what is important and what we should ignore. We do not understand real-life neural networks at all. For example, we have the entire neuronal connectivity map for C elegans (only 302 neurons), the worm's genetic structure, and more -- and we still don't understand how its nervous system works, and we can't even simulate it.

This is a problem with this field -- why in the heck are we trying to simulate human and cat brains -- perhaps the most complex of them all -- when we can't even simulate a simple worm?? What ever happened to the idea of starting simple then working our way up??

I am always shocked when I look on the shelves at the bookstore and see lots of books titled "How the brain works" -- when we actually understand so little.

</comment><comment><USER6> Having worked in AI research for a number of years in the late 80s and 90s (very much in the symbolic side of things) - I ended up thinking that the only way anyone was ever going to construct an artificial mind capable of real general intelligence is by reverse engineering biological systems. So I agree with that part of the article.

However, I wouldn't get too excited about any of this happening any time soon. Personally, I still feel the field is still thrashing around looking for an approach that achieves some kind of traction and that provides a long term basis for ongoing progress.

As is often said, AI is still in its pre-Newtonian phase - I would love for a breakthrough to happen (although you have to refer to Vinge for some potential issues with this) but I really don't expect, like with fusion, that much to happen in my lifetime.

For the foreseeable future there are only going to be intelligent entities on one side of our screens - so far a great job is being done on augmenting our own natural intelligences (e.g. Google) so I'm personally more interested in that side of things.

<comment><USER7> AI can be created today - it's just a matter of money. Put a few hundred billion dollars into genetic programming, or cyc, or data sets for a svm and you can build general AI.

<comment><USER6> There are some things that aren't a matter of money, and I would suggest "true" AI is one of them (i.e. human level general intelligence).

I honestly don't think, even if you had $100 billion, anyone would know where to start to build such a beast. It isn't just a case of building sufficiently powerful hardware - I suspect that would be the easy bit.

Spend $100 billion on CYC and you would end up with a big interesting database, not a functioning mind.

<comment><USER7> I don't agree with that.

1) How did the human brain come about - evolution. So you can get there with genetic programming. How much computer time do you need - maybe $100 billion, maybe $100 trillion, but theoretically it's doable.

2) What is the brain - conventional opinion is that it's a neural network - ie. if you spend enough money as -assemble a million neural network engineers or -create billions of data sets to train against simple learning algorithms you can probably replicate it's "interface"

3) You can also view a human, or at least a human speaking through email, as a database. If you had enough people working on cyc, let's say a million rather than the 20 or so it's usually had, you could get a lot closer, or exceed, human level performance.

Imagine you a couple of professors and a handful of grad students. Would they be able to build a skyscraper within 50 years, and do so from scratch, without any prior knowledge of civil engineering, no access to construction labor, and only access to raw materials? Yet that is what AI has been about for 50 years - a handful of people attempt to build something much more complex than a skyscraper.

It probably took many trillions of dollars and millions of workers to get to the point where skyscrapers could be built, and each one individually probably costs more than all the money ever spent on AI research.

<comment><USER6> Well, some people think that the brain _might_ be doing something deeply weird with quantum level behaviors to create what we call "consciousness", if that is the case (of course a huge if) then it might _not_ be possible to replicate it in any meaningful sense.

If you look at artificial neural networks and natural ones there are a lot of differences. Artificial neural networks are useful tools for some kind of problems, not physiological models of what happens in our brains.

I can recommend this book if you are interested:

[http://www.amazon.co.uk/Philosophy-Artificial- Intelligence-O...](http://www.amazon.co.uk/Philosophy-Artificial-Intelligence- Oxford-Readings/dp/0198248547)

<comment><USER8> If it's not possible to replicate, how is human biology replicating it?

</comment></comment></comment></comment></comment></comment><comment><USER9> This is complete fantasy unfortunately.

They make this sound like AI is just a hardware problem, waiting to be solved by the wonder of Moore's Law. It's not. The human brain has 100 billion neurons, and 100 trillion synapses (wikipedia) - but it is the connections between them that make it do what it does. The possible connections are just mind boggling. Let's say you build hardware with those numbers (utterly non- trivial) - how does it connect together? How to we get it to structure in a way that those networks do anything? You can't expect it to wire itself into anything useful.

We have no idea how the brain does anything of significance (merging of senses into a coherent whole; memory; consciousness etc). We can't even define consciousness let alone understand how it comes about. We can't 'program' a neural network of any complexity. Even things that we take utterly for granted like object recognition is immensely complicated, let alone things that we know are 'difficult' like sentience. We can't expect this stuff to magically appear from a large neural network; nor can we program it (as we don't understand it); nor can we train it as we don't know what intermediate steps to train for.

Then, what are the inputs into it (and how are those interpreted by the hardware), and how do we get any output out of it? Let's say you solve both the hardware and the wiring problem - so you have a perfect replica human brain in a jar - how do you tell it what to do? How do you get any sense out of it?

We're fumbling in the dark here. To think those fumbles will achieve intelligence in any form in the foreseeable future is unfortunately fantasy.

<comment><USER10> Admitting that the problem is hard is important but not very helpful for actually solving the problem. Are you trying to discourage people from trying to solve it? Why, when the benefits should they succeed are astronomical? I agree that a lot of people have rosy-eyed views of an AI future, even ignoring the entire problem of Friendly AI, but why are you attacking them by just stating the difficulty of the problem instead of trying to suggest solutions? Hell, you could even donate some money to the people who do pay attention to the problems: <http://www.singinst.org/>

I don't know how accurate all of your "we" statements are, I'd bet at least one of them is wrong or will be wrong in the near future, considering there's about 7 billion of us and I doubt you've polled us all.

<comment><USER9> >Are you trying to discourage people from trying to solve it?

Not at all, the complete opposite. It's a fascinating area but I feel the expectations are completely out of whack with reality. Most of the articles like this have people saying we're only a decade or two away from proper AI, when I'm arguing that that is just not backed up at all - and people are underestimating what work is involved here.

When expectations are set wrong, and people eventually realise it, it can damage research in this area as people don't take it seriously any more. Ref the'AI Winter' - the dramatic cut in funding when governments realised most of the experts in the field had massively over-promised and under-delivered.

I think we need to break this down into smaller chunks of bounded problems. There is some amazing research around using human like neural networks and similar processes steps for machine vision - e.g. for object recognition, trying to mimic what happens in nature. This is greatly achievable.

Trying to model the entire human brain, with talk about how this will lead in the near future to intelligent, reasoning - even sentient AI - is fun but for the reasons I outlined needs an expectation reboot.

</comment></comment></comment><comment><USER11> > What does it mean to model the cat brain?

They don't seem to have a way of testing it. Sounds like Dawkins' computer models of "insect" evolution: fun, interesting and even beautiful, but not falsifiable. Visual art rather than science.

Seems they're saying they've constructed a neural network of comparable complexity to a cat's brain - for some value of _comparable_. And they're arguing about that value. Meanwhile, their cat's brain performs nothing like an actual cat's brain. The question doesn't even arise. But it's hard to tell, as the article is very information light.

As in code, complexity is impressive. Not necessarily useful or truthful.

</comment><comment><USER12> Personally, I wouldn't try to build a brain like ours. Sure we have nice passions, and deep insight frequently. But there is so much badness possible with our brains. Take for instance the "cognitive cars" if we built a brain like ours, how long would it take for it to get road rage?

I would like a brain that was not like ours. I'd like something capable of deep insight and critical thinking, but nothing like a human brain.

</comment><comment><USER13> I'm still surprised that much of the talk around future "intelligence" is geared more towards creating it from scratch (difficult) rather than enhancing or augmenting what already exists (less difficult). Regardless of this, if creating intelligence out of silicon is where the research is heading, we would have to first prove that silicon is at least an equivalently suitable substrate for hosting a model of our carbon based brain as opposed to merely assuming that whatever brain model we create can exist on any substrate.

I think more progress will be made in the meantime towards enhancing existing intelligence as it will be more immediately accessible in many cases.

</comment><comment><USER14> _graphics processing units (GPUs) give desktop personal computers the same speed that supercomputers had ten years ago_

Huh? GPUs give our desktops their speed? O RLY?

<comment><USER15> See: [http://www.hardwareinsight.com/wp- content/uploads/2009/10/gp...](http://www.hardwareinsight.com/wp- content/uploads/2009/10/gpu_vs_cpu.PNG)

Graphics cards (streaming multiprocessors) are computational beasts.

<comment><USER14> Regardless, we don't really use them for computation on desktops, right?

[Edit] Besides graphics computing, that is.

<comment><USER15> Today we do increasingly frequently.

<http://en.wikipedia.org/wiki/GPGPU#Applications>

Especially on the Mac, since the vast majority of new Apple machines come with CUDA-capable NVIDIA cards now and developers can expect them.

Even so, the article was referring to the fact that you _can_ pack that kind of power in a desktop now, regardless of whether or not the average consumer tends to take advantage of it.</comment></comment></comment></comment>


Grand opening to Library. A new place to read and write stories created by you - <AUTHOR> http://libraryapp.co <comment><AUTHOR> Hi HN,

I want to invite you to the grand opening of Library. A new and fun place to read and write stories created by you. I know there are writing/publishing platforms out there but I feel like they're lacking a social structure around the content that is written to enhance the reader's and writer's experience. Medium is attempting to create their platform into more of a social network but is not there yet. I feel this is where Library comes into play. I would really appreciate your feedback and thoughts and if you don't mind answering a few questions.

1) What do you like/dislike about Medium or other writing/publishing platforms?

2) What's the biggest problem you're facing using the current writing/publishing platforms?

3) What new features would you like to see in a writing/publishing platform?

Looking forward to reading your comments. Thank you!</comment>


Elon Musk increases his stake in Tesla; buys 72,500 shares - <AUTHOR> https://news.alphastreet.com/elon-musk-increases-his-stake-in-tesla-buys-72500-shares/ <comment><USER2> There is a lot that can be said about Elon Musk, some good, some bad.

But, one thing that I think is really valuable is that he seems to consistently put his money where his mouth is and that's admirable.

</comment><comment><USER3> I assuming he wants 2 things: -get a better control of which shareholder is calling the shots -get the shares of the market to fend off the short sellers</comment>


Show HN: Corona Virus Live Tracker. Fun yet useful project built on weekend - <AUTHOR> Hi folks, I created this fun yet a useful project over a weekend to hone my dev skills.
This website shows close to realtime status of all the countries infected with corona virus on a global map with the count of total infected, total recovered and total deaths.
There's a seperate section for important news and updates which is frequently updated to post the latest news.
It's also launched on ProductHunt so do shower some upvotes.
https://www.producthunt.com/posts/corona-virus-track-now-live <comment><USER2> why does the data not line up with this:

[https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.h...](https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6)

<comment><AUTHOR> It doesn't have to. There are many different sources. No one can get the actual realtime data as there is no such API Available.

</comment></comment><comment><AUTHOR> Here's the link [https://coronavirustrack.now.sh](https://coronavirustrack.now.sh)

</comment><comment><AUTHOR> I have updated the records also a datetime stamp from last update is added.

-Sagar Khatri</comment>


Rapid antidepressant effects of ayahuasca in depression: a randomized trial - <AUTHOR> https://www.cambridge.org/core/journals/psychological-medicine/article/rapid-antidepressant-effects-of-the-psychedelic-ayahuasca-in-treatmentresistant-depression-a-randomized-placebocontrolled-trial/E67A8A4BBE4F5F14DE8552DB9A0CBC97 <comment><AUTHOR> > Rapid antidepressant effects of the psychedelic ayahuasca in treatment- > resistant depression: a randomized placebo-controlled trial

> We observed significant antidepressant effects of ayahuasca when compared > with placebo at all-time points. MADRS scores were significantly lower in > the ayahuasca group compared with placebo at D1 and D2 (p = 0.04), and at D7 > (p < 0.0001). Between-group effect sizes increased from D1 to D7 (D1: > Cohen's d = 0.84; D2: Cohen's d = 0.84; D7: Cohen's d = 1.49). Response > rates were high for both groups at D1 and D2, and significantly higher in > the ayahuasca group at D7 (64% v. 27%; p = 0.04). Remission rate showed a > trend toward significance at D7 (36% v. 7%, p = 0.054).</comment>


SixNines is a 24x7 monitor of your website availability - <AUTHOR> https://sixnines.io <comment><USER2> I wonder if they run this on their website so they know their site is down right now.</comment>


Leaked AshleyMadison Emails Suggest Execs Hacked Competitors - <AUTHOR> http://krebsonsecurity.com/2015/08/leaked-ashleymadison-emails-suggest-execs-hacked-competitors/

<comment><USER2> This is priceless.

So it may be that the only thing that really separates AM from its hackers, is the leaking of data?

If they failed to disclose to nerve, are they any less guilty than Impact team?

Assuming they did commit some crime (breaking in, or with the data) would the results of the hack be admissible in court? Or would it be fruit of a poison tree?

</comment><comment><USER3> To me, the most troubling thing is that they were charging people to remove their account information and did not actually remove it (from what I have read). If this is true, then how is this not blatant fraud?

<comment><USER4> Simple: were they charging people to unpublish the information from being accessed on the website, OR were they promising to delete the data and go back and remove extant copies of the data from past backups?

Chances are you paid the fee and they marked your info as 'deleted' in the database, effectively unpublishing the information. That would explain how the 'deleted' data could still be leaked.

<comment><USER5> Perhaps this will get more folks to ask what "deleted" really means.

</comment></comment></comment><comment><USER6> So what was wrong with the email archive that appeared to be corrupted?

<comment><AUTHOR> The uploader left the bittorrent swarm too early. Only one client got 100% of the file, and they left before anyone else got 100% too. Some security news (I forget which) reported the orignal seeder left the transmission web ui unprotected.</comment></comment>