History of Computer Languages (funny)

C++. Concepts

One more reading on what’s going on with the C++ standard. Concepts were proposed before, but now TS (Technical Specification) became concrete and may become a part of next standard. One thing I specifically like about concepts is that you can specify template constraints. Why do you need them? It’s simple. Constraints will help you to get human readable error messages from compiler instead of 100 lines garbage that current STL errors generated by compilers.

Anyway, Andrew Sutton’s article on what’s going on with concepts and why we need them:

http://accu.org/index.php/journals/2157

Writing Good C++

Yes, C++ is evolving. 🙂 C++14 is almost here and C++17 is rising in the horizon. I find it amazing that so far all attempts to make language somewhat more friendly and safer looked like islands of resistance created by small teams all around the world. And they were disconnected. Coding standards, numerous books on good practices, – we saw them all. We have not seen the C++ father Bjarne Stroustrup saying anything on this subject. I obviously ignoring his book “A Tour of C++” and his conference speeches, but those were conceptually still islands in the ocean. C++ is huge, standard is 300+ pages, last Bjarne’s book is more like a monument to the greatness of C++, but can’t be used neither as a manual nor tutorial.

Here we go. New initiative from The Father to define good practices and guidelines for modern C++.

Here’s his deck from keynote:

https://github.com/isocpp/CppCoreGuidelines/blob/master/talks/Stroustrup%20-%20CppCon%202015%20keynote.pdf

Interestingly, right from the beginning they came up with “good library” called GSL. Static syntax validation tools is coming (good!).

Github link to GSL: https://github.com/Microsoft/GSL

His speech on this subject at CppCon 2015. I like Bjarne’s philosophical view on coding standards. Yes, we hate them! 🙂

NSMutableArray implementation

Stumbled upon on very good deep dive into NSMutableArray implementation. When I just started working on iOS and MacOS development, somebody told me that NSMutableArray is based on a circular buffer, so it’s very efficient for queues and stacks as well. I remembered that and as 99% of engineers never really cared about details. Besides, Apple never released sources for its core classes. However curious minds, as usual, got to the bottom of the issue.

Here’s very well written article on implementation details.

Swift critique from Rust designer

In nutshell Rust is another evolution of C/C++ by Mozilla Foundation. Another attempt to create a cleaner and safer language with minimal performance overhead (POD and static types, move semantics, well defined object format, small runtime, efficient use of pointers and references etc). Along the line with D, Go, Swift and likes. I’m not at the position of covering all ins and outs of Rust, as I’ve not written a single line of code in it, but since I’ve started gradual migration toward Swift, I had to keep eye on its conceptual competitors (or relatives). While doing that, I found good article from Rust designer Graydon Hoare about where he compared Swift with Rust. Pretty interesting overview. You can find it here.

More on Rust:

https://www.rust-lang.org/

http://rustbyexample.com/

Swift 3.0 changes

Erica Sadun wrote a good article on what’s coming up in Swift 3.0. Funny, how many people noticed that “++” and “–” operators are going to be cut. Honestly, it’s not important thing in the world of iterators and dynamic arrays. However, I don’t like the trend of calling indexes evil. People, do you understand what random access in arrays existed for!? How about matrixes and vector operations? Programming is not just about traversing sets and maps.
Another takeout from the Swift 3.0 is that most of improvements are in the department of code styling, syntax sugaring, interoperability API’s and future versions of Swift, meaning that language finally becomes stable. It’s a good thing, right? 🙂

Anyway, here’s the article.

Free Icons for Web Designers

Speaking of the web design. If you’re looking for a free vector art (mostly icons), you can look at this list of sources, which was put together by this guy:
https://habrahabr.ru/post/276249/
Text is in Russian, but self descriptive and does require translation really.
Thanks to Sergey Vakulenko for the find!

HTML and CSS Editors

HTML Editor

Many people google HTML and CSS editors and get basically the same list of articles. If you’re tired of articles talking about obscure commercial product or Aptana or Notepad, you should look at this article:

Very informative and simple. The reason why I started looking around is that I don’t have Dreamweaver license anymore and not going to buy it and because I’m tired from Aptana. It’s ok to use for syntax checks and highlights, but I wanted something more visual. I don’t expect a miracle of discovering full WYSIWIG editor for free, but it’s be nice to find something that can do CSS and div’s editing visually. Your suggestions are welcome as usual. I guess, I’ll return to this subject eventually again.

Google Depot Tools bug on iOS

Hope it will save some time for you. If you see

AssertionError: Multiple codesigning identities for identity: iPhone Developer

and don’t know how to fix, when building webrtc, libyuv or any other libraries with Google’s depot tools, simplest fix you can do is just remove the assertion. You don’t need developer’s profile and binary singing for libraries. That’s obvious for you, but not obvious for the script. 🙂 In my case, I found the assertion in the /chromium/src/tools/gyp/pylib/gyp/xcode_emulation.py.

P.S. Found similar post on Stackoverflow.

Javascript’s this is nuts

It’s not going to be a rant as title might suggest you. I’ve been reading a book about Phonegap (now known as Apache Cordova), and came across a cool remark in the text:

Javascript’s this is a bit
nuts, so it’s always better to refer to a variable that we know
will always refer to the object.

I smiled. This remark was referring to a simple code that had this assignment:

self = this

I’ve learned about JS “this” the hard way. Indeed, it’s not intuitive and goes against what developer learned from other languages. Anyway, I thought I know how it works well… until I read this quote. I went back online to refresh my knowledge, just to learn the damn thing again. 🙂 Anyway, in case if you’re in the same boat, old friend MDN (Mozilla Developer Network) is your friend. That’s the best article about “this” scope, strict and non-strict mode (who came up with these names!?), syntax for event handlers etc.

Here’s the link

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.