« first day (4499 days earlier)      last day (432 days later) » 

10:00 AM
stackoverflow.com/questions/75395829 Is this equivalent to pivoting (perhaps multiple times) and then using the built-in json dump?
@Marco This makes me want to try to use ChatGPT with an engine like Inform to create a text adventure game.
 
 
1 hour later…
11:06 AM
I wish there were some reasonable way to make a reference question for people who are as confused as in stackoverflow.com/questions/75397592.
 
I got scammed by a QR code and now I realise how ridiculous this seems as an attack vector. I used an app that was highly rated and that I had been using for years; I had to pay for hotel parking. So I scanned the code (the only way to pay) and went straight to a payment screen... but only after entering details did I realise it was for a completely different service. These apps could intercept basically any QR code service
 
so someone malicious pasted a bad qr code sticker in the place where you expected a trusted one? or just what
but yes, this is one of many, many reasons I don't own or use a smartphone
 
Either that, or the app just "recognises" any arbitrary code and just redirects you to any site of its choosing
 
corporations want you to use them because they can exploit the insecurity you are bringing upon yourself
you just don't have the control that you would with a desktop browser, by design.
@AndrasDeak--СлаваУкраїні whenever I'm implementing something that seems like is has a risk of doing non-trivial damage to the file system, I implement the dry-run version first
 
Yeah. There was no way for me to know what I was putting my details into because it's just a generic payment splashscreen, which is exactly what you would expect when scanning a code to pay for parking
 
11:12 AM
I also pay cash a fair bit of the time, and use my card only from an account with a limited balance.
 
But not all codes will go straight to payment screens. But you could create an app and then just travel the country scanning those codes that are everywhere and just redirect to any spoof site you wanted
Dumb technology
 
@roganjosh it doesn't seem as likely that the app itself is the malicious part, if it was working well for you for years
anyway, good luck with getting charges reversed, or whatever else you're going through now
 
The bank blocked it and I also reported it immediately after, so thankfully I should be completely fine (except for having to wait for a new card). But this was a major hotel chain, so if it's not the app then I don't know why their code would redirect me somewhere malicious
 
@KarlKnechtel They need a tutorial or discussion, not a SO Q&A. I don't know if your comments will help... That kind of confusion reminds me of Haddock's Eyes.
Aug 29, 2016 at 11:41, by PM 2Ring
FWIW, the difference between a string's actual contents and its representation is an example of the use–mention distinction. Lewis Carrol has some fun with this in Through the Looking-Glass. See Haddock's Eyes
 
In any case, I've now just worked out a gigantic scam I could probably build quite easily (if you think it through a bit more) so I won't be using QR codes again
 
11:25 AM
@KarlKnechtel It might be possible to craft a canonical on "what's the difference between a literal and the object it represents". Whether people will actually grok that, I'm not sure. This is mind bending territory.
 
Might be doable if you do it with numbers. Make them understand that 1000 is equivalent to 1_000, then extrapolate to hex or binary or strings
 
number <-> string is the common case
but actually, string literal syntax <-> actual contents of the string also needs to be addressed
 
@Marco Sure. But ChatGPT itself doesn't have the ability to create software you can trust. As I said here: meta.stackoverflow.com/a/422397/4014959
 
which is a whole other thing I've had on my list for a while. that one, the question is actually writable
 
> GPT-3, the large language model underlying ChatGPT, is certainly an impressive piece of language processing software. But that's all it is. ChatGPT is not intended to be an artificial intelligence, although it may give some people the initial impression that it has some intelligence.
 
11:33 AM
but yeah I kinda want to get at the idea, language-agnostically, that numbers don't "have" digits (or bits, or whatever you want to call hex or octal digit-symbols)
 
@KarlKnechtel I was thinking of posting a comment, but rhe OP's deleted the question.
 
I'm not that surprised
and I'm sure OP will agree with that other person that I was being "toxic", somehow, and go off elsewhere and complain about it
 
I certainly don't think you were toxic, but I can see how your tone may have seemed a bit heavy or impatient to some readers.
 
"heavy tone" is very much what I'm about. I expect students to pay attention and not fall into bad habits
 
@KarlKnechtel I suppose you could go back to basics: counting apples or fingers. :) Show them 4 apples. Say "How many apples do I have?". They say "Four!". You say "Is that in decimal or binary?". :)
 
11:41 AM
indeed
but I mean, that's just helping me write a blog article on the topic, which I'm sure I could handle already. What I want is to be able to frame it as a stack overflow question
... and suddenly I changed my mind about some stuff I was saying in the Meta room around 12 hours ago.
 
@PM2Ring Honestly, I think many people would say "decimal" because that is what they use for digits. I wouldn't call 0b100 "four", even though it describes that value.
 
As I said, I don't think it can work well in Q&A format. It requires discussion so you can figure out exactly what the student's misunderstanding is and correct it. Q&A only works when you can reasonably guess what the reader knows and what wrong ideas they're likely to have.
 
It feels like they all have the same wrong idea
 
@MisterMiyagi Fair enough.
I guess the common wrong idea is that a number is its decimal representation.
 
yeah
that's essentially how I would put it
but "what's the difference between a thing-in-itself and a representation of that thing"... sounds like it belongs on philosophy.SE instead (and wouldn't do well)
 
11:55 AM
And it's not just the newbies who are confused. Eg, one of the answers to that deleted question says "y is a float that are already in base 10". And that's from a 2k+ user who's allegedly a developer with over 7 years of experience. I'd expect someone like that to know that floats are internally represented in binary.
Don't bring the philosophers into this! They'll just make the newbies even more confused. :)
 
heh.
... Why is it that, so much of the time that I try to ask clarifying questions in the comments, OP will completely ignore all of them while @-ing me, in order to restate something obvious from the question in even simpler terms?
 
The representation issue is also a problem on Math.SE, especially regarding non-terminating decimals. So we get questions about how can 0.999.... equal 1.000..., and claims that we don't really know the value of pi or sqrt(2) because the decimal never ends.
 
I'm so tired of making the comment Yes, I understood that. This doesn't answer, or help to answer, any of my questions..
 
Because they don't come here to actually learn knowledge. They just want the answer. You're trying to teach them how to fish, but they just want you to give them the damn fish.
Not all newbies are like that, of course. But large numbers of them are.
 
they don't know which fish they want, and don't know that there are different kinds of fish.
 
12:04 PM
True
 
and also, for some bizarre reason, they want the fishing rod still attached by the hook.
 
And then there are the newbies who sincerely do want to learn, but they think they can do it by browsing random sites and asking questions on SO without sitting down and working systematically through a properly structured tutorial or textbook.
 
stackoverflow.com/questions/75398277 : on a second read, I think it should be a duplicate of stackoverflow.com/questions/8671280
@PM2Ring I had a blog article concept for this. Perhaps it will fill the missing slot for articles I plan for February
(I already had to adjust the plan a couple of times due to procrastination... now I'm committing to writing twice a week instead of once to make things line up the way I want. Sigh. Probably better in the long run though)
(there's a lot I can talk about)
 
I trying to train image classification model. while training, the value of val_accuary is always the same in each epoch
 
@KarlKnechtel can you share your blog link ?
 
12:14 PM
Does anyone have an idea ? and there is only f1 score value for class 1. github.com/TryTestThinkWatchTheMovie/Results
 
@sahasrara62 on saturday, when I actually have content besides a "welcome to the blog" written almost a year ago, sure :)
 
@KarlKnechtel so blog project left after writing welcome to blog and readme :p
 
@TryThinkTest well, there might be something wrong with the model, or perhaps with the data. Most people aren't going to want to look through an entire project repository to look for a problem.
 
@TryThinkTest try different parameter, batch size, epochs
 
@KarlKnechtel anyway could someone close it please :)
 
12:37 PM
@KarlKnechtel I couldn't hanmer it because it didn't have the python tag. But I fixed the islice code in the accepted answer of the dupe target.
 
I've decided that the bull is my spirit animal. Because I'm the bull in the china shop, I destroy boilerplates
 
What china shop sells "smooth, overlapping, and undercut slabs of rock" :-)?
 
None of those that I've visited, that's for sure!
 
1:00 PM
@KarlKnechtel restating problems is a way to get under my skin very quickly. I've never been able to understand the motivation for it; it kinda comes across as suggesting I haven't understood. But I think people sometimes just want to come across as knowing what the discussion is about and therefore have to say something even if it's just a rehash of the thing they already don't understand
The more malicious version is "if you don't understand, you don't have to comment/answer". I don't think the former case has the same self-entitled motivation as that
 
1:16 PM
>Engineering's hidden bottleneck: pull requests
yeesh. that sure is an *attention-getter* in the sidebar.
Might as well say "Engineering's hidden bottleneck: code review"
 
1:27 PM
TIL that warnings are not sent more than once
import warnings

def warn(msg):
    warnings.warn(msg)

warn("foo")
warn("foo")
warnings.warn("bar")
warnings.warn("bar")
[...] UserWarning: foo
  warnings.warn(msg)
[...] UserWarning: bar
  warnings.warn("bar")
[...] UserWarning: bar
  warnings.warn("bar")
both bar warnings are on different lines, so they are different. the foo warnings aren't so only one gets printed
 
Restating one's problem in different terms is the human equivalent of turning it off and on again. Understandably, the person being power-cycled might find it undignified.
 
That snipped of code ^ is the result from a whole day of hunting down a bug. As of yet, I haven't found any documentation for this behavior of warnings.
Just sharing my pain with y'all, since I got noone else for this specific flavor of suffering
 
If I have a problem and someone asks me a question about it that seems to be irrelevant or based on false premises, I might be tempted to just rephrase my question. I could try to reverse-engineer their confusion and figure out exactly what segment of my question confused them, but that might be more work than just writing out the entire question again in terms that might not trigger the same scenario
I reckon it helps if I admit to the person that I don't understand what they're asking. Then they at least know that I laid my eyes upon their question and knew that it was a question.
 
@Arne this is curious. I've always just guarded against this so I didn't get spammed but never actually tested without the guard
 
If I just parrot my question at them again with no explanation, they might think I'm a crummy AI, or an entitled CS 101 student looking for free homework services, etc
 
1:42 PM
@roganjosh pandas/numpy often raise warnings, and they usually include parts of the callstack or the data which is failing, so most of them would be "different", even if it's always the same function call leading to it.
so it makes sense to have some kind of strategy to filter those
 
I've worked with people from cultures where they seriously didn't want to tell you that some work hadn't been completed. "Have you done X" and they'd say "yes" right up until you ask "can you show me?" Only then would the situation become clear. Not knowing something / missing deadlines was not good for them
So if they didn't understand the questions, I can imagine such people just repeating the problem to show some sign of knowing what they were doing vs. just saying "I don't know what you're asking"
 
Yeah valid
 
@Arne ah, I mean about warnings in my own libraries
 
in that case it'd probably be worth it to check if the guards are needed, yeah
 
People who say they've done X when they have not done X -- they're half the reason I ask for MCVEs
 
1:49 PM
It's a really unfortunate trait but the country I was working in would hire and fire on a whim so it just wasn't good for them to admit they missed a deadline so I can understand it. It took quite a while before I could get an honest dialogue with them
I'm having "fond" memories of the "wall of shame" for people on the firing line. I thankfully got that pulled down on my first visit. Some places are not so nice...
 
I never quite know how to tell an OP "I think you're lying or misinformed about the details of your problem, and I want you to prove yourself. If it turns out you were lying or misinformed, I won't hold it against you. I'll just answer the new problem as if that's what you asked in the first place."
I think they're afraid I'll go "ah ha! Caught you red handed!" and then hammer them
 
Charismatic as you are, there probably is no way for you to get around that in the space of time you have tbh
 
 
2 hours later…
3:53 PM
In pyqt5 QTreeWidget i am trying to highlight the first item. I use: self.main_self.ui_playlist_preview_window.treeWidget.setCurrentItem(items[0],QtCore.QItemSelectionModel.SelectCurrent), the item is selected but not highlighted at all.
If i click with the mouse it's blue highlighted but with this code it's only grey highlighted.
the focusPolixy ot the tree widget is strong focus
 
4:29 PM
@ChrisP I'm no longer completely ignorant on qt stuff, but I'm definitely not going to create an MCVE for you. Please invest the time to put together the dozen lines necessary for a proper complete example.
I can take a look if you do that.
 
@sahasrara62 I am using keras efficient B0 model. How many images are required for each class. Or what methods can I use to classify with few images?
 
5:10 PM
cbg
 
 
2 hours later…
7:35 PM
@TryThinkTest sorry cant help much in this area, not into ML/data science. with few images u can chose ml model which require few dataset,on kaggle u can get more info
 
8:00 PM
Following up with my project from the other day, some images:
The lines and dots involved in tiling an equilateral triangle across the plane. Unit circle for scale.
 
nice, randomly generated lines and circles ?
 
What happens if you try to tile an equilateral triangle when you use an off-center point instead of the centroid
There is still some semblance of order there. Four lines all meet at one point in the lower-right corner. Probably the same is true for the lines just to the right of the frame, and distantly to the lower-left.
Zoomed out view of previous image.
I'm guessing that the lower-left point of intersection is farther away than the other two because my not-quite-centroid is pretty close to the triangle's northwest-to-southeast axis of symmetry. The actual centroid lies exactly on all three axes of symmetry.
 
8:23 PM
I'm guessing you can't tile the plane if you don't have a centroid, but I bet you can still get arbitrarily close to any given point. From these 12 lines that extend beyond the unit circle, choose three points of intersection. (todo: prove at least three such points exist). Those points form a triangle (todo: prove the points are not collinear) whose area is larger than your original triangle (todo: prove), and your original not-centroid is also a not-centroid for the new triangle (todo: prove)
Now you can repeat the process to create an arbitrarily large triangle (todo: prove it does not converge at some finite area). Once you have a triangle that contains your target point, you can cut it down to smaller triangles (todo: prove) until you're as arbitrarily close to your goal as you like.
Now we hand off all these todo's to a passing postgrad, and head to the pub to celebrate a job well done
 
 
1 hour later…
9:39 PM
it's weird to watch people doing twitch stream on software developlement and coding, more talk less code
 
 
1 hour later…
10:41 PM
@PM2Ring Of course, I commented that ONE DAY it might be possible.
Interesting this post and your answer, thanks for sharing.
@KarlKnechtel Cool, that would be really interesting.
 
10:57 PM
@Marco didn't want to post mine, but since PM2Ring did..: meta.stackoverflow.com/questions/422013/…
not directly related to what you said, but still related
 
11:35 PM
@Arne really?
I tried going to docs.python.org and searching for `warnings`, and the first result was for the `warnings` standard library module: https://docs.python.org/3/library/warnings.html
and right near the top it says: "Repetitions of a particular warning for the same source location are typically suppressed."
@Kevin so can you actually demonstrate whether it's possible? like, do these lines actually end up constructing another vertex of the lattice, and translated versions of the off-center point?
@Kevin I think the "cut it down" part is the sticking point. It doesn't sound at all surprising that it should be possible to draw a triangle that encloses the target point
 

« first day (4499 days earlier)      last day (432 days later) »