[HN Gopher] Ask HN: Getting back to C++ and looking for ideas ___________________________________________________________________ Ask HN: Getting back to C++ and looking for ideas Hello .. I used to code C/C++ about 15 years ago, and mainly used it for MFC/Windows programming. I spend years doing Java and enjoyed using it for Android development. I since moved to Python for most of my work (mainly working on deep learning). I'd like to get back to C++ again .. I mostly remember the language but need to dust off details like STL, generics, libraries, etc. Here is my problem .. I can't figure out what sort of tiny programs are a strong fit for C++ today. I don't want to build C++ or work with some large existing code base. Best place I can think of where C++ would be a good fit today is Cuda dev. Is there anything else that I am missing? I'm desperately looking for something to get excited about wrt C++ .. would appreciate advice! Author : throwawaybbq1 Score : 15 points Date : 2021-05-08 21:46 UTC (1 hours ago) | adsharma wrote: | Code in python and generate C++. That's my happy place. | dvfjsdhgfv wrote: | How do you mean? Via Shed Skin? | lxtx wrote: | Rather go with C, or as was pointed out in this thread, Orthodox | C++. | | Less time being bogged down in the quagmire of C++ "features". | saurik wrote: | Instead of searching for a project that you would do only to use | C++, why not decide on something you would want to build anyway | and then build it in C++? | joshbaptiste wrote: | https://github.com/SerenityOS/serenity 32bit OS being built in | modern C++ by a friendly creator and community who regularly | streams on Youtube | stephc_int13 wrote: | In my opinion, Orthodox C++ is the best and sanest C++ style | nowadays, and it is not too difficult to learn. | | https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b | | I would advise to read the code and tinker with Dear Imgui. | | https://github.com/ocornut/imgui | rsgrn wrote: | I did this recently too. You might want to review the language | changes from C++11 and C++17. | | You could try writing a raytracer, or physics sim, or small tools | that would have been difficult/annoying previously (like dealing | with JSON). You could revisit writing win32 apps. The WebView2 | lib (which is Edge) is self contained-ish and interesting to | learn with (lots of async). | monkeybutton wrote: | Are there any little devices that you'd like to make or tinker | with? C/C++ is still big in the embedded space and that's the | first use case that comes to mind for me. | | I definitely empathize with your post since I haven't done any | C++ in 10 years and I'd like to get back into it. The last job I | had using it wasn't on C++11 yet and it seems like there's been a | whirlwind of progress since then. | criddell wrote: | If you've been away for 15 years, then you have a lot of great | changes to absorb. I would learn C++20 and not look back. | | As far as projects... I probably wouldn't pick C++ for a tiny | program. | | But if that's what you want to do, maybe check out some of the | new coroutine functionality. Some toy async web stuff might be an | interesting challenge. There are plenty of services with public | REST APIs. Make a toy client in C++. | melenaboija wrote: | Distributed computations with new stacks such as gRPC+Protobuff | or Flatbuffers | eklitzke wrote: | I was in a similar position to you a few years ago. | | My recommendation is to first read Scott Meyer's book "Effective | Modern C++". This will give you a tour of the language features | in modern C++ without wasting your time teaching you the basics, | which are going to come back to you rather quickly anyway. It's a | short book and it's not going to cover _everything_ you need to | know in modern C++, but you can read it quickly and after you 've | read it and done a little C++ programming you'll know which | things you want to dive into further. | | As for what kind of programs to write to get excited about C++, I | personally feel like systems programming is the area where C++ | really shines, and I would encourage you to find some kind of | project in this area that excites you. For example, write a | simple high-performance key-value database using mmap. Write a | httpd using boost::asio or even just using epoll directly. | Something like this. There are a million projects to choose from, | just pick something that you find interesting. | | With regard to CUDA, while it is true that it's an area where | people use C++ today it's also fairly different from writing | regular C++ programs since you need to use different tooling and | the programming paradigm is a little different. If you're really | passionate about CUDA I don't see any reason why you couldn't | start there, but I think it would be easier to do regular | userspace C++ programming first and then transition into CUDA | later if you are interested in it. ___________________________________________________________________ (page generated 2021-05-08 23:02 UTC)