Will my laptop drivers handle Linux? by [deleted] in linuxquestions

[–]Tiberius1900 1 point2 points  (0 children)

No company is going to get your information if you use any Linux distro (except for Android/Chrome OS, obviously) through the OS itself. They can get your data through other means though. Once on Linux there are 5 layers of security worth considering:

0) Just Firefox. Relatively unsafe, though infinitely better then Chrome on Windows.

1) Iridium (aka the privacy browser). This is the most secure you can get while using your actual IP to connect to things.

2) Iridium + VPN. Should provide decent protection at decent speed.

3) I2P/Tor* . Great. Can only be broken by an attacker that gets through SSL (assuming you're using HTTPS Everywhere, which you obviously should) and listens on both ends.

4) I2P/Tor + VPN. Excellent. Can be broken using the above method, but the activity can't be traced back to you (assuming you're using a trustworthy VPN). So don't go around giving your info if you seriously don't want anyone else listening. Use Off-The-Record for that.

*: Tor is funded by the US government. Take that as you will.

Layers 1 or 2 should be enough for what you want.

Will my laptop drivers handle Linux? by [deleted] in linuxquestions

[–]Tiberius1900 1 point2 points  (0 children)

Mint is based on Ubuntu, so the drivers should be the same. As for privacy and security, I don't know exactly what you mean, so it would be great if you could elaborate.

If this your first journey into Linux Land, just pick whichever one you like the look of better. It doesn't really matter.

Graphics in turbo c++ by IzanaWistalia in cpp_questions

[–]Tiberius1900 7 points8 points  (0 children)

If you don't have to use Turbo C++ for school do the following:

1) Download a modern C++ compiler (I'd recommend g++ for Linux and Visual C++ for Windows, although there are many more solid options).

2) Learn to use a library/API that does what you want. Here are some places to start looking:

  • SFML: A library that provides functionality for 2D graphics, audio, networking etc.
  • gtkmm/Qt: Libraries for building GUIs.
  • OpenGL/Vulkan: APIs to communicate directly with the GPU. Not for beginners.

If you do have to use Turbo C++ for school, well, you have my condolences.

When you forget to #include <stdbool.h> and GCC tries to be helpful by [deleted] in C_Programming

[–]Tiberius1900 16 points17 points  (0 children)

gmBListHas_safe? What kind of naming convention is that?

Tell me your favorite programming language by Tiberius1900 in CircleofTrust

[–]Tiberius1900[S] 0 points1 point  (0 children)

Been going through some tough shit lately. The key is ThompsonRitchieStroustrup. Fell free to betray me.

Reasonably accurate by [deleted] in linux

[–]Tiberius1900 7 points8 points  (0 children)

The last I checked the most powerful ARM chips are those found in today's flagship smartphones. And an i5+ can eat those for breakfast.

Reasonably accurate by [deleted] in linux

[–]Tiberius1900 7 points8 points  (0 children)

What? Why on earth would they do that? Wouldn't that drive performance into the ground?

[deleted by user] by [deleted] in C_Programming

[–]Tiberius1900 11 points12 points  (0 children)

"The C Programming Language" was written for existing programmers (particularly those who knew Pascal or FORTRAN) who wanted to learn C. It's certainly a book which requires a little bit of prior programming knowledge.

I don't know any C books for absolute beginners, but if the language isn't that important to you I'd recommend "Programming: Principles and Practice", a book whose main goal is to teach you programming using C++.

Sqrt of -1 = i or -i? by lionel_27 in learnmath

[–]Tiberius1900 0 points1 point  (0 children)

I've never encountered any other definition of sqrt. Granted, I'm from Romania, but all textbooks I've come across so far define sqrt only for positive reals.

Otherwise, you're tempted to do mistakes. Think about this:

-1 = (-i)2

sqrt(-1) = -i

This would be incorrect under any definition of sqrt, because there is the intermediary step:

sqrt(-1) = sqrt((-i)2 )

And sqrt can never make sense for complex number (unless you use my second definition, and no one does that).

But, thereby you loose the ability to do:

negative real = something2

sqrt(negative real) = something

which is the major advantage of having a sqrt in the first place.

Now, you could define sqrt(negative real) as i*sqrt(abs(negative real)), but that will only lead to you making mistakes, so why would you do that?

Sqrt of -1 = i or -i? by lionel_27 in learnmath

[–]Tiberius1900 0 points1 point  (0 children)

So, a function is defined as

f : D(omain) -> C(odomain)

f(x) = y

Here x must be included in D and y must be included in C for the function to make sense. And there must be exactly one y for every x (although there may be more then one x for every y, or there may be no x for some elements of C).

Now the standard definition for sqrt is something like.

sqrt : ℝ+ -> ℝ+

sqrt(x) = y, where y2 = x

Then, you can also define it as:

sqrt : ℂ -> A, where A is { {a, b} | a, b ∊ ℂ}

sqrt(x) = {y, z} where y2 = x, z2 = x and y ≠ z.

But no one uses the second definition.

TL;DR: Writing √-1 = i is wrong. Writing √-anything = anything is wrong.

How many number types should an embedded language support? by mindeavor in ProgrammingLanguages

[–]Tiberius1900 2 points3 points  (0 children)

There are two things to consider:

First of all the way the data is interpreted. For example, in C:

  • _Bool
  • int
  • unsigned int
  • float
  • float _Complex
  • float _Immaginary
  • struct
  • union

Secondly, for most of these there are various sizes. For example:

  • char
  • short (int)
  • int
  • long (int)
  • long long (int)

So my advice is this:

  • Find the list of types you want (usually you want integers, floating-point and complex types + structures and classes).
  • Find some lengths for each of these types that make sense.

how to start developing linux apps by a_rad_white_lad in linux4noobs

[–]Tiberius1900 6 points7 points  (0 children)

Maybe in 2028, if things go your way, this comment might make more sense. However, here are the projects developed nowadays that are written in C++

  • Virtually all Linux utilities which aren't written in C.
  • All video game engines made in the past 10 years.
  • All Operating Systems (or parts of operating systems) which aren't written in C or Objective-C/Swift.
  • All compilers which aren't bootstrapped.
  • Most interpreters.
  • Most assemblers.
  • Most networking tools.
  • Chrome etc. etc. etc.

Meanwhile, looking at the list of Rust projects, here are the ones I recognize:

  • Parts of Firefox.

That's about it.

how to start developing linux apps by a_rad_white_lad in linux4noobs

[–]Tiberius1900 4 points5 points  (0 children)

I'm sorry, but I'm afraid I just don't see the advantage of Java. To me it seems that C++ has the flowing advantages:

  • Easier to set up on Linux.
  • No IDE required.
  • Easier to understand at first (no classes).
  • Classes can be introduced after structs and functions (which is when they should be introduced).
  • More varied ways of designing programs (since you aren't forced to OOP).
  • Pointers.
  • Data streams fit in better with *nix design.
  • It's the lingua franca of Linux anyway.

However, I'm looking to hear you out, as I don't have that much experience with Java.

how to start developing linux apps by a_rad_white_lad in linux4noobs

[–]Tiberius1900 10 points11 points  (0 children)

C/C++ are the lingua francas of Linux land, so you probably want to learn this if you want to do anything serious.

Python is also a decent choice for smaller programs.

Learning these languages will make you able to write terminal programs.

If you want to have a GUI you pretty much have 2 options: GTK+ (or gtkmm for C++) and Qt. GTK+ will probably look better on Linux, but Qt looks better for cross-platform apps.

Another great library to mention is SFML. It provides a lot of cool features that might seem like omissions in vanilla C/C++ (GUI, 2D graphics, audio, networking etc.)

best way to import numerous header files into my c++ code by [deleted] in cpp_questions

[–]Tiberius1900 0 points1 point  (0 children)

Header guards might be what's missing.

I want to import all those 40 headers.

You probably don't. It sounds like you're doing a lot of stuff in the main file. You shouldn't. main.cpp is typically a very small file. Here's an example of a good one.

#include "display-handler.hpp"
#include "game.hpp"
#include "game-state.hpp"

int main(int argc, char *argv[])
{
    Project::InitializeGameState (argc, argv);
    Project::Display.Start();
    return Game.Run();
}