Live data from Hacker News

Ask HN: Who is using C++ as the main language for new project?

news.ycombinator.com

111–120 of 199 posts

Re: Ask HN: Who is using C++ as the main language for new project?

#111

All of the recent high-scale data infrastructure projects I've been involved in are written in C++17 or C++20. Mostly fast-twitch analytical database engines and related data processing systems. This is still the go-to language for that kind of systems software, no other programming language is as feature-rich and expressive for that purpose. The other language that gets used a lot is Python for tooling and similar.

Rust is also being used a lot in that space:

https://github.com/MaterializeInc/materialize

https://github.com/apache/arrow-datafusion

https://github.com/pola-rs/polars

Re: Ask HN: Who is using C++ as the main language for new project?

#112
I am (new as in 3-4 years old) - a shared library compiler for a text language, CLI for easy access to compiler and a visual editor for a graph/node-based representation of the text language, used for audio programming primarily in games - built on LLVM (For the compiler) and JUCE (for the graphics).

The shared library has few dependencies outside of LLVM so that it can be as portable as possible, and the runtime hooks are all C and only depend on c stdlib so maximum portability, even to embedded systems.

Video game stuff still frequently uses C++, and also to support consoles, handhelds, quest/etc, C++ just makes sense because it's supported EVERYWHERE (though the compiler doesn't need to run everywhere, so that's more a concern for the runtime).

We're using conan which is FANTASTIC and finally a good package manager for C++, and C++17 (will upgrade to C++19 soon, but still not quite stable/widely supported enough for my taste).

In my world, this whole "C++ is no longer a viable option" meme is just not true. We all hope that Rust or what google is working on might replace C++ but when we discuss it we're talking on the order of 10+ years.

Re: Ask HN: Who is using C++ as the main language for new project?

#113

I've started using C++ for the REST backend for a mobile app recently. I'm using restinio for the REST layer (sadly deprecated a couple of months ago, but it still seemed like the best option in terms of clean interface) and sqlite for the DB layer. I've architected it all so I have a purely insert-only and order-independent DB on the write-side, so litestream was seeming like a good fit for single-writer, multiple r…

Don't know your use case, but C++ for a REST api seems extreme overkill. Any performance benefits would most likely be nullified by network latency

Unless you want to serve thousands of requests per second on the toaster you just installed NetBSD on. In that case a well written C++ socket multiplexer is a good choice.

Remember that network latency only affects, well, latency. Throughput is another matter.

Re: Ask HN: Who is using C++ as the main language for new project?

#114
post #66

I'm using C++ for a minecraft clone that I've been tinkering on for the past year[0]. I also plan on using embedded lua for scripting, and I'm using RML UI for game HUDs, ImGui for development tools, and OpenGL for graphics. I use premake for my build system but plan on switching to CMake. I'm also using it for an animation tool[1]. I've been using 3Blue1Brown's Manim (written in Python) which is amazing, but it lack…

I'm curious but what's motivating you to move from premake to cmake? Usually people seem to be happy with premake

Re: Ask HN: Who is using C++ as the main language for new project?

#115

I'm doing a (free) backup system (just a hobby, won't be big and professional like dropbox) for PC, Mac and Linux. This has been brewing since april, and is starting to get ready. To me the choice was between C# or C++, but I ultimately chose C++, because while C# is much faster to code in, when there is a problem, coding directly against the OS, I have much more control in what actually happens and in what dependenc…

I assume this is a command-line application? c++ does have a cross-platform GUI problem, unless you pay for the Qt license that is, which is itself a heavy ecosystem to master.

Re: Ask HN: Who is using C++ as the main language for new project?

#116
In the last year:

Salt spreader. Micros running C++ and a UI on an RPI with Qt/C++ for the controller.

Heat gun. Micros running C++.

Afib detector. Micro running C++.

Flavor dispenser for a large coffee company. Micos running C++, UI on custom Linux SOM with UI in C++ / Qt

Medical imaging device Qt / C++

Re: Ask HN: Who is using C++ as the main language for new project?

#117
post #66

I'm using C++ for a minecraft clone that I've been tinkering on for the past year[0]. I also plan on using embedded lua for scripting, and I'm using RML UI for game HUDs, ImGui for development tools, and OpenGL for graphics. I use premake for my build system but plan on switching to CMake. I'm also using it for an animation tool[1]. I've been using 3Blue1Brown's Manim (written in Python) which is amazing, but it lack…

I'm curious but what's motivating you to move from premake to cmake? Usually people seem to be happy with premake

I like premake, but almost every library I try to use already uses CMake or make. It just becomes a hassle translating their CMake scripts into premake or manually including the appropriate source code in the build.

Re: Ask HN: Who is using C++ as the main language for new project?

#118

I'm doing a (free) backup system (just a hobby, won't be big and professional like dropbox) for PC, Mac and Linux. This has been brewing since april, and is starting to get ready. To me the choice was between C# or C++, but I ultimately chose C++, because while C# is much faster to code in, when there is a problem, coding directly against the OS, I have much more control in what actually happens and in what dependenc…

I assume this is a command-line application? c++ does have a cross-platform GUI problem, unless you pay for the Qt license that is, which is itself a heavy ecosystem to master.

No, it's a GUI application. There are ways of making the GUI parts cross platform, like webview and such. But the GUI parts in this application are native to the OS. "Only" the core functionality is shared between platforms.

This is also something I have been battling with in the past. All the cross GUI platforms have their quirks and problems and varying OS dependencies you are then married to. Since this is my own personal project, I decided cut the knot differently and just do the GUI parts native.

So far, I have found it be incredibly liberating. Instead of trying to instinctively shoe-horn functionality into something that will fit on all platforms, the code itself becomes much clearer when all the really "abstract" or "logic" code is completely separate from the platform code.

This is of course best practice anyway, but the decision to split this way made separation incredibly obvious. When the "logic" parts code cannot communicate with OS resources, you aren't tempted to put stuff where it doesn't belong.

Re: Ask HN: Who is using C++ as the main language for new project?

#119

Started a new job which requires me to know c++ so I’m learning that. Half c# and half c++. Bought some books. - Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 - C++ Concurrency in Action - C++ High Performance: Master the art of optimizing the functioning of your C++ code If anyone has any recommendations would love to hear them.

Professional C++ 5ed is a good one covers c++17 and c++20.

I also bought the c++-core-guidelines book that is better organized than the website.

Re: Ask HN: Who is using C++ as the main language for new project?

#120
I'm currently considering c++ for a terminal emulator project. I explored rust first, but some crucial libraries don't have rust port or have a rust port, but with bugs.

I don't have the energy to resolve these issues myself. I guess at least my first version will be in c++.

Post reply on HN