« first day (4497 days earlier)      last day (434 days later) » 

 
10 hours later…
3:05 PM
Today I am thinking about straightedge and compass problems. I have a finite set of starting points, and I want to investigate the points that are reachable using only the straightedge.
If my starting points are four points arranged in a square, I can only reach one additional point: the center of the square. If my starting points are nine points arranged in an evenly spaced 3x3 grid, I believe I can get arbitrarily close to any point on the plane. But if my starting points are, say, arranged in an equaliateral triangle plus a point in the center, I'm not so sure that I can get anywhere.
 
I'm not sure I understand correctly
with mentioned triangle, couldn't you create a mirror triangle by marking a point from 2 points directly opposite the third?
 
Sounds like it
And a full triangular tiling of 2d space
 
I could do that if I had both a compass and a straightedge, or a straightedge with distance markings. But I just have the straightedge with no markings.
 
Same for square with center point
@Kevin ah, I missed that part
Straightedges are useless
 
I have 90% of a proof that I can make a triangular tiling, as you say. But it's a bit more roundabout
 
3:21 PM
starting with hexagon?
 
The first half of the proof is to divide the triangle into four triangles, and then divide each of those triangles into four more triangles. The second half extends each triangle's line segments to infinity and shows that the lines intersect and form yet more triangles
 
@Kevin Aren't three points + centre sufficient to construct mid points of the triangle faces? And more points from there on?
 
Yes, you can find the midpoints of the original triangle, and from there split it into four triangles. But you can't trivially repeat this process for each new triangle, because you only have the center point of one of them.
 
@Kevin I'm not quite sure they will intersect
 
Here's a triangle which is not quite equilateral, but please pretend that it is, so you don't hurt its feelings. We've successfully divided it into four smaller triangles.
 
3:29 PM
@Kevin Using a compass, you can extend the triangle to a (skewed) square (whatever that's called in English). From there on you should be able to do the same construction as for the actual square.
Since a skewed and upright space are isomorphic.
 
I suspect "parallelogram" is the term
 
Oh wait, "only the straightedge" makes things more complicated...
 
If we draw a line through the midpoints of the center triangle, it intersects the top triangle a one of its midpoints. This should be sufficient to divide the top triangle into four triangles, and likewise for the southwest triangle and southeast triangle.
 
Have you tried spilling coffee on it?
 
 
3:33 PM
yeah, that should expand into full tiling
 
@MisterMiyagi I can't, unfortunately. This problem is on the plane, and Americans are not allowed to bring outside liquid onto planes.
@matszwecja Right. By extending the lines of the triangles, we can build a slightly bigger triangle of triangles.
Definitely equilateral >_>
I'm curious if something like this is also possible for an intentionally non-equilateral triangle. It's a little hard to prove in MS Paint.
 
3:50 PM
Is that actually a property of MS Paint?
The fact that the midpoint is unique to the original triangle I'm not sure whether the distortion might be inevitable. I can't convince myself it's not
 
As long as the "center point" is specifically the centroid of the three other points, you can at least divide the starting triangle into four congruent triangles. Getting from four to sixteen is where I'm less certain.
Here's a small visual proof of the "nine points in a grid" case. Starting with the black lines, draw the red lines, then the green line, then the blue line.
 
4:07 PM
And in fact you don't need all nine points -- you can start with five and deduce the other four
 
@Kevin I assume this implies that you have a specific point in mind before trying to reach it, since you can otherwise just draw intersecting pairs of lines in arbitrary places - yeah?
so yeah
 
Essentially yeah.
 
the construction technique you show here with 5 points to get the other 4 in the 2x2 square, extends by induction to make a lattice at integer points.
you can find the midpoints of each of those squares trivially, and from there you can also find midpoints of sides of the original lattice
that allows you to double the resolution of the lattice, and by induction you can get arbitrarily close to any point.
 
True
 
I think an equilateral triangle plus the middle point should also suffice. you can build a triangular lattice similarly
 
4:13 PM
Doubling the resolution is also possible for the triangular lattice. You can find the midpoint of any line segment by identifying the two triangles that use that segment as a side, and drawing a line through their furthest points.
 
you can find the centre points of the other triangles, by a similar technique to finding the midpoints of the square sides.
yeah.
 
Miyagi mentioned that you can skew the plane without affecting the integrity of the proof... I wonder if it's always possible to skew a triangle into an equilateral triangle.
 
if by "skew" you mean any 2-dimensional affine transformation, and by "triangle" you exclude collinear points, then yes, trivially. for example: rotate and scale such that one arbitrary side of the triangle is the line segment from (0,0) to (1,0); shear such that the x-coordinate of the other point is 0.5; scale vertically such that the y-coordinate of the other point is sqrt(3)/2; invert the first step
(first step also requires translation in general, of course)
 
Ok, I can just barely imagine that, and it all checks out. I am happy.
 
It seems 4 points will be the minimum: a triangle and its centroid(?)
next question is if we can do it with other points inside the triangle
 
4:24 PM
I suspect that you only need four points that have no parallel line segments, but I have no inkling of a proof
 
TIL about black python
wish I knew about it sooner
 
As in, github.com/psf/black? I've heard good things about it
 
Do you mean the third-party tool, black, used for formatting Python code to a consistent standard?
it's not a different programming language or anything.
 
Yeah, that one
I'm looking at the formatting it does and it would have been so much easier to use it before
 
4:40 PM
Black can be pretty terrible for numerical code
 
I forbid it from my pandas/numpy library. KABOOM goes all sense I manually put in to the indentation
And SQL Alchemy, for that matter
 
5:09 PM
I use black to avoid any PR formatting quibbles. In a few places where I'm-the-human-and-I-know-what-I'm-doing, I disable the formatting for a particular range.
I would like to propose ITHAIKWID as a long-overdue chatcronym (also "chatcronym")
 
Could we get a third reopen vote here? The OP added their solution, test data generator and timing code. But sadly also deleted the question, maybe discouraged by getting closed and downvoted. Perhaps they reconsider when reopened.
Thanks (it's reopened).
 
Could someone keep an eye on this? stackoverflow.com/questions/75376787
@KellyBundy the question still seems unclear to me. I have to guess at the specification
 
5:28 PM
I am keeping an eye on the "flatten list" question. I'm tempted to half-jokingly tell the answerer that their solution isn't truly "universal" since it won't work on very deeply nested lists or self-referential lists.
 
even the canonical about flattening arbitrary-depth lists doesn't consider self reference, IIRC
 
A problem I encountered myself when writing a print() function for KevinScript. I probably should fix that one of these days
 
arguably, those can't be flattened
wait, KS is actually being implemented? I always assumed you were just facetiously talking about what you wished programming languages were like
 
it's on Kevin's github
 
The thing that the OP wants is not so much true "flattening" and more like, "traverse the graph and make a set of elements"
 
5:30 PM
I also used to think that when I was new-ish in this room, but then I looked around and noticed it was actually real
@KellyBundy is it? It still says "page not found" unless this is because of caching issues (I did refresh but didn't bother closing/reopening the browser yet)
 
I have a real language named KevinScript that actually runs and is Turing complete. I also have an imagined fever dream named KevinScript that combines all the worst design decisions conceivable. Hopefully it will never be real.
 
@KarlKnechtel Ask them for clarification if/when they undelete :-). Their text and example, to me, sound like they want Counter(b) - Counter(a) (after converting a and b to the obvious dicts). Their code pretty much does that, too, although they introduced floats and rounding. But I think the code works as reference/spec.
 
@Kevin pretty sure we have a canonical for "traverse nested structure and produce a flat result", too
@KellyBundy yes, that's what I figured too (it should perhaps be the named method .subtract in order to allow negative differences, but zeros have to be filtered out).
 
@KarlKnechtel I vaguely recall you posted that one in your room once
 
@Kevin no contributions since jun 2021... relatable x.x
 
5:35 PM
"KS is actually being implemented" is arguable. "KS was actually being implemented" is true.
 
@NordineLotfi no, that's one level deep, and directly flattening
@Kevin my own projects have been like this. sadly, I only keep getting more ideas.
 
@KarlKnechtel very relatable
@KarlKnechtel welp, can't beat you when it comes to finding canonical :P
 
@NordineLotfi Yes, it's reopened, but not undeleted.
 
got you
 
I don't mind having lots of half-finished projects. I think "finished" might be a fake idea anyway.
 
5:41 PM
finished to me would be "until I feel satisfied", as in, of the current state of a project
Then, that wouldn't mean I wouldn't add more features (or even remove some). I would just consider it being close to my own satisfaction measurement.
 
Understandable.
 
6:03 PM
Normally my phone gives me terrible articles to read but this was quite interesting, especially in light of the KS discussions just earlier; c-style loops in python
 
6:23 PM
@roganjosh Oh my! The horror! takes notes
 
@roganjosh I'll have to implement that with _for(i := var(0), i < 10, i + 2): myself before I read how they did it. Looks like fun.
 
6:58 PM
that definitely looks better than how I did it on stack overflow years ago :/
actually hmm, dealing with the body of the loop is still problematic.
 
@MisterMiyagi I worry sometimes about what you scurry away into your cave :P
 
It's 20:07 and all is perfectly cromulent and safe! Pinky swear!
 
I can't see the moon right now so I don't know if some horrors are coming in a few hours!!
 
No worries, the horrors are well-fed and enjoy their sleepy time.
 
The moon stopped being full two days ago, so lycanthropes will not be rampaging. Moon wizards, on the other hand, will be rampaging at 98% power.
 
7:13 PM
Let me guess, they get at 100% when it's 3:00 after midnight? or is it when it's Halloween
 
They say it's proportional to the phase of the moon and viewing conditions, but I suspect that's a placebo effect and the moon wizards only need to believe in themselves. Nobody tell the moon wizards.
 
I want to take this moment to assure everyone that, statistically, each statement in rooms/6 has been reviewed by at least one bona fide scientist. Trust rooms/6! Mind the moon wizards!
Kevin is probably quintuple blind reviewed at any time.
 
Mm, scientific methody.
 
Can confirm that I have monthly top ups on my Moon Wizard Spotting training. I'm pretty proficient with the trusty willow branch detection method (which I cannot disclose)
 
is it like when water hunter use a wood stick to get water and the stick wiggle when it find some?
if you can't disclose it, just blink twice for no and once for yes
 
7:20 PM
Yes. No. Who knows. Not me for I'm just a normal person
@NordineLotfi that is a severe contravention of the rules
 
Dowsing branches can be made from willow. Handy that you can use one tool to detect both water and moon wizards. But make sure you know which one it's set to before you go looking.
 
Helpful tip: In a pinch you can also set branches to stun!
 
In this image we see the branch forms the rough shape of a "W", for "water". Turn it upside down for "M" or "Moon wizard" mode
 
"Keep it secret, keep it safe" must have been a missed module for you :(
 
7:37 PM
Eh, it's an old photograph, so I'm basically explaining how to hack an Atari. Modern willow branches come with DRM (Dowsing Rights Management) protection, which I will speak of no further.
 
@Kevin Conspiracy theory again, I remembered the talk about reptilians: chat.stackoverflow.com/transcript/message/54975193#54975193.
 
Moon Wizards are actually crustaceans. This is known. They just have powerful illusions
 
Nothing to do with reptilians then.
 
Damn carcinisation at it again
 
Moon is just cheese. Don't you see how gray it is? This is what happens when cheese goes too far in the fermenting chamber
 
7:45 PM
Of course, this is an indisputable fact.
 
Since this is an actual course, expect the non-existing "How to be a Moon Wizard" course to be real in the next 10 years
If someone ask how serious it is, just label it as worldbuilding in the tags. That wouldn't be too far from the truth
 
Right, but I think the reptilians are involved in this.
 
 
2 hours later…
10:12 PM
So quick question related to this question: stackoverflow.com/questions/75379085/…
It's a question related to Pandas that I posted. Someone left a comment that the answer is "it's a bug, and was fixed in pandas version xxx"
What's the proper way to deal with a question like that?
 
If your are happy that it solves your problem (test it?) Then tell the commenter to post as an answer or do it yourself after some reasonable time (not everyone is at a keyboard all the time). You judge what's a reasonable time
Fwiw I leave similar comments and I don't care if they get converted to answers by others. SO discourages answers in comments so there's no reprisal if someone takes it as an answer; I do that knowingly, others might just be formulating ideas. It's your question, though, so do what you think is right.
 
10:47 PM
usecase of this stackoverflow.com/questions/75379715/… or just a bad approach ?
 
11:13 PM
@sahasrara62 Are you asking if defining a staticmethod and classmethod to the same thing is a bad approach? In the question, it was just used as a demonstration, there is no reason to define both. The first answer answers the question pretty well - use the classmethod, not the staticmethod.
 
@roganjosh Thanks. It's kind of hard for me to test since I am using a specific version of a library for a reason, but the bug report they linked to is pretty much 100% the issue.
 
11:34 PM
@PaulMcG no not about the methods but creating same class instance using those methods. So usecase of same class new class instance from same class method
 
What do you mean "same class instance"? When you call a classmethod, there is no instance.
Here is a class that holds a list of ints. You can construct it with some int values. But it also supports a from_string classmethod. You call it as shown.
class IntList:
    def __init__(self, *values):
        self.contents = [*values]

    @classmethod
    def from_string(cls, s):
        """s is a string of space-separated ints"""
        return cls(*(int(i) for i in s.split()))

ilist = IntList.from_string("1 2 3")
print(ilist.contents)
prints [1, 2, 3]
 
there is probably a better target, but.
@sahasrara62 Did you mean, a usecase for writing the @classmethod in such a way, that it creates an instance of the passed-in cls?
 
@KarlKnechtel closed
 
11:50 PM
uh, I meant the other way around, but they're about equally good I guess
 

« first day (4497 days earlier)      last day (434 days later) »