« first day (2352 days earlier)      last day (2598 days later) » 
00:00 - 20:0020:00 - 00:00

12:03 AM
If you want to delete the first 1MB of a 1GB file. Is it possible to do this without moving all data to the left?
 
user1804599
The opposite side of my elbow always smells like waffles.
 
I mean, can a file have a std::deque-like implementation?
I actually have no idea how file systems work.
 
Xeo
Time for evil loli
gun be so good
 
@Mikhail I suppose maybe proficient was not the correct word to use... maybe instead I should rephrase my question or be specific. In assembly, If I have some array and a string that I enter, How do I place the words of that string into the array? I apologize I am new to assembly... and Im still getting used to how much of a low level language it is.
and how specific the instructions are...
 
posted on March 25, 2017 by Herb Sutter

The ISO C++ committee had its winter meeting in Kona, HI, USA from February 27 to March 4, hosted by Plum Hall and the Standard C++ Foundation. Over 100 people attended, officially representing 9 countries. C++17 is done! The big news is that we completed C++17, which dominated the work of the meeting: C++17 is now […]

10
 
12:08 AM
@NathanDrieling godbolt.org , write C code, convert to assembly, cheat on your homework?
Also the question is bullshit you should feel bad
 
@Mikhail I think this is what I wanted... thanks
Not for cheating. I would never consider that.
 
12:21 AM
pompen is doing push-ups for all I know.
 
@NathanDrieling I'd cheat if someone was making me write assembly
 
pretty much all programmers 'cheat' by copy and paste other people's or own code from past
 
@Telkitty It's sometimes indecent to do for your own projects IMO, but for some school bullshit, I wouldn't care
...The dumb stuff they teach in schools makes your hair sit up
 
user1804599
@StackedCrooked pompen means fucking a girl
 
user1804599
volpompon
 
12:28 AM
ah, lol
 
user1804599
met je blauwaderige yoghurtpomp
 
Xeo
Evil Loli fight was great @StackedCrooked @Mysticial
 
user1804599
 
@EnnMichael like what dumb things they teach in schools?
 
@NathanDrieling If you really must know, we had a shitty C pointers test today, and I just got cancer
...Something like giving you 20 lines of pointless, overly complicated, non-practical pointer operations, and then the question is to predict the output of that 20 line program.
I.e. if you ever actually saw code like that in practice, your mission wouldn't be to try and figure it out, but rather to find the author's address and bash his head with a rock
 
12:36 AM
unfortunately I assure you that your mission far too often is to try and figure it out
 
...Yeah
 
user image
3
 
user1804599
 
1:02 AM
Scott Meyers recommends to always use the "Explicitly typed initializer idiom". Basically it means using auto a = int(0); rather than int a = 0;. The reason being is that it makes it impossible to not initialize the value.
// So in the spirit of "Explicitly typed initializer idiom":
enum class Index : uint32_t { };
auto i = Index(1);
Which actually hides a cast.
@EnnMichael ^ Problem solved :P
 
That's AAA right?
 
Kinda.
 
I don't think it's a perfect solution at all because std::initializer_list is really bad to begin with
...AFAIR people argued against using () like you did exactly for the reason you mentioned
 
@EnnMichael I stopped using {} after it betrayed me with std::vector.
I only use it if I have no other choice.
 
Exactly.
But that's not my problem with the proposal, it's that it changes the meaning of "enumeration"
 
1:07 AM
Using () never betrayed me. And I don't care for the narrowing conversions.
 
Isn't an enumeration supposed to be one of N predefined values?
 
@EnnMichael That's what it's intended to be.
 
Well with this proposal, that's not what it is
 
That's no problem for me.
Just like type traits often make use of inheritance even though inheritance wasn't really indented for this.
 
@EnnMichael no, the usual counter-example are bitmask-like types
 
1:12 AM
C++ is interesting because it there are so many ways in which it's features can be combined. Expression templates for example. Stroustrup never intended for this, but he did intend to allow for new creative uses.
It's also the reason why C++ codebases can be horrible.
SCOPE_EXIT {}; is also a clever construction imo.
 
Interesting. Because without the proposal:
<code>
enum class Color {red, green, blue};
switch (some_color) {
case red: // ...
case green: // ...
case blue: // ...
default: // I should never be here, and if I am, there was a nasty static_cast somewhere in the code
}
</code>
But what now? Should I expect it to be normal to enter the `default` branch, or should I invent (yet another) semantic rule in my code?
 
valid enumeration values cover the whole spectrum of the underlying type, they are not limited to the enumerators
 
Help me out, how do I format code again?
@LucDanton Okay, thats fine. Why do we even call it an enumeration then?
 
@EnnMichael Use four spaces before each line.
 
it’s up to you (e.g. as API designer) whether you want to deal with non-enumerator values or leave it as a pre-condition for users/callers not to violate
@EnnMichael well it’s still a finite number of values
 
1:16 AM
@LucDanton Lol...
 
@EnnMichael Click the third button i.imgur.com/U4ycuSh.png
 
@StackedCrooked It's too late now :( thanks anyways
@LucDanton Yes, indeed it is, and then I have to invent a semantic rule that's never enforced by my compiler
I.e. my best out is to write in the docs "Hey, don't put a random value in there"
I mean, it's fine, don't get me wrong. I just like it better the way it was
 
@EnnMichael it has always been like that, it’s a holdover from C
 
AFAIR traditional enums were like that
 
it has always been like that
 
1:18 AM
But enum classes weren't (up until now)
No you needed a static_cast
Or a C-style cast
 
I meant the valid range of values, the change is notational
 
Sure then
 
@EnnMichael You can treat is as UB and document that.
It's your choice.
 
While we're discussing the new features, is anyone here fond of deduction guidelines?
 
user1804599
Bikeshedding about bad features is stupid
 
Ell
1:26 AM
@EnnMichael What is the way it was?
 
@EnnMichael Btw, if the default case is unexpected then omit it from the switch and deal with after the switch. Example. This way GCC will generate a warning each time you add a new enumerator, so you don't forget to update the function.
 
@rightfold Thanks for pointing it out. You're talking to a man who knows all well he has nothing smarter to do with his life
@StackedCrooked Thanks for this, quite useful
@Ell Requiring an explicit cast
 
I remember reading that enums were added to C because people pressured Dennis Ritchie to do it. He didn't want it initially.
 
Ell
@EnnMichael not sure how that's the old way
That's the new way
 
Well there are new rules regarding {}
The cast is still required in a lot of places, yes
But not all of them (if you use {})
 
2:08 AM
ahahaha, got my hard drive towers working on my 5960X.
Now it's disk-bound again.
 
You're going against the grain, everybody knows unpowered arrays are the new hip thing in datastorage!
 
2.3 GB/s write, 2.7 GB/s read
But CPU throughput is 4 GB/s.
IOW, time to put in 8 more hard drives.
Let's see how fast this thing can do 50 billion digits of Pi.
Using 120GB of memory.
 
it’s super weird it does kinda look like there are more bunker staff guardians than there should be (there should be 0)
 
2:59 AM
Hmm, the run crashed. And the stack trace doesn't make sense. Now I'm starting to question the stability of the 128 GB of memory @ 2666 MHz.
This is the first time I've really tried to stress it.
 
3:14 AM
Yeah, definitely hardware instability.
 
4:13 AM
Hello, World!
 
I just rediscovered the correct horse saxophone video
 
If a function uses a class which is declared in the same namespace, can you use the class name without qualifying it with the namespace?
Or do you still need the namespace and the scope resolution operator?
 
4:29 AM
@Code-Apprentice that is unqualified name lookup
 
okay, that's what I thought...
 
5:16 AM
> We came oh-so-close to approve shipping the Modules TS out for PDTS [Proposed Draft Technical Specification] as well.
for some reason feeds snobbed that
> friend std::strong_ordering operator<=>(const Point&, const Point&) = default;
looks concise enough cc @Xeo
 
5:30 AM
what is operator<=>?
Is that a built-in operator now? Or can you finally just define your own operators?
 
> On a personal note, my comparisons proposal was positively reviewed by both EWG and the Library Evolution working group (LEWG) (only the core proposal was encouraged, none of the parts marked ‘optional’) […]
> For fundamental floating point types, <=> returns partial_ordering
I couldn’t tell if that was an optional bit or not but if/when it makes it through that would close the door on using the floating point types as keys in sets/maps
> If there is more than one enumerator with the same value (which means substitutability does not hold) […]
it does hold ._.
> For copyable arrays T[N] (i.e., that are nonstatic data members), [… perform] lexicographical elementwise comparison. For other arrays, there is no <=> because the arrays are not copyable.
???
 
OIC...so it's similar to Haskell's Ordering?
 
@Code-Apprentice together with compare
 
err...compare is probably a better equivalence...which returns an Ordering.
@LucDanton yah, that's what I mean
 
sheesh the proposal completely dropped the ball for pointers and seemingly forgets that strong equality (without ordering) would be the sensible option
huh, they want this operator<=> to not perform the usual conversions to avoid tons of pitfalls (examples include not having decay and handling -1 <=> 1u), I’m impressed
> friend auto operator<=>(const P&, const P&) = default;
even conciser! now only missing noexcept(auto)
 
 
1 hour later…
7:01 AM
Hi everyone good morning.
How to make program always active? When keyboard key press so i need to save in txt file?
 
nwp
What do you think should happen when you start 2 always active (I think you mean having focus) programs?
 
@nwp My meaning. When user press keyboard key. i just save in txt file.
 
nwp
look up keyloggers
 
@nwp c++ how to do that?
@nwp even when program not active but running background.
 
nwp
Just search for "keylogger C++". There are a million tutorials on how to do that.
 
7:05 AM
ok thank you i try.
 
7:16 AM
next, you need to search for how to transfer that txt on to your PC/server
 
@Telkitty what does that mean?
 
 
2 hours later…
Ell
9:39 AM
@AlexCerry it's a suggestion that you're trying to steal peoples details
what with writing a keylogger
 
nwp
I wish Asan would not report a memory leak in int main(){}.
 
Ell
where else could a memory leak come from? :)
 
Xeo
static inits
 
nwp
Though apparently it is right‌​.
@Xeo no, that's the entire program
 
Xeo
runtime might have static inits still
(think cout etc)
 
Ell
9:42 AM
a static init leak is hardly a leak, more like a spill :P
 
Xeo
that's why it says "still reachable"
@LucDanton I like it
Isn't std::strong_ordering operator<=>(Point const&) const = default; also an option? (no problem with it being a member, IMO, since it's auto-generated)
Or was there something about operator<=> needing to be a non-member?
 
9:59 AM
@Xeo it looked that way
 
Xeo
I don't think generated operator<=> is a thing for asymmetric comparisons (vec3 <=> vec2 or sth) anyways, so that's another point where it being a member wouldn't be an issue
 
10:32 AM
@nwp this is an emergency buffer for storing an exception object in case there is not enough memory
 
nwp
@milleniumbug why do they allocate it dynamically and not statically?
 
lol concepts didn't even make it in C++17
that's it I quit
 
nwp
10:49 AM
no concepts it better than eternally bad concepts
 
maybe c# gets them before
 
11:17 AM
@nwp dunno
 
@StackedCrooked The kind of entertainment that an unregulated traveling circus with its own home-grown roller-coaster has.
2
 
11:52 AM
@Xeo waddafaq is operator<=>
 
Xeo
A good thing
 
@nwp It's per-thread and the storage needs to live long enough for e.g. debugger, also I believe it's theoretically legal for you to start transporting that exception between threads
 
nwp
I suppose thread_local is/was not an option. Still, false positives reduce the usefulness of those tools so much someone should have coded in to not report that.
 
I'm not remotely convinced that it's a useful tool for C++ at all anyway
it's like, valgrind_whoops_i_forgot_raii
 
nwp
it helped a lot when I somehow modified a vector while range-based-for-looping over it
arguable I shouldn't have been dumb and not done that, but then again the whole point is to point out dumb mistakes so you don't have to find them yourself
 
11:59 AM
presumably that caused memory corruption as opposed to a memory leak
 
nwp
it did, same tool though
 
I feel that mostly reveals that your Standard library's debugging facilities are inferior
 
7 hours ago, by Code-Apprentice
what is operator<=>?
cc @Puppy
 
user1804599
Why are stdin and stdout separate file handles?
 
12:18 PM
because they might go to or come from completely different places?
 
user1804599
I don't get the question mark, but that makes sense. Thanks!
 
surprised this is a question you needed to ask
 
12:48 PM
Oo gosh, I am watching this retarded video on youtube, I have checked facts - full of lies. up vs down votes: 31:1
I used to have high regards of youtube videos and comments
9
disappointment, I has
 
nwp
@Telkitty that might be the most insane thing you ever said here
 
well, I must admit, I limit my views to only videos I think that are worthy of my time
that this crap: in the very ancient time, PIE language was the only common language on earth
this is one of very few videos that have so many upvotes and yet is full of crap
I did come across many good comments on quite a few controversial videos - those videos don't get rated as high. But I guess if you choose to watch retarded videos you get to read dumb comments
 
Who reads the comments?
 
I do
youtube comments can be fun
 
no one has time for that
 
12:58 PM
sometimes I like to read what other people think
comments to controversial videos usually reveals of different world views of people
 
nwp
@Telkitty you should play league of legends, I hear they have the best chat
 
I don't comment on youtube usually, if I do, I probably troll the heck out of it :p
 
nwp
that's that everyone does and that's the reason it is not worth reading
 
1:03 PM
imagine that...Telkitty trolling on YouTube...whodathunk?
 
I am very loyal, I am only a 1337 tr011 on one site at a time
 
nwp
@Telkitty because of the technical limitation of not being able to have keyboard focus on 2 sites at a time?
 
@Puppy That's not what valgrind is for anyways.
Heap checkers in general are just usful to detect that unexpected circular reference etc.
Valgrind, ubsan, asan and friends are mostly useful to pick up on indeterminate values, missing range checks and the like.
You can argue that these are useless since you should not have those bugs. I'll listen once you code all of our programs with your special superpower that prevents them.
(inb4 use Wide)
 
@nwp coz no fun trolling strangers
I don't like to troll people who are too familiar either
 
@Puppy What happened to Wide anyways? Your website seems to be offline
 
1:17 PM
@Telkitty Because you can't
 
the github pages is probably still up
it's just that the domain expired
 
@sehe because I would feel guilty about it and I am a morally upright person?
 
I believe that latter part.
 
nwp
@Telkitty How can you say doing bad things to people only matters when you know them and that you are a moral person in one sentence?
 
1:40 PM
Firstly, I was just joking. Secondly, I only troll people who deep inside want to be trolled
 
And you limit it to people you don't know, just to underline the fact that you cannot see deep inside their souls. Admit it, you're stuck.
"I'm stuck inside my joke because I'm so funny, ho-hum!"
 
28 mins ago, by Telkitty
@nwp coz no fun trolling strangers
so to answer you, not really
 
2:01 PM
@Borgleader I'm really enjoying the the part where the tv is a singleton entirely too much.
 
@jaggedSpire That one's pretty good, but I laughed more at the Multi Butt Supporter
The talk itself is well worth watching.
 
@Borgleader Sorry, which talk is it?
 
@EnnMichael Follow the arrows, theres the Source.
 
Oh, sorry. Thanks
 
Hi :)
 
2:10 PM
Morwenn <3
 
<3
 
user1804599
HeytingAlgebra (a -> b) is love, HeytingAlgebra (a -> b) is life.
 
user1804599
commitKey = (&&) <$> eq "Enter" <<< KeyboardEvent.key
                 <*> not (altKey || ctrlKey || shiftKey)
 
Hating Algebra is life indeed
 
user1804599
var commitKey = Control_Apply.apply(Control_Apply.applyFn)(Data_Functor.map(Data_Functor.functorFn)(Data_HeytingAlgebra.conj(Data_HeytingAlgebra.heytingAlgebraBoolean))(function ($36) {
    return "Enter" === DOM_Event_KeyboardEvent.key($36);
}))(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraFunction(Data_HeytingAlgebra.heytingAlgebraBoolean))(Data_HeytingAlgebra.disj(Data_HeytingAlgebra.heytingAlgebraFunction(Data_HeytingAlgebra.heytingAlgebraBoolean))(DOM_Event_KeyboardEvent.altKey)(Data_HeytingAlgebra.disj(Data_HeytingAlgebra.heytingAlgebraFunction(Data_HeytingAlgebra.heyting
 
user1804599
2:22 PM
You could be writing this instead!
 
2:47 PM
hello folks
I'm using a vertical mouse now. feels much nicer. who is using such mice too?
 
trump
 
@jaggedSpire <3
 
3:24 PM
trump's using a vertical mouse on an iPad
5 messages moved to bin
the address of the Bin
 
Hahaha you cruel bastard
 
Ven
Hi
 
Ruthless!
 
Ven
Is skype down zzzz
 
Haha sorry, I thought this was the room where people knew C++.
11
 
3:36 PM
@Morwenn <3 <3 <3
Lol
This is the room where people quietly grapple with how terrible C++ is, and try to distract themselves from it.
If you want a question answered and you don't accept "what's the point when life is cruelty?" as an answer you want another room.
4
Soon I'll be back to working with it. So soon.
:)
 
Ven
Hi jaggy :3
 
@Ven Hey Ven <3
 
Ven
how are you? <3
 
I'm doin' all right. My flight to Texas has been delayed an hour but it's almost boarding time for real.
You?
 
watcha gonna do in texas?
 
3:44 PM
Spend a week hanging out with my family. :)
 
coolio
 
Yep!
The order taker at Starbucks thought I was a man and then decided they'd misheard my name and it must be Jay, which was amusing, but that's as exciting as my day has gotten so far.
 
He thought... you were a man?
 
I'm short enough she couldn't see my chest, and with the short hair...
Maybe she thought I was a boy. I am about teen boy height.
 
I see
 
3:50 PM
¯\_(ツ)_/¯
It's common enough I usually just roll with it
 
Oh, youre not one of those who actively seeks to cash in on the potential awkwardness of the situation? :P
 
Yessssss boarding time
 
have a nice flight
 
@Borgleader nah, I already get enough amusement out of awkward situations it'd be like double-dipping
Thanks <3
 
Ven
ideone is still down? :(
@jaggedSpire pretty cool, although sleep is severely lacking
 
3:57 PM
y u no coliru?
 
^
Coliru is great
@Ven aw
Sorry to hear you're short on sleep.
 
jrh
Just curious, any gamers here? Who's read the Doom 3 source?
 
Ven
Coliru doesn't have a Common Lisp installed, AFAIK.
Ideone supposedly has two but it's down.
 
@Mysticial: Seriously? You want paths longer than 32'767 characters? What would you use them for (please, god, don't tell me you plan to type in such a monstrosity).
 
@JerryCoffin The 260 limit.
 
4:11 PM
@Mysticial ...isn't real. It exists primarily in the minds of inferior developers. Don't be one of them. :-)
 
@JerryCoffin It prevents me from copying folders into deeper subfolders. And that was written by Microsoft programmers. :P
 
@Mysticial It doesn't prevent you from doing anything, as long as you do things correctly. Yes, some of MS' programmers clearly fall into the "inferior" category.
 
Ven
Yeah but it's 2017, I don't see why you would not use the "long path" windows prefix.
 
Xeo
@JerryCoffin If you use C# (or .NET in general), you're stuck with the 260 limit AFAIK
unless you P/Invoke the unicode API
 
nwp
maybe that automatically makes one an inferior developer then
 
Ven
4:20 PM
No, but I do think you have to use `\\?\` explicitly.
 
Xeo
@Ven As I understand it, that needs the Unicode API still
for whatever reason
 
@Xeo Somehow the tight coupling between .NET and inferiority doesn't surprise me.
 
Xeo
I like C#
 
@Xeo Yes, it does.
@Xeo I was being careful with my words there. I don't mind C# itself (the language), but I'm rather less excited about .NET.
 
Ven
Common Lisp's pretty printing facilioties are really weird.
 
4:28 PM
@Ven "facilities", perhaps?
 
Ven
I guess I mixed it up with "idioties".
 
@Ven Fair enough. :-)
 
user1804599
4:41 PM
@Ven Add CL to glot.io, it's easy
 
Ven
@rightfold really?
 
user1804599
Yeah, just PR it and if there's errors the author will fix them
 
user1804599
You don't even have to test it locally, as long as it's close to working
 
5:02 PM
@Xeo They've made mistakes, but I think they are at least attempting to head in vaguely the right direction
 
Ven
@rightfold I'd rather be nice to the guy :).
 
user1804599
@Puppy They made huge fundamental mistakes, they are far from the right direction.
 
user1804599
For example, side effects are part of the language, and throwing exceptions is way too straightforward.
 
Ven
Guess I'll have to write a cl-discord layer.
 
both of those things are totally fine
 
user1804599
5:07 PM
XD XD XD
 
I'd like it if C# had a variant in it, but exceptions aren't a case where I would use them
 
5:24 PM
What are people's typing speeds?
 
@exitcode My typing is quite slow. To be more specific, the last time I checked I could type about 40-50 WPM (but with a fairly poor error rate).
 
I can't touch type
 
@JerryCoffin its the one thing vaguely programming related i can do well-ish
I can do about 107
 
It's actually better if you type slow
Gives you more time to think about what you're typing
 
I just did a typing test and got 25 WPM
 
5:34 PM
53 here
 
sqrt(2) here
 
cos(pi) here
 
e^pi
 
e^i*pi ;)
 
isn't that -1?
 
5:37 PM
Yes indeed
 
so what happens if you try to type into an empty document
does the word count underflow?
 
I blame lag for my poor typing speed.
 
@Puppy It's unfortunate
 
why?
you would get the best typing rate ever
2^32 - 1 words per second
 
Haha
 
5:42 PM
should have spacebar set to a macro that opens a new document
 
I mean it's unfortunate because I have such a great typing speed yet I can only write stuff backwards
 
I probably had too much coffee.
Because structs can be serialized using the demangle API.
Albeit not portable.
But better than nothing.
 
we use this in C#, or something like it
 
user1804599
6:03 PM
@StackedCrooked Don't do this shit.
 
user1804599
Use a preprocessor.
 
6:16 PM
Actually. In practice I use vim macros to generate the switch cases that convert enum to string.
Vim macros are like a pre-preprocessor.
 
@StackedCrooked That's really just a library-based form of reflection.
 
It would be nice if they could also reflect the member variables.
 
life is too short for c++?
 
Meh, special cases. Why even delete the votes? SQL?
I like puppies.
 
6:32 PM
@StackedCrooked That de-escalated quickly.
 
The emotion of pointlessness always wins. And I do like puppies.
But I lost 10 rep because they deleted a user. How does that even make sense?
 
is it the first time for you?
 
@StackedCrooked It doesn't. You obviously should have lost all your rep (and I probably should have lost mine too).
 
The only reason I can think of is that rep is tied to a relational DB.
But it's so fucking stupid. And they try to explain it like it's a normal thing.
So I'm bound to lose all my rep in the long term.
Mathematically speaking.
 
@StackedCrooked Nah--somebody at SO thought it made sense. They do have a special case, so if an account is removed after doing a lot of votes (for some value of "a lot") people don't lose rep from it.
 
6:38 PM
that assumes so implodes
which must happen long term I guess
 
It reminded me of some restarted API choices colleagues made recently and they tried to explain it like it was a normal thing.
So basically this triggered me.
Anyways. Off to eat something now.
 
@StackedCrooked an excellent idea.
 
Oh damn. Muscle memory caused a stupid typo there.
 
Or is that a restarted typo? ;)
I do that with auto and var all the time, now actually. Brain says "type deduced variable," fingers output whichever language they're set to at the time.
 
7:18 PM
yeah same
 
user1804599
I discovered weapon customization in Fallout 4. It is great.
 
user1804599
7:41 PM
Now I have a super good pipe rifle.
 
Let us all remember that programmers should not be trusted with computers https://bugzilla.redhat.com/show_bug.cgi?id=1202858 https://t.co/1kuYLo7Kid
 
@Borgleader Let us all remember that programmers should not be trusted to write Tweets about unreleased software (or, in many cases, much of anything else).
 
7:59 PM
@StackedCrooked woof
 
00:00 - 20:0020:00 - 00:00

« first day (2352 days earlier)      last day (2598 days later) »