« first day (4516 days earlier)      last day (338 days later) » 

1:19 AM
@PlaceReporter99 a game where you guess a secret word by progressively guessing similar words
 
@Seggan niiiiiiiiiiiiiiice
 
1:47 AM
just renewed my jetbrains educational pack, github will be a bit harder...
as i dont actually have any proof i was in college for the year other than access to my email (no id, no paperwork of this year)
 
 
1 hour later…
2:48 AM
@Seggan that should be enough
Iirc I only needed my uni email and just to tell them when I will most likely finish up being a student
 
The time I registered I needed paper proof, which I gave my course sheet for
 
3:54 AM
@Seggan that's to get in. I think renewal is a little less strict
 
 
4 hours later…
7:53 AM
@mousetail but the absence of light still needs to reach your eyes.
 
Nope, it can cross the width of your eye faster than light can travel
 
8:42 AM
@RydwolfPrograms Really? My first hit is a guy named Évariste Galois.
 
9:31 AM
is anyone here a moderator on math.se?
 
I'd ask in the math.se chatroom
 
9:57 AM
@mousetail it’s just someone told me to hang myself and then removed the message and started denying they ever said it.
 
Ouch, you can flag their profile for moderator attention then say what happened
Link to the message
Mods are mostly on strike but staff is prioritizing those types of messages
Also stop talking to them
 
@mousetail I see no flag button
 
Flag one of their posts or if they don't have any flag one of your own posts
 
10:11 AM
@mousetail done. Flagged their “oops” post two messages below.
 
Flagging chat messages unfortunatly doesn't work, since it just notifies random 10K people who can't see deleted messages. Mods or staff should respond though
 
10:42 AM
@mousetail were you one of those random 10k people?
 
Yes
 
11:29 AM
@mousetail their succeeding messages were eradicated
 
By a mod?
 
@mousetail idk I just saw.
 
 
2 hours later…
1:26 PM
What are these compiler errors? Everything builds just fine locally and then it blows up in CI
src/int24.hh:31:33: error: expected type-specifier before ‘ptrdiff_t’
   31 |     constexpr explicit operator ptrdiff_t() const noexcept {
      |                                 ^~~~~~~~~
src/int24.hh:9:17: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
    int24_t() = default;
                ^
Don't tell me it's building with C++03 or C++98 by default
And MSVC failed because I forgot the /link flag :facepalm:
@Bbrk24 Well -std=gnu++17 didn't fix it so now I'm really confused
 
interestingly, it compiled on windows this time
 
@lyxal Yeah because I fixed the problem there. It seems like one of the headers I'm including defines ptrdiff_t on Windows but not Ubuntu
 
1:42 PM
that sounds like fun
 
In particular, cstdint. Standardly it's only guaranteed to be defined by cstddef.
 
that do be like it how it is sometimes
> As such, it is recommended to use C++20 or later if performance is a concern. (If it is, why? How are you possibly using this language in a performance-sensitive environment?)
would like a word with you :p
 
As if my language will ever be competitive there
 
you never know :p
it might just be fast enough to beat an unoptimised c++ example submission :p
 
of course
Oh great, it's a template error
int32_t is int and int64_t is long long, so there isn't an overload that accepts long. :facepalm:
// So on most modern systems, int32_t is int, and int64_t is long long. On Windows, time_t is also long long, but on
// macOS it's just long. Still 64 bits, but it's a nominally different type, so there's "no" valid overloads. If I
// just add an overload that takes time_t, Windows complains that I've declared the one taking long long twice, so I
// have to do this.
constexpr explicit int24_t(int x) noexcept : value(static_cast<int32_t>(x)) {}
MAYBE_UNUSED explicit int24_t(long x) noexcept : value(static_cast<int32_t>(x)) {}
Okay, let's try this
 
2:06 PM
@lyxal right, i also saw one
 
Firefox latest version windows 11 with dark mode reader extension, and a few site improvements userscripts for reference
 
@Bbrk24 Is it really necessary to dump these here?
 
Sorry
 
2:28 PM
Does anyone know a good way to measure to perceptual difference between two colors in code? This is assuming standard color vision (I am in fact color blind myself!)
 
@Simd A simple approach is to represent as HSL and then subtract the corresponding values.
 
@Adám oh thanks!
So use the Euclidean distance of the HSL values?
 
No, just a normal difference. You need three values to describe the differences in each of the three qualities of the colours. ∆H describes the kind of colour (typical adjectives are "red" and "blue"), ∆S is how intense the colour is (typical adjectives are "vibrant" and "faded"), ∆L describes how bright the colour is (typical adjectives are "dark" and "light").
 
So to convert that into a distance what should I do?
 
A single number to say how "far" one color is from another will not be meaningful at all to a normal colour vision persion.
 
2:35 PM
Just add the differences?
@Adám ah
 
@Simd What are you intending to use this for?
 
@Adám my real application is that I have plotted heatmap using the magma color map. I want to change the color for one of the values to something that sticks out
 
Ah, you can't really compute such directly, as human perception doesn't map well to simple mathematical models.
If you show me the magma colour map using all the used colours, I can tell you what till stick out.
 
@Adám I was hoping using the method in that wiki page might help
@Adám thanks!
Algorithm question, given a set of points A in 3d where each dimension is from 0 to 255, find a 3d point not necessarily in the set that has the furthest minimum distance to A.
 
2:52 PM
That's either going to be their midpoint or at one of the 8 corners.
 
Can you explain why?
That's cool if true
 
@Bbrk24 would templating help?
 
@Simd Well, think about a bunch of positions in a box. One extreme case would be 8 points, at the corners, where the furthest point would be exactly in the middle. Another extreme would be all the points being in the middle, where any corner would be the furthest. If even slightly offset from the middle, the furthest would be the "opposite" corner. All other cases are in between the two extremes.
 
I like it
Thank you
 
Not necessarily if you have more than 8 points
Consider 9 points, one in each corner and one in the center
 
2:56 PM
@mousetail How so?
 
the furthest away point would be on the side
 
But I am not sure. Imagine we have points at all corners and one in the centre
@mousetail snap :)
 
Ah, good point (no pun intended).
 
:)
 
Then I'm not sure how to attack this. An "easy" analog solution would be to affix positively charged particles in the actual positions under microgravity, then let loose one more particle in the box and see where it goes. (Although, it might get stuck in a local minimum before to reaches the best position…)
 
2:59 PM
I think we need to find the centre of the largest empty circle
 
Something like that, if the only thing that matters is the distance to the closest points. (i.e. additional points further away don't matter).
 
@Adám You could release multiple particles at once then find the one that reaches the lowest maximum
 
Still no guarantee.
 
@Adám I think that's the right definition
 
E.g. if we have 100 points in each corner, and a single point in the middle, do you still want the answer to be along one edge, or do you want (slightly offset from) the middle?
 
3:02 PM
I have an old project where I just brute forced all possible colors to find the most distant ones recursively
 
"All possible"‽
 
@mousetail did you use lab color?
 
All sRGB colors
Though I didn't properly account for gamma (since I didn't know about that back then) so the results where terrible
 
:)
Apparently you can get the latest empty circle using Delaunay triangulation
Which is implemented in scipy :)
Really an empty sphere
 
A sphere is just a 3D circle :-○
 
3:18 PM
@Adám 😁
I might be wrong ..I can find clearly explained algorithms for 2d but not 3
 
3:31 PM
@Neil It might, actually
The problem is that it's only explicit for int32 and larger. For char and unsigned char it's not
If I create the two implicit overloads and then an explicit template, I get a bunch of ambiguous overload errors
 
 
3 hours later…
6:19 PM
Dell XPS 13 laptops only have 2 USB-C ports, one of which is used for power
I don't get why people like them so much
And apparently that cool black coating on the insides gets sticky after a while
Thinkpads have a nice selection of ports but they're all so expensive
Unless you get a slightly older model, I guess
 
7:18 PM
@Bbrk24 this compiles for me, so you'll need to be more... explicit?
#include <cstdint>
struct int24_t {
    int32_t value;
    template <typename T>
    constexpr explicit int24_t(T x) noexcept : value(static_cast<int32_t>(x)) {}
    int24_t(char c): value(c) {}
    int24_t(unsigned char c): value(c) {}
};

void foo(int24_t i) {}

int main() {
    foo(int24_t(0));
    foo('\0');
}
 
 
2 hours later…
9:08 PM
@Neil I used a std::enable_if_t to limit it to arithmetic types, which I guess I don’t need to
 
9:20 PM
Yeah it works fine without that
 
10:03 PM
Can I write a template<typename T> constexpr explicit operator T() const noexcept?
...I can. Thanks C++
At first I accidentally wrote
template<typename T>
constexpr explicit operator T() const noexcept {
    return static_cast<T>(*this);
}
And that's the longest stack trace I've ever seen in a compiler error
 
static_cast is only for builtin types, no?
 
No, static_cast<Foo>(bar) calls Bar::operator Foo if it exists
 
So,
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
../src/int24.hh:30:31: note: (skipping 502 calls in backtrace; use -fconstexpr-backtrace-limit=0 to see all)
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
../src/int24.hh:30:31: note: in call to '&INT24_MAX->operator long double()'
 
Yeah, infinitely looped stack-trace.
 
10:13 PM
First time I've seen that at compile time, though
 

« first day (4516 days earlier)      last day (338 days later) »