« first day (3421 days earlier)      last day (1520 days later) » 

user6461957
12:41 AM
Are you Australian, TelKitty?
 
2:30 AM
@d03 the new yorker is pretty good.
 
3:13 AM
In the std::future we'll be able to iterate over all enums
 
 
5 hours later…
user6461957
8:14 AM
C++17 isn't supported very well on G++ last I checked. <filesystem> is still experimental. I wonder when C++20 gets full support given the prior fact.
 
nwp
8:42 AM
Gotta love when you start Qt Creator and are greeted with an error message that arm-none-eabi-gdb-py.exe could not be started correctly.
Still can't generate debug symbols with clang on Ubuntu, still can't link sanitizers with gcc.
 
nwp
8:56 AM
Oh yeah, I still can't compile in debug without -O2 because somehow magically that flag gets added after all my flags.
 
std::string() += 'a'; // compiles ok
int() += 1; // error: lvalue required as left operand of assignment
^ Anyone know the language rules that explain why compiler allows the first, but not the second?
 
nwp
9:14 AM
Because int's += is a builtin operator and std::string::operator+= is a function. Those naturally have different rules. They could have chosen to make std::string::operator+= behave like the builtin operator but didn't.
I guess they don't allow the int version because it doesn't make sense and is probably a bug and they allowed the string version because Stepanov didn't pay attention or writing overloads for & and && member functions seemed like too much work or too confusing.
Oh hey, my/sol's overloads are fine with gcc7 but ambiguous with gcc8. Why does everything have to be broken?
 
user6461957
9:52 AM
Same with const refs. It has an exception inside, i.e., you can pass rvalues.
 
user6461957
If you assume that references are pointers in disguise and T &x is T *const x, thus const T &x is const T *const x; it should not be possible to pass rvalues, but it is.
 
user6461957
(I struggled on why this is before I found out that they just decided to allow it. It is an arbitrary but sensible decision.)
 
nwp
If you start with an incorrect assumption then you don't get useful results.
 
user6461957
So how are references implemented then?
 
user6461957
(If you hint me that not via pointers.)
 
user6461957
10:00 AM
Or rather I should state that they are functionally equivalent. Still wrong?
 
nwp
That's the wrong question to ask. It's like saying "Vaccines protect against illnesses. I got a vaccine and still got ill. Why?"
And yes, it's still wrong. If they were functionally equivalent there wouldn't have been a need for references. Pointers are older than references and still they added references because pointers were insufficient.
References were specified to make a certain kind of sense and compilers implemented them using pointers because that's easy. But saying references must behave like pointers because that's how they are implemented is incorrect.
 
user6461957
Okay, before I decide to evict that potential falsehood from my brain, I would like to restate my assumptions to make it more clear and to avoid confusion.
The following statements are not functionally equivalent?:

T &x is T *const x
const T &x is const T *const x;

Even assuming that references are automatically applying the de-referencing operator?
 
nwp
References do lifetime extension, pointers don't. Pointers are re-assignable, references are not. That's all I can think of right now.
Oh, you have that re-assignable part with const already.
 
user6461957
Okay should I evict that "functional equivalency" from my poor C brain or not?
 
nwp
You probably should. "References are self-dereferencing pointers" works for C programmers in the beginning, but then it becomes more of a burden than a help.
It's like saying "functions are automatic gotos". It's kinda sorta true but not helpful.
 
user6461957
10:10 AM
I suffer from C-donitis go easy on me x/
 
nwp
10:57 AM
Multithreading is hurting my brain. I thought I was smart enough to grasp it, seeing that it's my main interest and I've been sort of studying it for years, but I'm not.
 
nwp
11:12 AM
I get to choose between a deadlock and memory corruption. Designing software is fun.
 
user6461957
12:00 PM
nwp, don't stifle my ambition to fully grasp multithreaded programming. -_-
 
user6461957
Just beginning to study this stuff including overlooked areas such as async i/o, barriers etc. but currently w/ the POSIX API. I am an "illiterate" on C++'s multithreading lib as of now
 
user6461957
12:31 PM
ugh, working 10 h / d, 6 d / w is stressful. sigh
 
user6461957
3:17 PM
2 h until quitting time. And I got ahead with my C++ project -_-
 
user6461957
3:38 PM
C++ should have a socket lib. I now have to implement my own for my work project. There are no decent ones with MIT license.
 
user6461957
3:53 PM
Cool! But I need it now. Guess, I have to implement my own until then. (It needs to be MIT licensed cuz it has to do w/ my company's policy and I didn't find a decent one yet.)
 
user6461957
zlib is also fine
 
nwp
boost::asio not good enough or wrong license?
 
user6461957
wait I need to check the license...
 
user6461957
Boost Software License, okay, let me check my company's internal list of allowed licenses
 
user6461957
Nice I can use it!!!
 
user6461957
3:59 PM
Yay!!! Thanks!
 
4:11 PM
Also QNetwork
 
user6461957
Yeah, I can use parts of Qt 5.3. I guess its network lib is also allowed, but I need to recheck it to be safe. Guess I will stick with boost::asio for now.
 
I don't really liked the QNetwork stuff, I found the code that I had to write for it way too convoluted
I mean, it's better for simple REST stuff than using asio. But that's just because asio doesn't have special facilities to deal with HTTP stuff
 
for non portable windows stuff I just used the CPP/WINRT apis
it's coroutine friendly and works nicely and I don't have to patch it
 
the cppnetlib stuff also didn't really feel great for some reason. API-wise I liked cpprestsdk the best, but the insanity of using UTF-16 to query JSON is just so .... Microsoft
 
user6461957
My project needs to work for Windows and Linux.
 
user6461957
4:17 PM
(Almost 1 h until quitting time, yay!)
 
@PeterT I really wish MS would just create a set of U8 apis (that just fail hard if you pass them ANSI)
 
user6461957
5:18 PM
youtu.be/n6_Sc1Cn7d4 not sure if it applies to all countries, all company types. The issue of discrimination is probably prevalent in companies such as Google, Facebook, but I don't think all software companies abide to such policies. Also in Germany the law prohibits any kind of discrimination. The issue that he is referring to probably is applicable for some US companies situated in Silicon Valley.
 
8:43 PM
Does anyone think that a variable name with the abbreviation "tmp" in it is a bad variable name? And why?
 
@earlyriser01 "it depends"
 
 
2 hours later…
10:54 PM
I spent 2 months working on a branch and now its 100% dead. Press F to pay respects.
 
user6461957
11:33 PM
F
 
user12975054
F
 

« first day (3421 days earlier)      last day (1520 days later) »