« first day (3513 days earlier)      last day (1418 days later) » 

3:08 AM
@iksemyonov Use hash_range(sv.begin(), sv.end()) ?
 
 
5 hours later…
8:19 AM
Which is more impressive, making a 2D side-scrolling game or an arbitrary-precision number framework?
Impressive in air quotes
 
8:56 AM
depends on you definition of "making a game" and the specific features it has
 
get a better vscode theme
 
 
1 hour later…
10:21 AM
@Lapys Probably the framework as its closer to what an employer might want, and certainly more likely to be used (few people will play your game if its not deployed, and actual games require things like assets to be "used/played")
VSCode is for children
also +1 for hash_range that function is definitely better than the grabbing the indexes like in present implementations.
 
10:43 AM
@Lapys Making something that not sucks would be impressive.
 
@JerryCoffin absolutely true.
 
nwp
I use VSC for the TS Discord bot. It works pretty well for that.
 
 
3 hours later…
1:26 PM
Upgraded Android Studio, now can not sync a project that used to work. Programming is all about manual labour (of mostly fingers).
 
1:40 PM
Why were rvalues originally conceptified (C++98)?
 
for reference lifetime extension maybe?
 
To make sure that they don't bind to lvalue references
 
oh right, that makes more sense
 
Hm. So they wanted to prevent int& n = 5;
But would that really be wrong?
 
More like they wanted to avoid std::swap(lol(), fuck_you_too());
It's a mean to avoid dangling references
 
1:45 PM
I see.
 
nwp
@StackedCrooked It's not obvious that it's wrong. MSVC allowed it for a few years.
 
@Morwenn That makes sense. They can't assign it a storage location to rvalues because that would lead to the question when the storage becomes available again.
 
If I'm not mistaken explicit reference semantics were created for smooth argument passing without having to resort to pointers, so that's the use case you need to have in mind when thinking about their design
Now rvalues proper and their name come from C
They wanted to make sure that 5 = a; wasn't possible
Hence the name rvalue because 5 could only appear on the right side of the assignment
 
@Morwenn Yeah. That would destroy the number 5.
 
nwp
They should have stuck with the term "temporary" :(
@StackedCrooked Why? It would just overwrite the temporary int.
 
1:48 PM
"temporary" is an overloaded term, while "rvalue" is obviously a term of art
Also with prvalues there aren't even temporaries involved
 
Isn't std::string() a prvalue? (And a temporary?)
 
nwp
And also assignable.
 
xvalues would be the temporary values since they are the ones "about to expire"
 
nwp
Aren't xvalues the ones that don't actually expire? Things like std::move(a).
 
I don't know my lore very well, only how to use that shit :D
 
1:54 PM
I always thought xvalue was when you return a local variable from a function (so get the move or move elision instead of copy)
Ah well.
It's rather intuitive in practice.
So that's good.
 
An rvalue which isn't a prvalue is an xvalue
 
Reminds me of endofunctors.
I'll check it out. I should have a decent grasp on this.
 
What matters in practice is to know to which kind of reference your expression will bind
Also reference collapsing rules
 
That leads to forwarding references territory.
I remember Robot once posted a link that explained how they came to glvalues, xvalues etc. It had a picture of the whiteboard.
I should probably read that again.
Ah, found it.
 
And forwarding references territory leads to my latest tweet
 
2:11 PM
@Morwenn Ah, I think STL mentioned return (x) can prevent elision.
But that's different from perfect forwarding probably.
 
nwp
That prevents mandatory RVO.
 
I had to perfect-forward my data member
Keeping the referenceness and constness
Hence the parentheses
The main issue of perfect forwarding is that it doesn't perfect forward prvalues
 
Is this just an simplified example? Because why would you have a function that just returns its parameter with forwarding stuff.
 
The example is from my code base and it's originally the body of a projection function
 
> Does the presence of L1 and L2 caches imply the existence of R1 and R2 caches too?
lol
 
2:15 PM
I almost never post anything on Twitter ^^'
 
 
2 hours later…
3:59 PM
Hello everyone. I hope it
...is OK to jump right to my point
I've heard a number of times that C++ development takes noticeably more time than, say, C# or Java or other languages. Does anyone have any experience to (dis)prove this?
 
Rings mostly true to me, having all other things being equal. But in the projects I've worked in "highest development speed possible" was not the top priority.
 
@PeterT could you try to approximately express the difference in percentage?
 
 
2 hours later…
6:32 PM
Is it possible to store a column of a text file in an array in C?
 
sure, why not?
 
@passing_through Doesn't seem accurate to me. The notion that C# and Java are about the same seems quite wrong in my experience--at least when I've seen it, developing with Java is quite a bit slower than with C# (and C++ is around the mid-way point between the two).
As to expressing the difference quantitatively: much more difficult because it varies widely depending on what sorts of things you're doing. Java and C# both include a lot more in the standard library, and do more (especially in the case of C#) to make it easy to integrate other libraries. On the other hand, their libraries (especially Java's) are much more about simply having pre-written a lot of code, where the C++ library is much more about providing a foundation.
So, in Java or C# you get pretty decent speed if you're doing something their library directly supports, but it falls apart in a hurry if you don't have a library to do the real work for you. C++ maintains much more consistent development speed.
C# helps maintain development speed for a lot more situations from better tooling, libraries that are better organized, and having stuff like LINQ that's a lot more versatile than it might initially seem.
 
6:51 PM
I think tooling makes a huge difference. C# with .Net and Visual Studio are very different from C# without .Net on some old version of mono develop
 
7:14 PM
Yeah--at least IMO, discussing C# in the absence of VS is simply pointless.
And truthfully, if I were writing C# enough to notice, I can't quite imagine doing it without Resharper (or something similar, if there is such a thing) installed as well.
 
8:16 PM
@JerryCoffin Yeah, even with all those random freezes and the insane RAM consumption, I'm still more productive with ReSharper.
 
 
8:40 PM
@EtiennedeMartel Yeah, ReSharper another of those "the worst thing ever, except for everything else" kinds of things. And besides, although I advocate developers (who create software directly executed by user) having relatively trailing edge CPUs, I still favor development boxes having plenty of RAM (e.g., if I were building a new machine today, I'd consider 64 GB about the minimum to include).
 
32 GB is still probably reasonable, but nothing below that, that's for sure.
 
For an existing machine, 32 GB is fine. My current machine has 32 GB, and I'm happy with that, but it's a fairly old (Haswell) machine. If I were building a new one today, I'd definitely equip it with more.
On the other hand, my work machine is considerably newer, and I'm pretty sure the CPU is somewhat faster, but it only has 16 GB of RAM, which I find pretty limiting, at least for what I do. In fairness, most of my code is network management stuff, so I routinely have 3 or 4 VMs running simultaneously, and they definitely eat RAM like there's no tomorrow.
 
9:00 PM
@JerryCoffin 64GB is a lot though
 
@StackedCrooked When I built my 386, people said 8 Megabytes was a lot... :-)
 

« first day (3513 days earlier)      last day (1418 days later) »