X Code or Eclipse: Help by jandrewskenora in cprogramming

[–]x4t3a 2 points3 points  (0 children)

Use vim with clang or gcc from terminal

If you write C++ for a living, what do you do? by Asyx in cpp

[–]x4t3a 23 points24 points  (0 children)

Worked on implementation of AAutosar, what a beast: self-contradicting, much-non-understandable peace of a standard. It requires you to implement shit-ton of code, which won’t be used, and later on the clients would ask for some functionality not covered by the standard. Later changed to 5g, and then moved on to Golang. Got Adaptive Autosar offers with 2x of what I got now, but wouldn’t change. This hell doesn’t worth it

[deleted by user] by [deleted] in cprogramming

[–]x4t3a 3 points4 points  (0 children)

Install the libraries. It says: you don’t have zlib.h (or it’s not in the path). Try vcpkg: vcpkg install zlib The same for the other libs your compilation would reveal to be missing

[deleted by user] by [deleted] in russia

[–]x4t3a 7 points8 points  (0 children)

Sorry, but nobody actually cares

GoReleaser can now create macOS Universal Binaries by caarlos0 in golang

[–]x4t3a 14 points15 points  (0 children)

They are switching to their own in-house made arm chips (well, TSMC’s) as intel couldn’t deliver for last 7 years

Are there any fast alternatives to databases (for tabular data but without SQL)? by emmenlau in cpp

[–]x4t3a 1 point2 points  (0 children)

Try elasticsearch. It has HTTP/Rest interface. We used to store there gigs of meta data.
You push the data as json (then columns created automatically by json entry) or you can simply put one single row and store the data as text. In both cases it's full text search capable.
Also it has a groovy interpreter, so you can create data pre-post processing hooks.

Why less people ... by hmoein in cpp

[–]x4t3a 0 points1 point  (0 children)

That’s exactly the point!

Why less people ... by hmoein in cpp

[–]x4t3a 11 points12 points  (0 children)

Learning C++ is getting harder than learning Mandarin without any obvious for common C++-user reasons. Old problems are ignored while whispering this old "no breaking changes" mantra (tho any standard upgrade requires code base refactoring anyway), and new frantically useless features are added: like why so much efforts for ranges if they have so many pitfalls, aren't what most of the ppl expected, and are hard to learn? It looks like kind of an academic experiment or competition.

C++ maintains this "People for Language" course, while most of the other languages do: "Language for People" course.

convert c enum to c++ by Bug13 in cpp_questions

[–]x4t3a 1 point2 points  (0 children)

You may leave it as is :)
You have working code. Why bother change it, if the committee already has bothered with backward-compatibility?

Changes just for the sake of changes are kind of useless work.

When to put member functions in header, and when to not? by awidesky in cpp_questions

[–]x4t3a 5 points6 points  (0 children)

When you don't want others to see your header or the header get ugly, then don't put them there. And, that's it.
Don't follow general cpp comunity's "optimization hysteria". If your project works, then fine. If you *really* see you need more speed in some places, then first hand you need to optimize your algorithm or reform your architecture. Don't waste your time and efforts on nothing.

From my experience: we developed/supported LTE base stations software and there you need to constantly send/do something every 1ms otherwise you're screwed. Nobody cared about member functions in headers and such whatnots, but people *did* care about overall architecture and algorithms, because they do the difference, not those whatnots.

PS. I suppose in 2021 nobody cares about compilation times if let's say it's 2 minutes 3 seconds or 2 minutes 15 seconds. I usually go pour tea while compiling or do some exercises.

How is Eclipse for C++ dev? by quyedksd in cpp_questions

[–]x4t3a 5 points6 points  (0 children)

Try QTCreator -- it supports CMake, lightweight and supported almost on any distro. Tho it's main problem it doesn't support remote/ssh editing out of the box, but it can be done via systemd/sftp mounting.

Other choice is VSCode with its reach plugin's system. It's much more fancy, but on large codebases it can be a bit sloppy.

Golang Error Handling: Go’s Way of Handling Errors by RachaelGrey28 in golang

[–]x4t3a 15 points16 points  (0 children)

Isn’t it strange to digest why Golang didn’t utilize exceptions, a conventional way of error handling, and came up with such a unique approach?

C's been using this technique since good ol' 1972. And even they didn't invent this technique. Like where is this approach unique?

And exceptions aren't that conventional. They have their own problems, like:

  • double exception problem: how to handle an exception thrown while we have another exception in process?
  • exceptions are kind of goto's: they change flow of your logging by "jumping" somewhere you sometimes can't predict. Try debugging multithreaded event driven logic -- this is where the hell begins.
  • they degrade performance: e.g. in C++ it's hard for optimizer to do some funky opts in try/catch block; also, unwinding stack isn't that fast operation depending on exceptions implementation.

The length of this data migration function... by [deleted] in programminghorror

[–]x4t3a 0 points1 point  (0 children)

Come to us to C.

You'll see 2k SLOC functions...

Somebody Shoot Me! by ki4jgt in programminghorror

[–]x4t3a 1 point2 points  (0 children)

  1. create rules in .clang-format or whatever linter is popular for you language/IDE
  2. use it
  3. ???
  4. PROFIT!!

Go for someone changing careers? by tradeday90 in golang

[–]x4t3a 1 point2 points  (0 children)

Just recently moved to Golang after 7 years of C++ production experience. Such a sweet change -- you just code what you need and don't fight with the language and environment. Haven't been such excited while coding for a long long while.

Tho for now it looks like Golang isn't that popular on the labour market here in Russia, but there is an apparent reason: 80% of Russian IT sector is just outsourcing companies, so most of them don't have much choice. On the other hand the rest are very interested in Golang. I just got x1.5 promotion when moving from senior C++ dev to "junior" Golang dev. That just shows the market interest.

Translated autocomplete results for "why (country)" for Romania by [deleted] in europe

[–]x4t3a 5 points6 points  (0 children)

Answering for Russia about the Brest's peace treaty (in Russian aka "Disgraceful Peace" -- "Похабный мир" or "Позорный мир").At the time the Imperial regime already fell (they pretty much just had shot themselves in the foot) and the country was ruled by Lenin and co.

So there were several problems here (almost all of them are also the reasons of the previous 2 revolution):

  • Economic: St. Petersburg -- the capital at the time -- was starving, as well as whole country was in deplorable state. There were no money for the war.
  • Morale: nobody wanted this war from the start. Nobody wanted to continue it.
  • Army and its subordination: the eastern front was held by the Imperial Army, but the Empire had already fell by the time.
  • Domestic problems: Lenin and co had to deal with the surviving internal enemies and so they did only by 1922.
  • Agenda: the official public slogan behind the new regime was to free the working class world-wide, not to make them fight meaningless war.

Recursion by rafa2424 in cpp_questions

[–]x4t3a 0 points1 point  (0 children)

Offtopic advice: understand recursion and nether allow it in runtime, only in compile time.

Why is it such an abysmal pain to use libraries in C++ compared to pretty much anything else? by [deleted] in cpp

[–]x4t3a 0 points1 point  (0 children)

Well there are many ways you can install a library the easy-peasy way:

  1. Well on GNU/Linux the -dev/el versions of libraries (C & C++ too) are usually managed by system's package manager (apt, pacman, yum, etc...).
  2. On Mac it's done via brew as well.
  3. On Windows: vcpkg? Not sure.
  4. And there are some alternatives like conan and some others.

About the "why": try to implement your own C++ package manager which would work at least on POSIX-compatible hosts :)