« first day (2445 days earlier)      last day (674 days later) » 

3:43 AM
> I understand this is not the best website to ask these types of questions
[question is downvoted and closed]
> are all developers this stuck up? looool
 
Seems like they are stuck down
@VLAZ I don't really understand. I guess I don't understand the userscript you're trying to develop. If the comment goes away in response to a flag, then that's success. It doesn't matter whether the comment goes away literally immediately or at some point in the future when a moderator reviews it (which could be nearly immediate, or could be weeks away).
 
4:02 AM
@RyanM Maybe could have been edited to remove the rude bits, but leave the (ostensibly) valid criticism of a bloated library?
 
4:26 AM
Anyone here a regex ninja? :)
 
@DanielWiddis Sort of, what's up?
 
Bonus points. This involves a potential "stack overflow". :)
So my linter is telling me I have an unbounded regex repetition and I should fix it. The regex is an IPv6 address shortener. Here's the actual code: replaceAll("((?:(?:^|:)0+\\b){2,}):?(?!\\S*\\b\\1:0+\\b)(\\S*)", "::$2")
I'm thinking the correct fix is to change {2,} into {2,8} since IPv6 addresses will have at most 8 fields. Is this right?
(This is Java so ` \\ ` means a single ` \ `.)
 
I'm afraid I'm actually unfamiliar with the details of IPv6 addresses
 
I suppose the source is the answers to this question, which all use the {2,} notation to match from 2 to unlimited times?
 
4:41 AM
That is very likely where I copypasted using The Key.
 
Oh, here's one specifically in Java; it appears to do the same thing.
This... looks somewhat complicated, though. And I don't mean the regex. I mean RFC 5952, regarding shortening IPv6 addresses.
> 4.2.2. Handling One 16-Bit 0 Field
>
> The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
> For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
> 2001:db8::1:1:1:1:1 is not correct.
Sounds like something I'd strongly prefer to let a library handle. :-)
 
Well, I am the maintainer of "a library" ;)
 
Sucks to be you :-p
 
Anyway, given the SO links above for reference, I think the "2 or more" can be "2 to 8" to fix the linter warning.
probably 6, actually.
or 7... since ::0 or ::1 is valid.
 
But... what happens if it's an invalid IPv6 address that it's given as input?
Or is that validated elsewhere, and this assumes it is already a valid address, just in possibly long form?
 
4:45 AM
Then there's a bug in the JVM as the input is InetAddress.getByAddress(ipv6).getHostAddress()
 
(I, like Ryan, know nothing about IPv6 addresses, only that they have weird colons instead of dots.)
 
I know probably a few trivial things more than the both of you.
 
We bow to the expert :-)
 
I'm gonna throw an 8 in and call it done. It makes the linter warning go away.
 
Is the linter warning even reasonable?
I'm kind of wondering, since all of the examples I found online have it unbounded there.
Sticking something of dubious correctness in just to satisfy the linter seems like an anti-pattern somehow.
 
4:47 AM
It's one of those Sonarqube thinamagigs that I could suppress.
S5998
 
> Provides that the issue of military deployment shall not be considered as a factor in the awarding of custody in marital actions where a suitable child care plan is presented
Hm, maybe that's the wrong one.
 
"on large inputs"
Presumably, this is a false positive, since you know that the input string will be bounded by virtue of it being a valid IPv6 address?
 
Yeah. Given my input is coming directly from the JVM I'm... not worried.
But then I wonder is adding an "8" easier than adding a "//nosonar" comment.
 
Right. Well, it seems like either suppressing the warning or adding the upper-bound are both reasonable options. Probably more important to spend the time writing tests to prove the correctness of the regex for valid inputs?
 
4:51 AM
I'm actually writing a "first timers only" issue to get some github neophyte to do the work, so it's a lot of work on my end to hopefully help someone get started in git.
 
The "first timers only" issue being to write the tests? or...?
 
and it's in a highly upvoted answer so that's good enough for me!
no, to edit the existing code to add the "8"
 
Oh, haha. Wow.
That's like baby's first commit, not first issue to resolve.
 
Yes.
That's what first-timers-only is all about.
 
"It's a one-character change. Don't screw it up."
*looks up gingerly at Sword of Damocles*
 
4:53 AM
You laugh, but my first github PR wasn't very pretty but it led 8 years later to where I am at AWS so I empathize :)
 
I have no idea what my first PR was
Likely, it was to my own repo...
 
So here is the actual code where that regex lives. The user input is an int[4] tested as such. And yes there are testcases. :)
OK, 893 linter issues evaluated, 889 ignored, 4 issues created for github n00bs.
Entery your username here to find your first commit.
Looks like this
Which still hasn't been merged!
 
5:13 AM
@CodyGray It looks like this, it's a one-click comment flagging. You can flag multiple and the flagging would be queued (that's the yellow flag) until the flag timeout ends (when it turns red as normal). The first comment I flagged there was automatically deleted but if immediately removed, then the second would "jump" up which is quite annoying.
Same problem exists if one of the queued flags is processed, say, 10 seconds later and the rest of the page is moved up as you were watching it. I'd prefer in that case to change the icon to something else to signify flagging resulted in deletion and you can click to hide the comment if you really wish to.
 
@DanielWiddis Yup. Makes sense. No, that was never merged. Prettify was horribly supported.
And yeah, that definitely was not "baby's first commit"!
 
This was my first commit. Nontrivial code change but I was experienced with subversion and a complete n00b to git and failed horribly at trying to squash.
 
Ah, well, not everyone likes their commits squashed
 
This was before github made squash-and-merge one-click.
 
 
4 hours later…
9:13 AM
Thanks for the answer. It doesnt work for me. Sadly. I have upvoted and accepted it because I think it should exactly work that way — robkuz Jan 12 at 13:28
 
 
5 hours later…
2:22 PM
🎉
 
 
2 hours later…
4:46 PM
Please create job offer with proper salary defined — Justinas 11 hours ago
Asking to convert a low quality question into spam :p
 
 
2 hours later…
7:11 PM
Also, this approach does not work for functions with side effects, e.g. it would be a very bad idea to compare launchNukes.js with nukeFromOrbit.js in this way — Bergi 2 mins ago
The scary thing is that both of these files could plausibly exist.
 
7:31 PM
Issue: "Detect and format pasted code", implementation: format any pasted text as code
paste text here to try the new feature out!
 
wat
 
@double-beep Erm, found a bug
Pasted code, and it worked - it was detected as code. Flipped to markdown and back and it was merged with the code block after it
code was this:
import { FlagOptions, FlagType } from "@types";

function makeFlag({ text, tooltip, flagId }: FlagOptions) {
	const link = document.createElement("a");

	link.href = "#";
	link.textContent = `(${text})`;
	link.title = tooltip;
	link.dataset.quickFlag = String(flagId);

	return link;
}

export const flags = {
	get Rude() {
		return makeFlag({ text: "Rude", tooltip: "Rude or offensive", flagId: FlagType.RudeOrOffensive });
	},
	get Unfriendly() {
		return makeFlag({ text: "U/U", tooltip: "Unfriendly or unkind", flagId: FlagType.UnfriendlyOrUnkind });
 
text is supposed to be pasted in the commonmark editor
(that's what the PR changed)
 
OK, that one works way better. It directly surrounds the code with code fences
 
> Was eagerly looking for something like this.. thanks for posting!
you mean... this article, that was copied from a medium post from a year ago?
 
7:41 PM
try pasting any other non-code text in the editor
(e.g. this chat message)
 
@VLAZ this is a bug in the Stacks Editor itself. It repros on the live site.
I know, it's shocking that the Stacks Editors has bugs switching between Markdown and back.
 
@double-beep Oh, it just treats anything as code?
 
in addition if you paste something from the commonmark editor, it will also be treated as code, since the editor is wrapped in a <code> element
 
Wait, I pasted something and it wasn't recognised as code
Helgen:
1. Cyroodil simps
2. Chorrol chokers
3. AC Leyawin
4. Real Cheydinhal
The above thing is just pasting as is
But I tried the first paragraph here: React useEffect, only call after a state change (basically opened a random question) which is:
We are using react recollect as state management tool. In this useEffect below, I want to call appStore.getSettingsHistory() function only if the states in array dependency does change. But based on the below code, when component mounts, we see 5 calls (as many as in array) initially, then other calls as those state change. How can I achieve, calling this api (appStore.getSettingsHistory()) only once in the beginning, then as these states change.
And that got formatted as code.
How does the code detection work?
 
8:03 PM
All-purpose NAA:
> I dont know man This seems very complicated :(
And appropriate response:
I appreciate your feelings of sympathy for the OP, but this is not an answer to the question. — Pointy 2 hours ago
 
8:19 PM
Sometimes I wish there was more overlap in the Venn Diagram of smart people who present their research and engaging presenters. =/
 
haha
like asking content writers to know about what they're writing
 
 
2 hours later…
10:42 PM
@cigien "Please inform if the question isn't suitable i will take it down happilly" You don't often see people requesting to be informed if their question is off-topic.
@VLAZ In a Stack Overflow userscript? Yeah.
@VLAZ That's weird. It didn't for me, when I copied it from chat to the link that double-beep linked.
Nor from the question.
@HenryEcker I have, actually, tried training some of these smart people to be better at presenting their research. The way they fight and refuse, you'd think that it was their primary goal to be bad presenters.
 
11:04 PM
@CodyGray I've feel there's a rather ingrained instinct to peacock. By which I mean, that "really smart people" (or people at the forefront of their field) have such in-depth knowledge that they are not widely understandable to others when they are talking about their area of expertise due to an inability to bridge the knowledge gap.
Naturally, the easiest way to emulate this is to speak incoherent nonsense then convince yourself that others are simply not smart enough to understand you.
Not saying that's the case for everyone by any means, but it is certainly something I see a lot of.
 
Well, this wasn't so much about how to make your presentation accessible to a non-technical audience, as it was "how to make even people who are also at the top of your same field not fall asleep listening to you"
If it's truly a knowledge gap problem, that is solvable, too, but an entirely different issue
I guess I haven't noticed that much of what you describe as peacocking
But that's probably because most of the "really smart people" I've listened to have been university faculty or graduate students who are actually expected to be able to communicate
Also, I'm probably a bit smarter than the average person, so the knowledge gap is a bit less prominent in my experience
 
Ahhhh yes, that is also a problem. Keeping people's attention is also quite a useful skill. I deal a fair amount with knowledge gaps and bridging them. Typically the gaps are between a group of technicians who have way more practical knowledge on how things work and engineers who have way more theoretical understanding and formal models on how to convey that information.
 
I spend all day dealing with people who literally cannot speak the English language
I have no idea whether they have any knowledge or not... but their human language barrier prevents them from either understanding what I or others are trying to say, and from conveying anything they might know.
The reason this bothers me is, they've been living and working in the US in their technical field for at least 20 years, often more.
 
That sounds inefficient at best and frustrating at worst. Is there a reason to maintain the barrier (like they deal predominantly with international contractors, etc. )?
 
The management is in the same boat, I guess?
Nope
 
11:14 PM
As you? or management also doesn't speak English?
 
The international contractors/customers we deal with all speak way better English
@HenryEcker Correct. Management speaks English about as well as the other people I have to deal with.
Slightly better. But still not well.
We are a US-based company. I don't understand it.
Our overseas customers literally speak better English than half of my colleagues based here in the US.
Don't mind me, this is just a soapbox of mine, due to daily frustration. I just spent 3 hours having a meeting with someone who works out of the same office that I do (formally; I'm actually remote, and they literally work in the office, but the point is, it's California). It took 3 hours because I had to get one of the other collaborators on the project to come in who can speak both English and Mandarin, in order to translate.
 
My friend (who is German) constantly complains about the quality of the English in his (German) company's programs' UIs...apparently, they're resistant to fixing it because of concerns that people are used to the incorrect wording :-p
 
Most of the discussion seemed to occur in Mandarin, and then I and the other English-speaking people on the project (several of whom don't even have English as their own native language, but at least speak it, and don't speak any Mandarin) only got a couple sentences of translated information. I'm doubting it was anywhere close to complete or representative.
But at least this was better than the way we'd been trying to communicate ineffectually over email for the past 2-3 days.
@RyanM Yeah, I've noticed that native German speakers actually seem to have developed their own idiomatic dialect of English, where certain wrong and/or odd-sounding phrases are used over and over. Sometimes it's because they've been literally translated from German, but other times not.
But at least it's mutually intelligible, so I'm OK with that.
 
In this case...some of it's not
Which is the stuff that annoys him most
 
Ah, well, that sucks
 
11:24 PM
I forget what the wrong word was, but it was the "Apply" button
...or rather, the button that should have said "Apply". Instead, it said some other word, and that one's rather important to specifically say "Apply"
Most of it is in fact mutually intelligible, though.
 
German uses the verb "macht" for... a lot of things. Far more things than we use the equivalent homonym "make" for in English.
 
Oh, yeah, definitely. "Make a picture", "make a test"
 
So where we would say "Do" in English, a native-German speaker speaking English often will say "Make".
Yeah
"Make a test" grinds my gears all the time :-)
 
Personally I kind of like "make a picture"...you're not taking anything, why do we use that word?
 
Can you just substitute "perform" for anywhere you'd want to say "make/macht", please?
Well, I guess that doesn't work, either.
 
11:27 PM
Also a lot of the time it really is "make"
but yeah often it's "do"
"What did you do yesterday?" -> "Was hast du gestern gemacht?"
 
In the case of "test", "run" would be idiomatic English, I think
 
Or "take", for a different kind of test
 
But usually, I just chuckle at the odd-sounding nature of the phrases. It doesn't interfere with communication.
Ah, yes.
 
(that's how I've always heard it used, but I do not work in manufacturing with Germans)
Or "write an exam" in British English, I believe
 
They do say that, which I also find irritating
It'd be fine if they only said it for long-form essay exams, because those are being written
Which is the only type that I ever gave or probably would ever contemplate giving
But there are others!
 

« first day (2445 days earlier)      last day (674 days later) »