« first day (388 days earlier)      last day (4561 days later) » 

9:00 PM
0
A: Why does LayoutKind.Sequential work differently if a struct contains a DateTime field?

XaadeYou're checking the addresses as they are within the managed structure. Marshal attributes have no guarantees for the arrangement of fields within managed structures. The reason it marshals correctly into native structures, is because the data is copied into native memory using the attributes se...

@CatPlusPlus hmm... that's a little overkill
26 versions every 3 years
 
version 100 in 2022
 
So?
Version numbers mean what developers want them to mean.
 
user457812
I think Chrome gets away with it by being silent with its updates. You just start Chrome and it's probably got a new version. Firefox pops up a gigantic window and forces you to update or die, and then you have to sit through it restarting, checking for updates to extensions, waiting to hear that it disabled all of your extensions yet again, and then it'll probably restart again just because it can.
3
 
user457812
It's pretty intrusive.
 
9:08 PM
Tuesday, June 7, 2022 specifically
 
I ordered Accelerated C++ today!
 
Neat. Now don't drive while drunk.
 
user457812
But the book recommends it!
 
@ManofOneWay great choice
 
9:18 PM
7
Q: Speeding up file IO, mmap, vs. read()

Bill N.My applogies if this has been covered elseware and my search has not found it, mmap-vs-reading-blocks Is a similar problem to what I am working and provied a good starting point on this problem, along with the discussions in mmap-vs-read. I have an application on linux that reads back a larg...

 
You can get a first feel of "Accelerated C++" by dropping a poor C++ book and watching it fall free.
 
Amazing. A good performance-related question.
 
sbi
@RMartinhoFernandes There's more of those. We even have one in the FAQ: stackoverflow.com/questions/5166263/…
 
@sbi Sure. They're rare and far between though.
 
@FredOverflow =) Hopefully I will have the time to read it before christmas. Then I will hopefully get Effective C++ for Christmas
 
9:31 PM
Effective Christmas.
3
 
=)
@CatPlusPlus How's the OpenGL going?
 
Hey, I got text rendering working.
That's something!
 
Turned out the answer to "Why is my right screen all black?" was "It's not plugged in."
 
@CatPlusPlus I'm gonna put a binary search tree in my living room for Christmas!
 
9:34 PM
> You're taking a reference to array, then. Not an array. – Michael Krelin - hacker ↵ 3 mins ago
I don't even know how to reply to that.
 
link?
 
0
A: Am I allowed to pass an integer pointer to a function that takes an integer array as an argument in c++?

Michael Krelin - hackerNo function takes array as an argument in c++, arrays decay to pointers, so yes, it's the same thing more or less here.

 
He says you're not passing an array by reference, but you're passing a reference. Which is not true in C++
You cannot pass references, because references aren't objects. To pass references, the client would have to supply one.
 
I just imagined void&.
 
pretty sure that doesn't exist :)
 
9:37 PM
That's the imagination bit right there.
I have a crapload of OCaml/Oz assignments, and my brain isn't working. :<
 
If you ever see a void&, you know that you're dreaming.
 
Cool, I asked the 1500th question on scifi.se.
Sadly, that didn't warrant me a badge.
 
@RMartinhoFernandes Your personal 1500th, or the 1500th overall? ;)
 
sbi
@ManofOneWay It's only 250 pages, but those are densely packed. I wouldn't recommend AC++ to programming newbies.
 
9:39 PM
 
I'm only 37 upboats away from Great Answer badge.
 
@RMartinhoFernandes In German, "Overall" is something to wear.
I'm only 20 minutes away from bedtime.
 
Oh.
Internets playing tricks again.
 
And I still have to brush my teeth!
 
Oh.
@FredOverflow What's that?
I sent those three messages in the reverse order.
 
9:40 PM
You know what's funniest thing today? People are installing my user script.
 
@sbi You mean Effective C++?
 
sbi
@CatPlusPlus I got Great Question and Famous Question today (for my operator overloading FAQ).
 
Wait, there were four.
 
sbi
@ManofOneWay Accelerated C++.
 
> Thank you very much, internet person.
lol
 
9:41 PM
> Installed 33 times.
 
@RMartinhoFernandes It's an Overall. The English word seems to be "Coverall". Interesting.
 
@sbi I'm familiar with C and I have taken a C++ course, so Accelerated C++ should not be too hard?
 
sbi
@ManofOneWay No, then I don't think it will be too hard.
 
You rather shouldn't keep C in mind while learning C++.
 
@ManofOneWay Accelerated C++ won't be too hard unless you take a Viagra before reading.
 
9:42 PM
@CatPlusPlus Yes, I'm trying to not think of C. That's why I want to buy some books.
 
@ManofOneWay Did C break your heart?
 
sbi
Yeah, pretend you've never heard of C before when learning C++. Although AC++ is probably the best book available to teach you C++ as something totally different from C.
 
@FredOverflow We have "sobretudo" (a naïve translation would indeed be "overall"), but it's not a that kind of clothing. It's more a long coat like the one Jack Harkness wears.
 
@FredOverflow No I like C a lot :) But I want to use C++ as it should be used, with the STL and all that! Now I'm thinking C with classes
 
Jack who?
 
9:45 PM
It's a Torchwood character.
 
Jack Harkness. The captain of the innuendo squad.
 
Captain Jack Harkness is a fictional character played by John Barrowman in Doctor Who and its spin-off series, Torchwood. He first appeared in the 2005 Doctor Who episode "The Empty Child" and reappeared in the remaining episodes of the 2005 series as a companion of the ninth incarnation of the series' protagonist the Doctor. Jack became the central character in the adult-themed Torchwood, and returned in the 2007 series of Doctor Who, reuniting with the tenth incarnation of the Doctor, and again for the 2008 series and a 2010 special. In the programme's narrative, Jack begins as a time ...
 
It's a Doctor Who character before that.
 
Isn't Doctor Who that series that's been running like forever?
 
Yup.
It had a break between 1989 and 2005, though, with one film in 1996.
 
sbi
9:48 PM
You know, I meant to ask "Doctor Who?", but they built that joke into the title already, so it's spoiled.
Oh well, gotta go to bed. Good night!
 
5 mins ago, by FredOverflow
Jack who?
Wait, so this was funny?
I really didn't know!
 
> Conjecture: If we have played some number of pieces, and we have a perfect clear, then the number of T pieces used must be even. Moreover, the T piece is the only piece with this property.
 
Tetris?
 
44
Q: The Mathematics of Tetris

Eric NaslundI am a big fan of the oldschool games and I once noticed that there is a sort parity associated to one and only one Tetris piece, the $\color{purple}{\text{T}}$ piece. This parity is found with no other piece in the game. Background: The playing field has width $10$. Rotation is allowed, so th...

@FredOverflow Yup.
@FredOverflow Oh, I missed the (accidental) joke!
Today I learned the checkerboard invariant.
 
Boy I feel so strung out... let's do some math for recreation!
> There is in fact a straightforward invariant that works in this circumstance - the 'classic' invariant for tiling problems. Checkerboard-color the grid, and note that all other pieces (the I, Ss, Ls, and the square) all take up an equal number of black and white squares in all orientations; by contrast, the T always takes up three squares of one color and one square of the other.
> This implies that for any number of rows (each of which have an equal number of squares of each color) to be perfectly filled, an even number of T pieces must be used.
Beatiful! I'm gonna go mathturbate!
4
 
9:55 PM
Right.
 
@FredOverflow Well, we're programming for recreation, don't we.
 
Hello
 
What's good?
 
circle jerk
 
10:04 PM
Ew.
 
I feel like my life is a catch 22 sometimes, seems to go nowhere
meh
grrrr
 
@TonyTheLion Maybe you need to find a throw 22? ;)
 
Argh, those infernal binary trees.
 
@FredOverflow throw 22; anybody care to catch?
4
 
@FredOverflow We need a try!
 
10:16 PM
Do or do not, there is no try.
 
@TonyTheLion In C++, you really can throw integers btw :)
 
@FredOverflow huh? Why would anyone want to do that?
 
@TonyTheLion Why not? You can throw whatever you want.
I like to throw const char*s in my little toy programs :)
 
throw television();
 
10:19 PM
@RMartinhoFernandes lol
 
#define flip throw
flip table();
2
 
@CatPlusPlus ha ha!
 
10:52 PM
> Someone in the #haskell IRC channel used (***), and when I asked lambdabot to tell me its type, it printed out scary gobbledygook that didn’t even fit on one line! Then someone used fmap fmap fmap and my brain exploded.
I keep reading that "fmap fmap fmap" as "fap fap fap"
 
lol
fap fap fap
 
11:14 PM
room topic changed to Lounge<C++>: My university decided today is Friday. [c++] [c++11] [c++-faq]
(No, really. Today's classes are according to Friday's plan.)
 
hahah
 
11:50 PM
Woah. Oz failed so hard, Firefox's working set was forced down to 1MB.
> *** Warning: Mozart: virtual memory exhausted.
Warning.
(And that's why allowing unlimited recursion is a bad thing.)
Well, by default.
 

« first day (388 days earlier)      last day (4561 days later) »