HN user

jguegant

314 karma
Posts12
Comments57
View on HN

You're also introducing a reference count, but that's besides the point.

How so? RAII absolutely doesn't imply reference counting.

Frostbite is its own sub-company within the E.A umbrella. While Frostbite is used by the titles from DICE and we share parts of our offices, the two companies are rrally distinct for a couple of years now.

Frostbite had roughly 300 employees when I joined 2 years ago.

Some other anecdotes:

The official server was stolen due to horrible code-practice (C++-wise and software engineering in general), like having plain SQL-injections when creating characters. Worst! This was one of the reason that made the company (TriggerSoft) behind the game go bankrupt. The game was full of security holes back in 2005. This made the game's economy being broken due to few cheaters, created few horrible roll-backs and such. This drained the player's base from the game.

The "simple C++ server" osrose was also plagued by security issues and technical issues. Up to a point that people preferred to patch the official server with dll-injections + assembly rather than trying to make this "simple C++ server" work.

That's not really giving the full picture of ROSE online!

- The official server (arcturus) is awful to work with code-wise. But all the decently big private servers uses it because at one point we only had the binaries of it and it worked out of the box. When the source started to leak too, it was easier to continue forward with that thing.

- The "simple version" which I am assuming you refer to is os(i)rose. This was the only thing you would get BEFORE the official server got leaked. It had some momentum simply for being there since roughly 2006. It was based on Brett19's code which at the time was a 14-something teenager. The same brett that now works on a fully modern C++ codebase that is decafemu.

- The Modern C++ version which if I remember is worked by few folks from osrose came out something like 2 years ago. Passing 2015, the momentum for the game is close to none. So yes, no one will even spin that codebase.

Not the reason. Especially when the author includes headers like: #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <arpa/inet.h> #include <linux/ip.h> #include <linux/udp.h> #include <errno.h> #include <fcntl.h>

BROWSERS are really dangerous; if you need to keep your machine secure, you shouldn't use any IMHO. By definition, browsers need to be able to access things such as page content. What would stop someone from writing a browser that captures your bank credentials? Nothing. Obviously no security-conscious user is going to install a bank credential stealing browser. But what about bugs in browsers? If a buggy browser can be made to execute arbitrary code, it is as dangerous as a malicious browser...

At the end, it's a matter of trust in your browser or your extensions.

I dream of the inverse of the react native or electron trend. In this world one would write his application using Qt Quick for all the platforms including the web! Using Emscriptem you would be able to compile your C++ code to asm.js or webassembly and make your application run flawlessly in your browser with WebGL, canvas or HTML5 as a backend. Some people already started working on that: https://blog.qt.io/blog/2015/09/25/qt-for-native-client-and-...

Even using React, Redux, flexbox layout and all these fancy frameworks, I still find the web stack a huge hack that tries to bend HTML and CSS to recreate the feeling of an app (like SPAs). QML is simply more expressive for layouts and bindings.

Check out for swish in Sweden: "According to Arvidsson, the Swedes love Swish so much, it’s already revolutionising the local banking system, with several major banks refusing to accept cash at all, and as of late last year, four out of every five purchases in the country were being made electronically."

Payment by phone is already a big thing here.

I don't know for QR codes, but swish payments (pay things on phone) are very popular in Sweden. I can swish my local fruit seller, the bar tenders and my friends in a matter of seconds.

As far as I know Sweden is generally more advanced in this kind of technologies than what I see in Hong-Kong.

R̟̞̣͕̣͋̄̾̔ͭṷ͇̞̘͉ŝ̹̬ͮ̂̐ͭ̌ͯtw̦̏͒͗í͒̏̄n͉̖͋ͥ̒̒̚͞n͈̣̘̿ͪͭè̡ͤͬ̔ͭ́ͦr̭͌̿̈́ͦ͑͗s̛͈̣̱̱̦͗ͨͫͥ,̪͚̙̖̥̊͟ ̘̺̦̱̭͍͊ͬ̀̚t̰̖̤̩̱̥̐̌̄̔͐̚h̲̬̲ͤ͗̓ͫ́ͪ͠e̝̜̺̟̠̿̀̚y̼̲͌̑ͭ̄͞ ͊͐͗͋͡a̬̘̮r̰̬̉ͦ͗͐̃͠e͍ͧ͊̾ͮ͗̓͜ ̨̮͕̠̓ͫͮ́͋̑͌c̳̭̪̤͌ͧ͐̇̾ͬ̒ȏ̱̰͓͓̞̰m͚̺̤̪͚͊ͧḯ̜̙͔̗̮̻ͪ̓̓n̵̬̫͔̘̰͎͌̒ͫ͛̎̇̾g̮͇̼͖͇̊̍͒̿̑!̙͞

More seriously, the problems (exceptions and rtti) that you are mentioning are actually explained in this tutorial. One can disable them and still enjoy a great part of C++. Rust might be better on some other features though.

Isn't it the way Qt + QML works?

Last time I checked, this stack wasn't particularly slow. I would also express the same style in much less lines of code than HTML + CSS.

Not exactly a passport check but more an identity check. As French, a simple id card (French one) was enough for us to cross.

In that case, the blog post was explicitly comparing Rust and C++. It is not surprising that the comparison goes both way.

I am talking about the HN topics like "How to implement a packet tracer in C++" or "Optimize std::vector with C++14" where invariably a comment like "Who use C++ in 2016 when you have Rust?" spawns. Rust is amazing, but that doesn't make it the de-facto answer to all the projects. Some people might still want to increase their skills in their day-to-day language like C++, even if they are aware of Rust awesome features.

The C++ community seldom "flames" the Rust one. On the other hand, I often see C++ threads on Hackernews ending with people bashing this language ("C++ hell", "dirty language", "dying soon") and bringing Rust on the table.

It is pretty frustrating when you actually want to exchange on this language, far from dead, and enjoyed by some.

As a C++ enthusiast, I wouldn't use the words "throw knowledge". All the concepts you can find in Rust are almost matching one to one to a C++14 equivalent (albeit pattern matching for instance). The difference being the enforcement of these good practices by the compiler. It would most likely take me 2 days to read the latest rust doc and 1 month of practice to be proficient.

Thing is, it's a bit like switching from Python 2 to Python 3. Why would I move to this new environment where I would need to recode everything from scratch? Python 3 will take decades to overthrow its predecessor, how long will it be for Rust? Will it ever succeed? Will the C++ committee react and borrow some of Rust awesomeness? Can I find co-workers willing to learn Rust?

If you are using a simple type (int, unit...), it could be optimized by the compiler.

But if i is an iterator, you will create an unnecessary copy. Maybe a special treatment can be done for STL types. But in some other cases, expecting ++i's behavior when doing explicitly i++ would surprise the user.

The Path to Rust 10 years ago

"and especially in the domain of networked services, it is rapidly replacing C/C++."

Rapidly? Where?

I already saw such a colleague training hard at competitive programming, everyday. Yet, he wrote that kind of C++ code:

  ressource AClass::CopyACriticalRessource()
  {     
     {
        std::lock l;
     } // Optimization for the lock.
     
     return ressource_;
  }
Having a good understanding of every aspect of your architecture, taking your time instead of rushing for blazing fast (O(1)) but hacky solution, always having in mind that someone must have already solved your problem... these are some valuable skills not coverable during a 1h interview in front of a white board. I would like someone googling a solution in front of me during an interview, trying to UNDERSTAND it, check its complexity, compare it with other search hits, adapt it to his problem, ask for my review.

The best technical interview being a homework with enough time for a normal human being, requiring tricky algorithms to solve it in a fancy way, a good architecture and great computer-science knowledge in general. Afterwards, a code-review/interview of 1 hour with debriefing on all the choices.