« first day (2310 days earlier)      last day (2653 days later) » 
00:00 - 16:0016:00 - 00:00

12:04 AM
@Xeo Fun to think that problems like this don't exist if you use strongly typed timestamps.
 
Xeo
@StackedCrooked god I wish
FDateTime is shit
It has FDateTime::Now() for localtime, but that's the extent of it. Doesn't remember the timezone or any of that shit.
 
@Xeo really damn ugly
 
Xeo
I could prolly create the formatter on the stack at least...
 
@Xeo everyone does dates wrong
 
Xeo
I'll also have to patch Unreal to allow the gamecode to actually access the weekday functionality... guh
at least I can actually do that
 
 
1 hour later…
1:17 AM
ugg, can't C++ any more
maybe go outside? idk
 
1:28 AM
what is this outside you speak of
 
still doing C++, fucking scroll bars and stufffffffffffffffffffffffffff
 
1:43 AM
Fuck, I got a headache from all the spaghetti math needed to roll custom resize, layout things.
 
spaghetti meth the best meth
 
mmmmm spaghetti meth
 
2:06 AM
@jaggedSpire Tea?
 
@Borgleader what a dignified cat
 
Ven
Hello
 
sup
 
sup
 
i'm back
 
2:20 AM
still with the C++ or have you located this outside you keep talking about
 
Left the coffee shop, and now I'm at home. But yes, just started another build.
 
2:32 AM
qQNaN()
 
Xeo
> 3> Performing 904 actions (4 in parallel)
T_T
 
compiling in vs?
 
Xeo
ye
Unreal
Touched a really basic header (FText)
 
use fastbuild ;)
 
Xeo
and I even have module builds enabled (i.e., unity build per module)
otherwise it'd be over 5k actions
eeeh, doesn't help alone at home, does it
 
2:41 AM
according to the website the parallelization is better, but i was kidding cuz the setup of it is annoying (you need to create .fbuild files, kinda like .ninja files)
 
I've had a really good experience with Incredibuild, but I got no money at work. Last "sprint" I used a trial copy...
MSVC doesn't parallelize external build tools (like Qt Moc, or NVCC) but incredibuild does...
 
3:08 AM
Hello, Cruel World!
 
s/uel/ude/
as opposite to polished world
 
there's that, too =p
need...moar...ram!
my poor little machine can't keep up with all my tabs in Chrome
 
use a page file
 
there are 4 types of humans: domesticated humans, free range humans, wild humans and feral humans ... then there are domesticated humans who are feral at heart
 
yah, I have a swap partition...that's the problem. Lots of swapping
 
3:11 AM
LTO will save us
 
link time optimization
 
ello
anyone here to help?
 
no
we are here to lounge
 
give me link to q&a chat room
and u come there and help me with some questions
please
 
3:17 AM

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
 
How about you just post a question on SO?
 
@KartikV we can help you close your question, yes
 
Xeo
> 3> [626/904]
still compiling...
 
what is so?
 
Xeo
@Mikhail We're using Increadibuild at work, it's super nice
 
3:20 AM
yes it is nice!!! increadibuild, name is nice too!
some one come to Q&A
 
3:36 AM
I had 58 errors, then I added 3 frameworks & now there are only 52 errors
at this rate, I need to add another 30 frameworks for those errors to all go away
 
that would seem to be the logical conclusion
 
Just use React Native
actually that probably isn't bad advice
 
4:02 AM
Reject any and all non-bad advice
Accept only advice terrible and horrendous
Only then shall you become a true C++ developer
 
4:43 AM
And here we have an artist's impression of a C++ programmer in their natural habitat: drinking to soften the harsh idiosyncrasies of their chosen language.
Note that no amount of alcohol is sufficient for the task.
Tfw the dessert comes out with two spoons
 
TIL about std::stoi.
Finally I can convert strings to integers.
 
You're one of today's lucky probably less than 10000 then. Grats
Convenience is a beautiful thing. Did you use string streams before this?
 
Yep. Or boost::lexical_cast.
 
5:47 AM
I think my lamb BBQ skill is improving
 
6:18 AM
_CVOpenGLESTextureCacheCreateTextureFromImage ... what a variable name ...
 
6:40 AM
finally, 0 errors
life is slightly better when you have grilled lamb, onion & potato in your tummy & 0 errors in your code
 
 
1 hour later…
Ell
7:42 AM
@StackedCrooked or std::to_string
 
8:01 AM
Hello everyone! Can someone please point me to good C++ OOP projects source code I can go through to practice OOP side of C++?
 
some one come to q&a
 
Has any one worked in C++ on a Mac /
?
 
yes
use command line
 
Which is the best IDE ?
I have installed and configured Eclipse
But it is a big headache
 
8:16 AM
text editor
 
No idea as why the configuration is complicated and is very cumbersome
 
g++ should have already been installed, use terminal window and type 'which g++' to verify
just use vi
 
@ProblemSlover Thanks
 
8:37 AM
How is netbeans ?
Any one have used it ?
 
if you are desperate, you can use xcode
 
 
1 hour later…
10:06 AM
^ Interesting.
 
user1804599
10:27 AM
Astronomers eat metal for breakfast.
 
^ Wow
This is from the CORBA spec.
Design by committee at its worst.
 
user1804599
Haha CORBA
 
Xeo
> UnicodeString getBestPattern(const UnicodeString& skeleton, UErrorCode& status);
why the fuck is this not const
aaaah
in other news, avatar still broken. sigh
shows fine in chat profile and next to the input box
siiiigh
 
user1804599
10:36 AM
Lol someone illegally crossed the railroad with his bike, got hit by a train, survived, and got charged for "leaving the place the traffic accident happened".
 
@rightfold Good.
 
user1804599
In addition for cycling drunk and crossing a railroad.
 
@rightfold "people illegally crossing the railroad with their bikes" sounds like a self-correcting problem
 
user1804599
It's sad if they die.
 
user1804599
Stupid people can be valuable too.
 
10:38 AM
@Mysticial Well, I would not want to be the conductor of the train who smears a person over hundreds of meters of tracks before they manage to stop the train.
 
Xeo
also, there are no discussions around ICU's datetime stuff, this is frustrating...
oh hey, small avatar is fine in chat.
bloody hell
 
user1804599
Lol a couple went on vacation to Afghanistan, got hurt by a grenade explosion, now is suing traveling agency.
 
@wilx You do have a point there.
 
user1804599
Not the Onion. How naive can one be.
 
My high school was adjacent to a railroad and they had a lot of problems with kids killing themselves because they couldn't live up academically.
 
10:39 AM
Hi
 
Lost two guys in my class. I've met one of them. But only shortly.
 
@Mysticial uh, wtf?
 
@Xeo A recent critique on getters I heard is that the verb to get doesn't imply immutability at all.
So don't blame the library :P
 
@littlepootis Yeah, freshman year, one guy jumped in front of the train and got launched 200 feet. He died. Name was Steven Wertheimer. A year later, same class now as sophomores. Another guy did the same. Name was Ben Tachibana. I've met him once, though I was closer to his older siblings since we were in the same science team.
 
I have just bought 10 different hair claws online
 
Xeo
10:43 AM
also, ICU is just terrible programming-wise
 
I still remember wondering why the train was stopped while I was waiting to get into my social studies class. Found out the next day that somebody killed himself.
 
That's rather hard-core.
The kids must have been under enormous pressure.
 
I wasn't hit as hard as the other people. Mainly because I transferred in from a different district for high school. Most of the people there had been together since preschool.
So I didn't really get to know anybody until like my junior year and both suicides in my class were before that.
 
Xeo
holy shit ICU is so bad
 
user1804599
wrap it
 
Xeo
10:55 AM
that doesn't help if the underlying library is fucking bad
 
The worst kind software is 3rd party commercial software used inside companies. They have immense learning curves and are full of quirks. The users are employees that need to use it for their job.
 
Xeo
I checked the source for why the hell getBestPattern isn't const - because they have a DateTimeMatcher member where they set the pattern inside of getBestPattern ...
 
So they get used to it and learn to avoid the quirks.
 
Xeo
void
DateTimeMatcher::getBasePattern(UnicodeString &result ) {
    result.remove(); // Reset the result first.
    for (int32_t i=0; i<UDATPG_FIELD_COUNT; ++i ) {
        if (skeleton.baseOriginal[i].length()!=0) {
            result += skeleton.baseOriginal[i];
        }
    }
}
so fucking bad
it could be const, since it only reads from the skeleton member....
gawd, fuck ICU
 
Just modify the source code then :P
 
Xeo
10:59 AM
not sure if that would fly
modifying the engine is one thing
but modifying a third-party dependency of the engine? seems like a recipe for future trouble
 
Is it causing const propagation issues in your code?
 
Xeo
ugh. I thought I could be clever and just reuse the same DateTimePatternGenerator, created once when the Unreal Culture is created... but I can't, since the member functions I need aren't const. And they aren't const because they set state on a fucking matcher in the function.
this is all so terrible
 
Hm, call getBasePattern on a local copy?
DateTimeMatcher(const_member_).getBasePattern
 
Xeo
Might as-well just recreate it locally, then...
 
or make sure the object is mutable and start const_casting a lot
 
Xeo
11:04 AM
Nah. Would be std::unique_ptr p{ MemberPatternGen->clone() };
cuz all the shit in ICU is dynamically allocated
@LucDanton *immutable ?
 
@Xeo don’t call non-const member functions on immutable objects you silly goose
 
Xeo
the problem is the other way around
ICU is all mutable (non-const) for the getX functions I need
I wanna pass the generator around as const
 
do it, then const_cast
that’s exactly what const_cast is for
but you gotta make sure the underlying object is mutable
 
Xeo
Okay, I see what you're getting at.
But no. Just no.
 
const fundamentalism :P
 
Xeo
11:07 AM
I could pass it around as non-const.
I think, anyways
lemme check
hm, yeah, I could. I was concerned with thread-safety, but considering that none of this shit in Unreal seems to be thread-safe anyways....
	if (!ICUDateTimeFormat.IsValid())
	{
		ICUDateTimeFormat = CreateDateTimeFormat( ICULocale, icu::DateFormat::EStyle::kDefault, icu::DateFormat::EStyle::kDefault, icu::TimeZone::createDefault() );
	}
guess I'll just pass it around as non-const then to the one function that needs it
but guh
this thing should be const. So terrible.
R getBestPattern(...) {
    ...
    matcher->set(pattern);
    ...
}

void DateTimeMatcher::set(...) {
    // compute skeleton
   copyFrom(skeleton);
}
it fully recreates the state anyways when setting the pattern
it could just be a local var...
 
Ell
@Xeo are you saying there is a gap in the c++ library market for a good time&date library?
 
Xeo
Howard's dt.h seems nice, but I don't know if it can deal with arbitrary patterns, since those also require i18n data (for months, weekdays, etc)
 
or a good anything library
 
nwp
nah, all C++ libraries are perfect because C++ is a language for writing libraries
 
user1804599
11:29 AM
@Xeo same goes for the language
 
12:02 PM
Uh, the latest design change on GitHub surprised me.
 
12:22 PM
looks like 15% done dark theme
yt has something similar
 
Haha, there's a proposal by Herb to add operator<=> to C++ :D
 
What a waste of everyone's time
 
Xeo
what would that do...
 
I still have to read the proposal, but for sure it's a three-way comparison.
 
@Ell there's a gap for that most everywhere, to be honest.
@Morwenn I would expecr Herb to know bettet than to waste everyone's time with this shit.
 
12:27 PM
@R.MartinhoFernandes have you tried noda time?
 
I contributed to it :D
 
@R.MartinhoFernandes I'd like to read the whole rationale before criticzing but I currently only have the wording paper by Jans Maurer :/
 
:)
I contributed to noda by asking skeet what his username on SO is :)
Not sure he got the joke even after I explained it
 
Also fixed a couple mono bugs found during the NodaTime development.
@JohanLarsson anyway, that one is really good.
 
I have not used it for anything real but it looks good
do you write rust at work?
 
12:33 PM
@Xeo ICU's interfaces are just generally terrible because they're translated from Java. To be honest, even the Java interface is subpar.
I'd say you can open any random ICU class reference page and give several lectures on bad C++ API design without needing any other examples.
@JohanLarsson on hack day projects.
 
you should get a c# job and help me write roslyn things :)
 
Xeo
At work we use just the standard Java 8(?) Instant-based stuff in the back-end, which I think is based on JodaTime?
 
ICU is great because of its comprehensiveness, but that's about it, sadly.
@Xeo yeah
 
Xeo
Shame though that the Instant-api doesn't have properly typed durations. get(ChronoUnit.Seconds) n shit like that
<chrono> spoiled me.
 
Java generics aren't as nice as C++ templates for that
 
Xeo
12:40 PM
I noticed that...
Generics suck. :<
 
Boost isn't too bad, btw
 
Xeo
No Boost for our project, unfortunately. Only Unreal stuff, really. Can't even actually use stdlib. :<
Since Unreal reimplements a lot of it
 
But it seems you need mostly formatting anyway
 
Xeo
I would also be fine with just getting the weekday for a certain date as an int or enum, and do the translation ourselves
but I think it's way easier to add FText::AsDayOfWeek(Date) than coaxing FDateTime to use ICU n shit, since I think it's not even part of that module.
Maybe as a pull-request to Unreal in the far future add a proper date-time type that is backed by ICU's Calendar and stuff
I think I'll even add a more general FText::AsDateTime(Date, Pattern). I basically added the machinery for that anyways, since I needed it to use the "EEEE" pattern for AsDayOfWeek.
 
1:21 PM
@Morwenn they're trying to be consistently inconsistent with the new SO's design change
 
@milleniumbug New?
Looks like I've already forgotten the old one.
 
1:39 PM
Literally nothing changed for me because I use userstyles for both of them
Because I like having eyes
@Morwenn Bar on top has diffferent colour
 
Good morning fellow C++ers
 
it's clearly afternoon
 
@Morwenn ...or will have a different color (it's at A/B testing phase, there was a meta post)
 
Is there a Spotify app alternative?
 
Well, getting video out of Flash based web player is hard. I had to use Wireshark to see some of the RTMP communication and then use rtmpdump do download it.
 
1:52 PM
It's so freaking slow
Just to fetch a list of songs
 
user1804599
fucking fuckshit tits
 
user1804599
Cargo is so fucking terrible
 
user1804599
 
Xeo
UnicodeString& toPattern(UnicodeString& result) const;
guuuuh
 
a 3 yo app is so much easier to maintain than one that you have not touched for 5 years ...
omg it's the 2nd month in 2017 already ...
 
Xeo
2:05 PM
// NULL pointer check
if (tempus1 == NULL) {
lol
Oh wait, even more fun
UnicodeString *tempus1 = new UnicodeString(TRUE, resStr, resStrLen);
// NULL pointer check
if (tempus1 == NULL) {
    status = U_MEMORY_ALLOCATION_ERROR;
    return;
}
Ah, no, not as fun as I thought. ICU overrides new/delete... though that in itself is fun...
 
wow, that's some badness incarnate
 
user1804599
> if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

Errors

No error values are defined for this function.
 
user1804599
yeah ok wat
 
@milleniumbug Oh, I probably missed it.
 
one could use ::new UnicodeString, but if this is how the library tries to desperately avoid exceptions, it's most likely not exception safe
 
Xeo
2:18 PM
I'm not sure about the intended semantics, but setting fDateOverride twice looks very questionable to me...
Especially since it sets fTimeOverride and fDateOverride in the case where both timeStyle and dateStyle are != kNone
(here's the code for comparison: dl.dropboxusercontent.com/u/14327987/tmp/DP8d.png)
Also, bloody hell all that copy-pasted duplicate code....
And the only "helpful" comments in there? // NULL pointer check. :D
 
neither of these images work for me
 
Xeo
somebody be blocking dropbox or sth. the first one even oneboxed for me
 
> dl.dropboxusercontent.com uses an invalid security certificate. The certificate is not trusted because it is self-signed. The certificate is not valid for the name dl.dropboxusercontent.com. The certificate expired on 20 April 2016 at 09:28. The current time is 11 February 2017 at 15:22. Error code: SEC_ERROR_UNKNOWN_ISSUER
 
Xeo
huh
 
good question
 
Xeo
2:23 PM
newest FF here, all fine. anybody else with that problem?
 
I'm on newest FF DevEd FWIW
 
@Xeo it oneboxed for me too
FF 51.0.1
 
2:48 PM
@Xeo aaaaaaargh the hungarians!
 
Xeo
NOT "AAAARGH THE CODE"?!
 
didn't get to the code
 
user1804599
3:02 PM
    |
139 |       pub fn data(&mut self) -> &[u8] {
    |  _____________________________________^ starting here...
140 | |
141 | |     }
    | |_____^ ...ending here: expected &[u8], found ()
    |
 
user1804599
ASCII art :(
 
3:18 PM
@StackedCrooked Sounds like a preacher preaching his version of the Bible.
 
Sounds like something that would never work in brown-field.
 
yeah
we regularly won'tfix bugs or defer fixing them
 
@R.MartinhoFernandes Brown-field?
 
@wilx Green-field projects are new projects. Brown-field is when the project already exists.
 
@R.MartinhoFernandes Oh, interesting.
 
3:19 PM
our server is a complete mess in various places
but we defer it
 
Meaning I don't think his approach makes any sense if you're starting scrum in an existing non-scrum project.
 
endlessly in some cases
 
@wilx Fun fact: it's the same guy that first coined the term "CRTP" (curiously recurring template pattern).
 
@StackedCrooked Interesting, too.
 
Xeo
@Puppy We also got a couple bugs that are either so rare and annoying to fix, that we aren't bothering, or that are just too hard to repro. Also minor bugs that are mostly unnoticeable or don't impact the user even if they encounter them
 
3:24 PM
our entire existing client is pretty much like that
 
Xeo
We do have a hard line of 15 Medium or higher bugs we are not allowed to go over for release, tho
 
@Xeo That's typically solved by downgrading severity of some of the bugs.
 
Xeo
No, by actually fixing them :P
we have around a half-week for bugfixing before release, generally
 
@Xeo That sounds very little.
 
Xeo
Eh. We're 6 front-end devs right now.
And we're usually around 30-40 non-Minor bugs at that point
it's not that they're necessarily hard to fix, just no time cuz of the feature. so we have the dedicated buffer at the end
 
3:27 PM
@Xeo Bugs that are rare and annoying to fix? That's kinda scary.
 
Xeo
debugging mobile be annoying, yo
 
I'd feel like I'm losing control over the system.
 
Xeo
it's not that bad
 
Ah. Never done mobile though.
 
Xeo
but sometimes, you just can't repro them in a dev environment, no matter how many QA guys or devs try
so we can only go by the crash dumps we get
luckily, since those are so hard to repro, they only affect a tiny part of the players
still shitty, of course
but just hard to do anything about
especially when the stacktrace starts in some async task graph
we have one very annoying and persistent bug with animation updates
and we just can't get it repro'd in a dev environment
it's an async animation blueprint update thingy that breaks for whatever reason
so yeah, have fun debugging that, even if you get it repro'd
 
3:31 PM
Can you run valgrind on the device? :)
 
@Xeo Yes.
 
@Xeo We call that a bug ceiling.
 
our web client, half the time the Mac won't even connect to it, and most of the rest of the time, it's so laggy and sourcemaps don't work etc
 
@R.MartinhoFernandes I just imagined a ceiling full of spiders >.<
 
Xeo
@StackedCrooked doesn't help
since we can't get it repro'd :)
 
3:33 PM
Oh, right.
 
We just keep pushing the ceiling lower and lower slowly till we get to zero.
 
Xeo
most annoying part about it is that we actually managed to repro it once. just once.
and all the data we saw was garbage
 
However, Valgrind will still point out invalid memory accesses even if they don't cause a crash.
 
Xeo
so something was doing an async blueprint anymation update on garbage data
yay
no idea how to even start figuring out where that came from
 
@Xeo Ewwww, stabilization days are horrible, I think.
Just fix bugs as you go.
 
Xeo
3:34 PM
switching away from feature tasks is annoying tho~
 
the problem I have isn't fixing bugs
it's finding them and testing
 
Xeo
that said, we do actually have 1 and sometimes 2 guys that are not working on features but tackling bugs the whole time
 
I have a web UI, with three different backends (HTML5 and two different native plugin jobbies) and two different servers, across five browsers
 
@Xeo You just intersperse them.
 
3:36 PM
@Xeo We have 1 guy a week doing just bug fixing (we do a rotation)
 
We're four developers, and we get one bug each each sprint.
 
Xeo
anyway, gotta go
(also, we don't have sprints anymore, yay!)
 
ttyl
 
I especially hate HTML and the HTML5 backend, since the browsers don't implement them consistently
 
@Xeo Why yay?
 
3:36 PM
so you have to re-test the whole fucking thing all over again for every little change
and unit tests are not very effective since almost all of it is integration
 
I was once tasked with writing an IE toolbar extension. When I finally got it released it turned out that there was a bug that caused IE to crash during process shutdown. Took me a really long time to find it. Apparently it was caused by a hooking system that my colleague had created for win32 applications. In IE the hook had to be unregistered before shutdown in order to avoid the crash.
 
user1804599
blame IE
 
I traced that bug doing un/commenting out code in binary search fashion.
@rightfold Yeah.
It was IE8.
 
user1804599
lol
 
user1804599
I have to wrap an immovable struct with Rust FFI.
 
user1804599
3:43 PM
Not sure how to do it.
 
When I wrote the second version I also included a system service that would be installed along with the toolbar and it would automatically update the toolbar if a new version became available. I really felt the need to be able to update the toolbar (without needing user confirmation) in case another bad bug turned up.
 
user1804599
I could use do a callback perhaps.
 
user1804599
Or a heap allocation.
 
@rightfold wrap?
I'm unfamiliar with the practice of wrapping structs.
 
user1804599
I guess I'll just do a heap allocation.
 
3:46 PM
Oh wait. you mean serialization?
 
user1804599
There is a C struct. You cannot safely blit it.
 
user1804599
Rust implements move through blits, and everything is movable if there's no pointer to it.
 
I don't get why people do things like that anymore
blitting is not some great thing that everything should do
it's a useful default at best
 
user1804599
Because the immense complexity of not doing so isn't worth it.
 
user1804599
There are very few use cases (such as this one).
 
3:49 PM
What if a member of the struct points to another member?
 
yes, the complexity of calling a user-defined function is just super bad
 
user1804599
@StackedCrooked Yes, that's something you can't do.
 
user1804599
Luckily, you hardly ever need that.
 
Figured.
 
user1804599
pub fn new() -> Self {
    let mut handle = transmute(malloc(64));
    unsafe { zmq_msg_init(handle) };
    Message(handle)
}
 
user1804599
3:53 PM
aw man
 
Ven
@rightfold buttiful stuff
 
user1804599
XD AWFUL
 
00:00 - 16:0016:00 - 00:00

« first day (2310 days earlier)      last day (2653 days later) »