Message from @Deleted User

Discord ID: 463069140236632064


2018-06-30 20:21:39 UTC  

Work on your country and improve as much as possible while keeping your heads down

2018-06-30 20:24:18 UTC  

True. It's kind of nice, no refugees want to stay here because no money and too cold.
Those that stay usually turn out to be the ones that care.
Russians still have Latvia and Belarus to annex before getting to us, so that's like 20 years of peace probably.
What a time to be alive <:covfefe:440543908846632980>

2018-06-30 20:26:02 UTC  

Sounds like a time to become economically powerful

2018-06-30 20:26:10 UTC  

And hit the scene like a boss

2018-06-30 20:27:32 UTC  

Such optimism... You must be American.

2018-06-30 20:27:47 UTC  

I am

2018-06-30 20:28:49 UTC  

What are you @Povilus ?

2018-06-30 20:28:54 UTC  

Lithuanian?

2018-06-30 20:29:19 UTC  

Yes. Is that bad?

2018-06-30 20:29:30 UTC  

Just don’t kill yourself

2018-06-30 20:29:38 UTC  

?

2018-06-30 20:29:49 UTC  

Lithuania has high suicide rates

2018-06-30 20:30:00 UTC  

I've thought about it, decided it'd be too much hassle ;D

2018-06-30 20:30:24 UTC  

Play basketball instead

2018-06-30 20:31:20 UTC  

Stereotypes are fun.

2018-07-01 19:49:08 UTC  

```cpp

#include <iostream>


int main()
{
std::ios::sync_with_stdio(false);
std::cout<<"a\n";
std::printf("b\n");
std::cout << "c\n";

return 0;
}
```
@meratrix what do you expect the output to be?

2018-07-01 19:50:09 UTC  

```cpp
std::ios::sync_with_stdio(false);
```

2018-07-01 19:50:16 UTC  

wut dis do?

2018-07-01 19:50:35 UTC  

compile and find out 😉

2018-07-01 19:50:48 UTC  

Nah nigga

2018-07-01 19:51:26 UTC  

it's some cool shit

2018-07-01 19:54:01 UTC  

b

a

c

2018-07-01 19:54:19 UTC  

Okay, I'm assuming that first line does some fuckery.

2018-07-01 20:18:43 UTC  

Wait, why are you doing ios related programming

2018-07-01 20:18:45 UTC  

Blech

2018-07-01 20:19:48 UTC  

Also i hate when people dont use “Using namespace std;” and just type std: a bagillion times

2018-07-01 20:20:52 UTC  

You shouldn't use namepsace std; in actual software.

2018-07-01 20:21:08 UTC  

@DanielKO I you wanna explain it.

2018-07-01 20:36:14 UTC  

do you suggest `using std::cout;` or something?

2018-07-01 20:39:43 UTC  

`Using namespace std;` is bad for actual software, generaly fine for small side projects, because if you're using libraries and they happen to have them named the same, say they both have their own `String`, then it's going to cause issues when you `Using namespace String`.

2018-07-01 20:43:08 UTC  

polluting namespace is bad mmkay

2018-07-01 20:43:52 UTC  

clang-tidy/format are great

2018-07-01 23:55:25 UTC  

That method, `std::ios_base::sync_with_stdio()`, controls whether the standard stream objects `cin`, `cout`, `cerr`, `clog`, `wcin`, `wcout`, `wcerr`, `wclog` are synchronized with `stdin`, `stdout`, `stderr`.

2018-07-01 23:56:25 UTC  

If you turn synchronization off, you might get better performance in `cin`, `cout`, etc.

2018-07-02 00:00:44 UTC  

If you're just using the standard library, don't worry about `using namespace std;`.

2018-07-02 00:02:51 UTC  

But, if you're teaching someone C++, you don't want them to learn bad habits.

2018-07-02 00:03:56 UTC  

So yes, `using std::cout;` is a more controlled way to do it.

2018-07-02 00:57:59 UTC  

I agree, when I was taught c++, we were told to have ```Using namespace std;``` and it took me a while to get out of the habit of it later

2018-07-02 01:05:36 UTC  

I say, never overlook possible excuses for a programmer to copy-paste shit. If it gets too verbose, you can be a good fraction of programmers just copy-pastes shit to avoid typing.

2018-07-02 01:10:42 UTC  

```cpp
void dump_debug_stats(const Data& d)
{
using namespace std;

...

clog << "Data Type: " << setw(4) << hex << uppercase << setfill('0') << d.type << "\n";
clog << "\tpayload: " << setw(12) << setfill(' ') << right << d.payload
<< "\ttimestamp:" << setw(20) << dec << d.timestamp << "\n";
}```

2018-07-02 01:11:38 UTC  

This is an example of a justified use of `using namespace std;`.