• 0 Posts
  • 56 Comments
Joined 2 years ago
cake
Cake day: July 3rd, 2023

help-circle


  • The one use case is running STUN/TURN server for NAT hole punching, that requires two separate servers, or one server with two IP addresses. You will only need that to run masterserver for games that support hole punching, or to run VoIP telephony / teleconference server.

    Another use case is reliability, when your server is connected to several network providers, it will keep working if one of them has an outage, and will naturally have a different IP address for each network link. But your VPS does not have several network links, otherwise they would advertize that in bold red letters.











  • printf is superior and more concise, and snprintf is practically the only C string manipulation function that is not painful to use.

    Try to print a 32-bit unsigned int as hexadecimal number of exactly 8 digits, using cout. You can do std::hex and std::setw(8) and std::setfill('0') and don’t forget to use std::dec afterwards, or you can just, you know, printf("%08x") like a sane person.

    Just don’t forget to use -Werror=format but that is the default option on many compilers today.

    C++23 now includes std::print which is exactly like printf but better, so the whole argument is over.



  • Linux desktop on Android have been attempted many times with variable success, and it goes way beyond command line, see UserLAnd

    It brings all Linux desktop apps to your phone, and all you need is Bluetooth mouse.

    Do you need to edit an audio file? Try looking on Play Store, every audio editor has ads and subscription and offers only cropping and equalizer. But what if you need cross-fade? Open your Linux VM - bam! Audacity! All the audio editing tools you can ever need, and ten times more that you’ll never use!

    Do you need to make a meme? Go download some shitty meme maker from Play Store, that will only let you add text to ten preset images. Or get a photo editor that has twenty sepia effects but won’t let you combine two images. But a simple sudo apt-get install gimp command in your Linux VM, and you get a pixel-perfect image editor with transparency support, layer support, and a thousand brushes, and you can even plug a graphics tablet into your Android tablet and have stylus pressure making brush strokes of different width, or just use an Android tablet with stylus support, the pressure works there too.

    Do you want some more esoteric thing like sqlite3 database viewer? Well, Linux VM is your only choice.

    It becomes even more important if you want to buy a cheap Android tablet and ise it as a kiosk for some business. Run the backend server on your Linux VM, run the frontend in the Android web browser, and you don’t need to buy an expensive POS terminal.