The V programming language that will replace Python

TL;DR: An introduction to V programming language and my thoughts about how it will replace Python (or at least I hope that it should replace Python).

1. How I met V

I’ve seen V before when looking at Volt . I was finding a good application that’ll increase my productivity. I’ve seen V twice, the first time it didn’t impress me, but I like Volt and still waiting for its Linux version because I use Linux on a daily basis. At first I was like: “Well it’s just another new language trying to replace the God C++, nothing new here, it’ll just step down sooner or later”.

(God C++ is an expression I’m using to make fun of myself, I also use much Rust, Node.js, Python, Lua, … in my projects.)

I was wrong to myself. The second time I’ve been watching V recently, I was convinced about its development and decided to use V in some of my next projects. I didn’t understand it before and rushed into making a blind assumption.

2. V convinced me

I like LLVM and how it is making things very easy for someone to create a new programming language. It only takes weeks, not years like before when we didn’t have LLVM. These popular languages use LLVM as backend: Kotlin, Swift, Rust, …

What I see about LLVM is that it can help you build a programming language for your own needs faster and target cross-platform code generation easier. Now thanks to WebAssembly, LLVM-based languages are mostly portable though PC, Mobile and Web. I’ve seen a Web demo written in Kotlin too. I have no other comments about LLVM’s performance for the language you build upon its ecosystem. I was also thinking that all new programming languages should be built with LLVM.

V doesn’t use LLVM. Knowing that suddenly makes me realize how complicated LLVM is. In order to develop a programming language, you’ll have to pull massive chunks of libraries and big toolchain into your computer and suffer with really long build time with those. Your code writing becomes easier, yes. But not your whole development pipeline.

V made me think about how efficiently we can still manage for building such a complex software. Its compiler is written in itself, V. Compiler’s source code is automatically generated from V codebase. Interesting, right? Rust and Go also written in itself, but I didn’t find it fascinating as much as V. Because V is so simple! That’s when you feel you can learn everything about it from syntax to the core implementation. You would even want to contribute to V.

I won’t advertise again about V’s great characteristics, it’s already there on its website and anywhere. See it here for yourself: https://vlang.io/.

Most of other languages has failed to make me believe in their long term future. V doesn’t and never will. It’s simple & efficient everywhere that it appears, even its website! If V team can make such a good website like that, no doubt that they can do even more for everything else. In fact, V’s development is going too fast, faster than other new programming languages and even greater than some of popularly developed languages out there. Checkout its GitHub and you’ll see that truth.

3. How I will use V

I’ve joined Discord community of V and talked with members here. I asked about how V was built and the original author of V explained to me. People here are very friendly. It also has Vietnamese channel so if you’re interested in V, we can discuss together. See you there!

I’m also looking for a way to code lightweight web client as a desktop application for my project. Luckily, V is able to. Perfect! I’m not going need Electron anymore. I thought I would build it in Rust, but now I’m sure that it can’t beat V for what I need.

4. V will (or should) replace Python

For a programming language to gain popularity fast, it needs a strong edge. That edge should be able to compete with other languages very hard and people won’t replace their tools easily. Despite the fact that I like V very much, I’m not going to actually replace languages that I use with V.

It’s possible to do almost everything in V, from web, desktop, mobile software to an operating system (vos project). But here is what I personally think:

1. For Web development, I feel good with Node.js, it’s fast enough and convenient with tons of libraries & tools. But honestly I use it to build Web UI and API server only, I don’t trust Node.js for much larger projects.

2. Desktop/Server development: C++ is already powerful for everything in the field and Rust is also getting mature quite fast. I will still prefer C++ for complex desktop software and Rust for computational server dealing with data processing, analytics, etc.

3. Mobile: currently I can’t give comments, I work for Mobile too but I don’t think I have enough experience to analyze it deeper.

4. V’s advantages over Python is: fast, simple to use, easy to compile/package for final product, great live code-reloading feature. Those make me naturally think that V is a great alternative for scripting language, although it’s a real programming language.

5. In my opinion, Python is slow enough to be replaced with something else. I use Python too but I always wish Python could have done better.

6. A large number of Python users are beginner programmers, they’ll keep learning new things and V has chances there. For non-software-development jobs (ie: an accountant writing code for cleaning/calculating data, data jobs in finance, …), V is possible to replace Python. Because these approaches take fewer resource to happen and then one day V will make a bigger change in the industry.

5. Closing thoughts

I believe in V’s future and actually contribute to its development whenever I can. My recommendation to readers is: “Learn the V language, you’ll know another great tool to use when it fits the situation.” Now I’m waiting for V’s webview module to be released and will enjoy all moments working with the best desktop web client framework ever!

Let’s learn V!

Why AI developers should learn Vulkan to make a big difference

Python is not a single solution for every problem. We’re already slower than the world. Develop differently!

A while ago I had an idea of using Vulkan in AI and ML learning, because I think it’s possible and suitable. Then I started to realize that it’s actually a good path. Let’s see why when reading about my idea below and some references from big companies worldwide.

You can use graphics API instead of OpenCL/CUDA to implement GPU-accelerated machine learning algorithm. Vulkan/Direct3D12’s compute shader capabilities are as mature as OpenCL/CUDA, especially Vulkan now can run on most platforms, even works well on Mobile (Android/iOS).

Some benefits of using graphics API in AI development:

  • Integrated image processing with GPU’s programmable pipeline. While with traditional GPU compute API you must write image functions manually, transforming pixel by pixel. Vulkan already understands your image and GLSL shader have many built-in image manipulation methods. You’ll have bigger and more convenient image processing libraries.
  • Better visualization: you take your GPU data and render directly to the screen, in 2D or even 3D to see how your AI behaves in real-time
  • Rich tools: debugging will be easier with graphics debugging tool, you capture and inspect your real-time AI frame by frame, detect bottlenecks, GPU wait, … to improve your AI power

Using API like Vulkan alone is already a boost for your AI, but there’s more. Companies like NVIDIA will make it even better for us. Recently a blog post has been published by NVIDIA engineers, instructing you to speed up neural network training time using a Vulkan extension. Read it here.

I know that this idea is still new to you, but it really opens up many chances in the field. Anyways we at PRIME-tech ourselves are researching multiple “Vulkan for AI” topics and will show you more details in the future. One of our targets is to pioneer for true technology development in Vietnam.

5 signs that prove you’re a professional programmer

Share this to detect your heroes to follow and team up!

– You read software specifications: when your work is deep enough, you’ll realize that tutorials and manuals are for beginners of that field. Working with complex software requires reading though long and detailed specifications.

– You participate in various mailing lists: in general, people who don’t use email properly are low-skilled (especially writing, if you can’t write, it means you can’t produce from your thinking and your thinking is probably wrong). Mailing list is still the way that organizations use to help and communicate with developers. Or at least you should subscribe to some lists that deliver valuable knowledge for you to learn more.

– You work less: when you’re not smart enough for a problem, you only have 1-2 ways to solve it. That easy method often costs you more time sitting in front of a computer. A problem is solved quickly only if someone has come up with multiple solutions and picked the most efficient one. For example: sometimes bad software design forces you to write bad code so you can’t use more bad code to prevent errors, in that case you must validate your design when a problem shows up. And remember to protect your health since much work is never good. Live long to create more technologies.

– You have side projects: it could be your own projects, or other people’s / open-source projects. It confirms that you have ability to work on different software topics. Being a good code writer is not enough to excel in your career. You need to know how to start a project, communicate with other developers, make plans, control project scope, etc.

– You name your own title: don’t fear programmers from other companies, they may just sit there and write code like monkeys in the jungle. Companies tend to give employees those titles such as Expert, Leader, … mostly to make them proud so they’ll work more. You must understand your values and keep building so they would fear your name. The professional one should be strong enough to lead other people. Prove your knowledge beyond code and help the others to advance. Trust yourself and develop your own career as much as possible.

 

Original post on my facebook.

4.0 Technology in Vietnam: We may never win.

The true face of 4.0 Technology in Vietnam.
We may never win.
Share this to wake your friends up!

Vietnamese programmers are in a mist of computing:
– We barely understand the hardware, it’s hard to learn, everyone wants to make mobile and web applications while good code need to be optimized for a certain hardware configuration, especially in the large system.
– Back-end developers are not very into the hardware too, they like to think about databases, logic, …
– Why knowing hardware is important? You make the code run faster -> more power + less hardware cost. Who stays alive at last will dominate the market. Slow code makes you need more servers = much more money to run and your company dies early
– Python is everywhere and Python is slow (Don’t get triggered, only for example, many things are slow)
– We don’t develop from the root, we wait for people who create solutions for us to apply. Then every other company can do the same. Can we beat the others by doing that?

What is the root? C++ is one of the roots.
Look at top five of cryptocurrencies (market cap) right now:
– BTC: C++
– XRP: C++
– ETH: Go/C++
– BCH: C++
– XLM: C++

That’s blockchain. Next is machine learning:
Tensorflow is written in C++. Most of deep learning frameworks are made with C++ too. If you don’t develop from C++ and only wait for features to come for your language, you’re already slow.
Top companies develop from the root to get rid of dependencies, to go faster and take shortcuts wherever possible. One of the big roots is C++.
And everything is moving to GPU now, it has more computing power than CPU.
C++ is the best language for GPU, since long ago and sticks with GPU forever. If GPU has something new, C++ always gets supported very quickly. This can’t be changed.

You want Python or C#? Wait for people who make it for you from C++. Best companies are made from C++ as much as possible for power boost and energy saving.

Not only AI is coming to GPU, everything is coming to GPU, even blockchain can run on GPU fully soon!

You create new thing, you may win. Start with C++ because everything new and revolutionary starts with C++. Learning Blockchain, AI is good for you, but chances to really shine a light is very low unless you do it differently from the crowd.

Truth: C++ in formal education is dead in Vietnam, it never lived to be honest. No schools/universities, no centers could teach you to master C++. You need to learn it continuously in some years to be able to do something useful with it.

If some person/company wants to get to the top of technology, C++ is likely to be the answer. This post does not concern about other types of engineering.
If you want to get to the mountain top, learn C++.

Original post on my facebook.