« first day (3931 days earlier)      last day (1096 days later) » 

12:00 AM
That’s not good at all. 🙁
 
Fortunately it's getting less entrenched in a lot of places.
Turns out excluding more than half the population ends up being bad for business, among other problems. 😉
 
How is your game dev going?
 
12:24 AM
@DMGregory Those are some great names and works to check out.
Celeste is awesome.
 
Going alright. :) We just branched for first submission.
And at home, I'm prototyping some rhythm game mechanics I might try using at a game jam next weekend.
I'm a bit sad that Flash is effectively dead now. I loved showing Anna Anthropy's Dys4ia to my students as a concise example of using gameplay mechanics to convey meaning.
 
I imagine I would have liked that.
I wonder if I can find some playable version of it.
 
I've got it as an .swf, if you have a standalone flash player to run it.
When showing it to my students, I do give content warnings for misgendering, transphobia, nudity and blood (just a little, very pixelated).
 
hmm I have Adobe Flash but not sure the last time I ran it.
Did the EOL make it unusable?
 
Nope, just doesn't run in browsers anymore.
 
12:38 AM
sweet.
 
Wait... somehow this version appears to still be playable.
 
yup. I just found that
 
12:54 AM
Looks like it might be a slightly older/glitchier version though... got stuck on one of the last vignettes...
 
the bricks?
 
Yeah
 
same
 
1:38 AM
@DMGregory I just played “Happy Wheels” a lot of the time.
But they created a new JavaScript enabled version, so I still play.
 
2:10 AM
It's a shame. The ending is quite good.
 
 
11 hours later…
1:35 PM
Morning!
 
Good morning. :)
 
user92578
Heyhey :)
 
Gonna get my 5G chip tomorrow!
 
nwp
First one?
 
Yep.
 
nwp
1:42 PM
Let's hope they forget to turn on the side effects.
 
Good luck! I've still got a two week wait till my first.
 
Yes; well I've also ordered an suit made of asbestos to block the signal.
@DMGregory Yeah, we've been "lucky" here. A tip I heard was to look often if there were new spots opening up.
 
Yeah, Toronto's been pretty swamped, so nothing in my area has had capacity for under-40 until very recently.
 
Yeah, I see. For us, since we live in "the suburbs", we can chose spots either in the city, or on the south shore, giving us more options.
 
 
2 hours later…
4:13 PM
Welp. This code works on my machine but not on coliru...
 
user92578
Coliru is gcc, your machine MSVC?
 
Yep ;)
 
user92578
Are you compiling with /permissive- on your machine?
 
Hmm, hold on.
Apparently, I am.
 
user92578
Okay, then it must be either something that even that doesn't cover or a bug on gcc
 
4:17 PM
Hmm, well I am in my test app. I'm not in the main app, and the language standard is also not set.. (???)
Looks like I have a couple of things to fix there.
Ah, the c++17 flag is set "manually"
I suppose I should make it working in VS and on coliru, not sure I'd like this to bite me in the ass when I upgrade to vs 2019 (or 21/22)..?
 
user92578
I'd be somewhat surprised if it compiled on VS2017 but not on VS2019
 
user92578
Also this has a bunch of different compilers you can try: godbolt.org
 
Ah, yes I could try that one to see if it would compile under a more recent version of VS!
 
4:34 PM
Turns out, I used std::apply to iterate over the tuple elements
template<typename T>
T fromJson( const Json& data ) {
  T object;

  // Thanks to stackoverflow.com/a/54053084
  std::apply(
      [&object, &data]( auto&&... args ) {
        ( recursivelySetData( object, args, data ) , ... ); }
    , T::properties
    );

  return object;
}
 
user92578
That's really neat
 
Yes, much more simple that other options!
The issue I seem to be having with g++ is that it will generate a templated function even if it's not needed..
 
user92578
What do you mean?
 
(It will "raise" the static_assert( false...) that there is in it. )
 
user92578
static_assert where exactly?
 
4:43 PM
/// This is the "model" template that is used to extract a JSON value into a
/// value usable by our object. If it is invoked, it will raise an error at
/// compile time as all used specializations should be defined.
template<typename T>
T asValue( const Json& data )
{
  static_assert(
      false,
    "unknown type. make sure a specialization for asvalue for this type has "
      "been defined." );

  return t();
}

/// This is the template specialization for T == double.
template<>
double asValue( const Json& data )
arrr
hold on
fixed
 
user92578
template<> double asValue<double>(const Json& data) I think
 
user92578
> When specializing a function template, its template arguments can be omitted if template argument deduction can provide them from the function arguments:
 
If I am to call asValue<int>(...) in vc++, I'll get the static_assert, presumably because the function will be generated by the compiler. If I don't call asValue<int>(...), I don't get the assert. This works fine in vc++, but it complains in g++ whether I call the function or not.
Hmm, still the same. An option would be to declare the first template, but not define it. That would make a linker error.
 
user92578
Oh wow yeah I can reproduce that on gcc
 
user92578
51
Q: C++11 static_assert and template instantiation

user2023370In C++11, should the operation of static_assert within a template depend on whether that template has been instantiated or not? For example, with the following code template <int I> void sa() { static_assert(0,"Hello."); } int main(int argc, char *argv[]) { return 0; } GCC 4.5.0 will fail th...

 
user92578
4:51 PM
Apparently if the static_assert doesn't depend on any template parameter it's legal to evaluate the static_assert even if the template is not instantiated
 
Nice!
I'll see if I can hack this with template stuff, or use the linker approach (which is much less clear).
 
user92578
Extra boolean template param seems to do the trick for an example: godbolt.org/z/hETvoeqzW
 
5:04 PM
So here the idea is that the compiler will not know until it instantiate the templated function whether Assert is true or false?
 
user92578
Actually now that I reread the SO thread, I think the issue was that template <typename T> T asValue(const Json&) was not ever going to compile for any T, which is ill-formed
 
Yes; so the conclusion would probably to not use this approach :P
 
user92578
But the boolean makes it so that it could compile, just not in the use we have
 
user92578
As a side note, you will probably need to either switch your API to template <typename T> assignValue(const Json& json, T& value) or use structs instead, assuming you will eventually need partial specializations for containers of types etc.
 
Hmm, right, probably; I did not consider vectors yet.
The answer proposed about using another function "works" too.
template<typename T>
constexpr bool retFalse()
{
  return false;
}

/// This is the "model" template that is used to extract a JSON value into a
/// value usable by our object. If it is invoked, it will raise an error at
/// compile time as all used specializations should be defined.
template<typename T>
T asValue( const Json& data )
{
    static_assert(
      retFalse<T>(),
      "unknown type. make sure a specialization for asvalue for this type has "
      "been defined." );

  return T();
}
review queue full...
unbelievable...
 
5:28 PM
This whole thing is annoying. I have made something similar to load data from XML; now I'm doing this for JSON too...
 
user92578
I have objects IO::Json::Writer, IO::Json::Reader, IO::Binary::Writer and IO::Binary::Reader and my reflection (the high level serialization) code just calls the Serialize(name, member) method on those objects
 
Yeah, I suppose using properties like this can open up those doors.
Here we're using the XML for our "environments"/Entities-and-Components (what the scenes are made up), while JSON (and another "proprietary" text format) are used for other program settings.
(we only read, we never write)
@Tyyppi_77 Thanks a bunch for your help!
 
6:05 PM
Did they just changed the font on the main site?
 
Apparently.
157
Q: We are switching to system fonts on May 10, 2021

Aaron ShekeyUpdate - These changes are now live! TL;DR We’re shipping system fonts as our default font stack. We plan to do this on May 10th, 2021. What? We’re planning on specifying system fonts on Stack Overflow and the Stack Exchange Network. On macOS and iOS, you’ll see things set in San Francisco. On Wi...

 
6:20 PM
Heh... /shrug.
 
6:42 PM
Esc is the worst for chat.
I noticed the font change too. I don't think their "GitHub’s rationale for switching" for switching is an apples to apples comparison. When I looked at their before & after screenshots, the differences were too subtle for me to spot.
 
I'm sure a bunch of "regular users" will change the default font using a user script...
 
Not really a fan of Cascadia Mono either. I tried it for a day when the upcoming VS update was announced.
 
Yeah, I say they changed the font too... I'll see when it happens. Then change if need be..
I'm not a fan of them changing it either.
I mean, people can change it if they want, why push this to everyone?
/shrug
 
It sounds like if I uninstall Cascadia, it would fall back to Consolas, so I guess there's that.
I like Cascadia's license better than that Consolas, so on paper I would have agreed with the change. I just don't like using it as a typeface for work.
I wasn't familiar with the Segoe UI Mono option. Considering it doesn't have a dotted or slashed zero, I'm surprised it made the cut for mono width type consideration.
 
w.r.t. potential confusion with capital O?
 
6:55 PM
Yes.
 
Yeah okay, I guess it is a weird choice. I suppose "well you'll use the context, right?".
 
It's not nearly as bad as some fonts, but for coding, I'm not interested in paying an extra mental tax that I could just as easily avoid.
 
Does it occur often though that you have to think whether it is a zero or a capital o?
 
Admittedly, I don't have data on that, even wrt myself. I will admit to being a very sub par typist though. I have mistakenly keyed lower case o instead of 0. As to the often enough part? I suppose that's debateable.
But in my day, I had t' walk uphill both ways t' the computer with m' stack a punch cards. My zee-rows had slahses 'n m' ohhs didn't. Now a days I can't tell em apart no more, 'n the kids won't git off m' lawn.
 
;)
Sometimes I type English things with how French is pronounced or written. Sometimes I type French stuff with how English things are pronounced or written. In my case, I have more to complain to my own brain than to how a character looks like!
 

« first day (3931 days earlier)      last day (1096 days later) »