« first day (2572 days earlier)      last day (2380 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
here's a sample open source app that's simply huge relative to its scope and behavior hospitalrun.io
it's a hospital management system, a more complex CRUD app, written in ember.js
let me show you some stats on disk
when proper internet fails and I get the 4G fallback, I get charged 1/2 of a Big Mac per 100MB
 
nice
good luck with caching it :)
rhubarb
 
 
5 hours later…
5:11 AM
hopeless, no attempt homework Q stackoverflow.com/questions/47028207/…
 
 
1 hour later…
6:16 AM
cbg
@cᴏʟᴅsᴘᴇᴇᴅ It seems they added their attempt, albeit a poor one at that
 
@IljaEverilä Still worth a "Why isn't this code working..." off topic CV
 
Sure, still not a question. But they're capable of improving :P
 
 
2 hours later…
7:58 AM
cbg
 
8:43 AM
Just dropping this here: stackoverflow.com/questions/33813815/…. This community is better placed to judge if it can be re-opened than the general reopen review queue handlers. Should it be reopened? See the most recent edits.
 
9:50 AM
Cbg
 
10:01 AM
Morning Robert
 
Having had a four day weekend, I'm finding Tuesday confusing.
 
10:17 AM
I want to run command ="nohup somescript.on.remote.machine.sh" without waiting for output (just invoke the command on that machine and let it run
I simply did `>>> process = subprocess.Popen(command)`
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
 
I mean, room rules aside, the error is pretty clear. If you're trying to run it on a remote machine, you need to ssh into it first, and from the very limited code you've posted there, you don't appear to. Are you using fabric or similar to manage the remote machines?
 
yes i already have ssh in the command
let me share the full command
say command = "sshpass -p \"pass\" ssh -p 22 -o StrictHostKeyChecking=no me@10.20.30.40 \"/home/me/myscript.sh\""
 
I'm going to assume that you're using a combination of ' and " in the real version of that command?
 
by and you mean i create the command by adding multiple strings ?
I am running this on multiple machines using the below code (but dont want to wait for each machine's output
for machine in MACHINES:
    user, password, port,a,b = MACHINE_MAP.get(machine, (defaultUser, defaultPassword, defaultPort, 0, []))

    command = "sshpass -p \"" + password + "\" " + "ssh -p " + str(port) + " -o StrictHostKeyChecking=no " + user + "@" + machine + " \"" + com + "\""
    print command
 
10:32 AM
if you're using subprocess, you don't want nohup you want to use it as
proc = Popen([cmd_str], shell=True, stdin=None, stdout=None, stderr=None, close_fds=True)
Jfc
22
Q: Run Process and Don't Wait

BullinesI'd like to run a process and not wait for it to return. I've tried spawn with P_NOWAIT and subprocess like this: app = "C:\Windows\Notepad.exe" file = "C:\Path\To\File.txt" pid = subprocess.Popen([app, file], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).pid However, the consol...

 
10:49 AM
cbg
 
o/
 
11:36 AM
Currently wrestling with scheduled jobs on multiple workers in celery. My understanding from the docs is that, if I have two queues (redis broker), celery will round robin the jobs for each queue across the worker instances? So queue A will go to worker 1,2,3,1,2,3, and B will do the same - the workers will then pick up the jobs according to however the queue routing was set up.
Basically, Task A can only make an API call from an IP a maximum of once per minute, so I want to split it across multiple instances. As everything's in the same queue right now, sometimes the same worker is getting multiple short API call tasks while the other does a long running task. So, separate queues?
 
I have a design question. Imagine I'm writing a strategy game. There are a bunch of different units (or, more accurately, types of units), like Axe Fighters or Crossbowmen. I'm not sure how to design an appropriate class hierarchy for this. I'm thinking I want to have a class Unit, and AxeFighter and Crossbowman should be instances of the Unit class.
But I also need AxeFighter and Crossbowman to be classes, because I have to create instances of them to make a platoon of crossbowmen, where each crossbowman can have its own health and experience and whatnot. So basically I'm trying to have a class hierarchy such that crossbowman = Crossbowman() and Crossbowman = UnitType(max_health=10, range=20). Is this the correct way to approach this?
dang, I managed to change Unit to UnitType in the 2nd message, but now it's too late to edit either one of them to make them consistent -.-
 
What's the problem? Can't you just put health on Unit and have the Crossbowman constructor set the initial health value?
 
11:52 AM
So make Crossbowman a subclass of Unit?
 
But if the only special thing about a crossbowman is that its health and range differ from other units, then wouldn't it be kind of strange to make Crossbowman a subclass of Unit, since it doesn't implement any new behavior?
 
Idunno, that sounds like bad design. If Unit has a constructor that requires a max_health parameter, and Crossbowman is a subclass of Unit, isn't it odd that the Crossbowman constructor doesn't accept a max_health parameter? Doesn't that violate the substitution principle?
 
I make a half-hearted attempt to make a Fire Emblem / Final Fantasy Tactics / Advance Wars clone every six months or so, and I usually end up coming up against frustrations like this. Mapping Python classes to units seems like a natural choice, but then there's always some wrinkle that bogs me down...
 
Maybe I should make Unit an abstract base class that requires its subclasses to define a max_health attribute
Instead of making the max_health a constructor parameter
 
Yeah I think I meant more an ABC Unit than one that can be instantiated
 
11:58 AM
Yeah, you never want to spawn generic units
 
I'll give that a shot. I'll let you know if/when I run into any problems :D
 
Hmm, it's just about time for my next half-hearted attempt...
 
12:13 PM
During one of my attempts someone suggested putting this kind of data in a database. Couldn't find it with 30 seconds of searching, but it's in the transcript somewhere
 
people suggest that all the time
 
Mar 12 '13 at 17:38, by Kevin
If different types of monsters are distinguished only by HP, armor class, attacks per round, etc, then it's easy to describe them all with one class. It's the monsters with unique effects that require additional code. (Ex. players take poison knockback damage when attacking purple dragons unarmed, etc)
Inbar has some neat ideas in the conversation following that
congratulations to @fart on his @SlackHQ bug bounty #DevOps
Why does oneboxing chop off the top and bottom 20 pixels ;_;
 
it's already too big
 
hahaha, that's hilarious
 
Chat devs, please make all of my messages take up 100% vertical screen height
And enable <marquee> and <blink> markup for me only, TIA
 
12:33 PM
morning cabbage
 
@AndrasDeak I finally understand your FGITW frustration
 
how so? :P
 
Undead cabbage
4
 
I know this might come as a surprise but I'm not obtuse to the plague known as repwfarming
0
Q: Python Pandas fillna doesn't work in for loop?

Curious StudentGiven a set up such as below: import pandas as pd import numpy as np #Create random number dataframes df1 = pd.DataFrame(np.random.rand(10,4)) df2 = pd.DataFrame(np.random.rand(10,4)) df3 = pd.DataFrame(np.random.rand(10,4)) #Create list of dataframes data_frame_list = [df1, df2, df3] #Introd...

 
I know you're not, that just adds to my annoyance :D
 
12:37 PM
When you try and write up a decent explanation to help OP understand their error and then on the other end of the spectrum you have users dumping code
 
at least that question is not that bad to answer
> I thought the issue may be due to the way I was naming variables so I introduced global()[df], but this didn't seem to work either.
well that's a bit scary ^
 
There's nothing wrong with being a fast typer. But there's something wrong with not putting much effort into a question besides writing code
 
@AndrasDeak Reminds me of this workaround to let you have leading numbers in variable names.
 
Anyone listen to the SO podcast?
 
12:46 PM
ain't nobody got time for that
 
I've listened to maybe two ever, when they were talking about something I was specifically interested in
I remember finding them pretty interesting, though, even the parts that weren't related to the topic I was listening for
 
I started listening after they talked about the Mentoring experiment.
 
1:23 PM
@toonarmycaptain so just picked cabbage :D
cbg \o
 
Cabbage
@Rawing It's possible to emulate a comparison function by using a class that defines rich comparison methods, but it's better if you can avoid doing that, because it has the same inefficiency that a comparison function has: the custom comparison has to get called on every comparison, whereas a key function just gets called once on each item being sorted.
 
Yeah, I indirectly did that with functools.cmp_to_key, but it was pretty unreadable
 
@MooingRawr cbg
 
ohh nice picture Rawing, didn't recognized who you were until I read the name
 
@cᴏʟᴅsᴘᴇᴇᴅ What vaultah said. sorted is a convenience function that creates a new list and calls .sort on it, so it's more efficient to avoid creating that new list.
 
1:27 PM
@MooingRawr Yeah, I'm handsome now ;)
 
And people are much less likely to confuse you two now.
BTW, there's something very Germanic about that picture. ;)
 
His picture before was gray, mine is like a light beige :\
 
young van Helsing-ish
 
I never got you two confused, but I know some people did.
 
I never had a problem telling me and MooingRawr apart, not sure what everyone's on about :/
 
1:30 PM
I never thought the avatars were similar, but I guess some people might especially if they had some colour-blindness. However, I would never confuse you two since your writing styles are so different.
 
It's possible that every single person in the room is thinking "I never got you two confused, but I know some people did". Welcome to Abilene
 
what PM said
 
TIL, what abilene is ... :\
 
OTOH, if someone asked me which one of you two is the native English speaker and which one the foreigner... :D
 
Well it's been a good night/morning. Got a shout out in the SO pod, and ordered my Hacktoberfest shirt.
 
1:31 PM
in particular, MooingRawr has a really specific communication style
 
@Rawing I don't understand either. It's not as if you're @Kevin/s
 
5 mins ago, by PM 2Ring
@cᴏʟᴅsᴘᴇᴇᴅ What vaultah said. sorted is a convenience function that creates a new list and calls .sort on it, so it's more efficient to avoid creating that new list.
 
@PM2Ring oh oh I want to know the answer to this :D
 
@MooingRawr you don't :D
 
Sure. The only reason I didn't call .sort is because I didn't want to keep recreating my input
But in general I would prefer .sort.
 
1:33 PM
@AndrasDeak Oh I think I know the answer to it :D since this isn't the first IRC style room I'm apart of. Just wanted to confirm if it's true or not.
 
The image is from a card named Professor of Taboos, who does research with zombies and stuff. I like to think of the zombies and dead people as a metaphor for me dealing with my ugly code base, trying hard to turn it into something good and useful
 
I only know Abilene from old Westerns, eg en.wikipedia.org/wiki/Abilene_Town
 
Oh so it wasn't halloween based?
 
Discussing DPs, eh
 
Reading the transcript, I see exactly one user that admitted to personally confusing the two of you. Everyone else is just saying "I've heard lots of talk about people confusing the two of you, so if that's the consensus, then..."
 
1:34 PM
Something satisfying about changing your DP...
 
recbg
 
Jan 16 at 14:25, by PM 2Ring
I keep meaning to ask you @MooingRawr: What's your mother tongue, and how old were you when you first started to learn English?
 
hehehe
 
:D I gave you my answer to that in a few lines below.
don't worry it's a habit that will be hard to change :(
 
Yes, you did.
 
1:36 PM
Also: referring to "DP"s is extra funny because this avatar change came about by Rawing's username innuendo
 
@PM2Ring I only know Abilene as somewhere to get a tyre/wheel replaced.
 
I'd google what DP stands for, but that's clearly going to turn up a bunch of wrong results. Can anyone enlighten me please? :p
 
top definition on urbandictionary, if that helps
 
something nsfw.
 
oooh, "display picture".
 
1:40 PM
yeah or dynamic programming
 
nonono, I was looking for the sfw meaning :p
 
@Rawing oh I missed that :D
 
Wow. That poor kid with the "variable variables" question got 9 downvotes. I think that's a bit extreme. OTOH, despite having 1 rep they aren't a newbie: they've been a member for 4 years, 7 months. How the yam does that happen?
 
having been registered that long is irrelevant
 
@PM2Ring creates the account, creates another account, uses one mainly and one for bad questions ?
 
1:43 PM
If askers could actually guess the quality of their questions, SO front page wasn't what it is nowadays
 
Sure. I just don't understand why someone would register and then barely participate in the site. Maybe they get most of their answers from Googling, but they're really bad at asking questions
 
they have another account they participate on the site with, and this is an account that they want to ask bad questions on is my guess...
 
@Rawing Getting some Diabolic Tutor vibes from that picture. Can't figure out if it's the same artist, though.
 
@PM2Ring Some people just register to see what things about about (this goes for lots of sites), but like many who browse for answers and don't register, they don't really participate.
 
It seems like a fairly common use case to have a dormant account that you only use when you get thrust into a problem you can't solve every couple of months or so.
 
1:47 PM
@Kevin I can't find the artist, but since it's a japanese card game I doubt it's the same one
 
Maybe I'm spoiled by MTG, but it's weird to me how hard it is to find artist credits for this game
 
Anyone here use Google App Engine?
 
IIRC the artist's name is visible in the game, but I don't have it installed atm, so I can't check
 
Closest I got was reddit.com/r/Shadowverse/comments/5z8q38/…, which going by the number of Japanese names, lends credence to your theory that English artist Greg Staples isn't involved
 
DSM
Tuesday cabbage for all.
 
1:55 PM
cabbage for DSM and rhubarb from me
 
That run time question...I'm like "you've never noticed this before" and "have you ever really used a computer before?"
 
I mean, I get it. Perhaps OP has observed that programs such as Firefox or Steam or whatever can have varying responsiveness between executions, but he could think of those as being qualitatively different from his Python scripts in a way that makes the latter immune to timing changes
print("Hello, World") doesn't have to talk to Valve's web server, in fairness
 
@Kevin But even that might take longer when updates are happening, etc.
 
cbg DSM... heart break game last night :\
rbrb AD \o
 
2:10 PM
If you assume
- the byte code compiler is deterministic
- the byte code interpreter is deterministic
- All calls to the OS to render stdout are deterministic
- The process(es) executes fast enough that the OS won't give CPU time to any uninvolved process
- clock speed doesn't vary by an observable margin
- The speed of light is constant
... Then it might be reasonable to assume that `print("Hello, World!")` would always execute in the same amount of time, to whatever precision your computer can measure
 
DSM
@MooingRawr: it's been a bad run of late. I'm not too worried yet, though.
 
Some of these assumptions are more reasonable than others, however.
 
DSM
Isn't "undead cabbage" just a description of kimchi?
6
 
@Kevin Especially that speed of light one. ;)
@DSM Or simply growing cabbages.
 
@Kevin unless I've misunderstood, he only measures it in seconds, so you'd expect it to be consistent
 
2:15 PM
I think he's measuring it in seconds as a float, so fractions of a second are possible
 
Ah yeah you're right
 
DSM
Two of my team members are having a disagreement, and I've been asked to weigh in. (1) Should configuration parameters be set at load time of a config module or at run time? (2) Should they be put in a SimpleNamespace object (or something similar) or loaded into the config namespace directly (via globals() or setattr or something)?
 
@toonarmycaptain Ok, to be fair, we're really more interested in the "speed of electricity" which is going to vary if your conductor is less than ideal
Never mind that it's going to vary between like 0.5*c and 0.6*c which ordinary household stopwatches would have a hard time measuring
 
@Kevin Isn't that in part related to the speed of light? It's been awhile.
 
I see two equations on en.wikipedia.org/wiki/Speed_of_electricity and one of them mentions c, so... Maybe?
I don't know what "dielectric" means
 
2:29 PM
@Kevin Fair enough, I was actually thinking of the properties of the electron itself ultimately having some relation in a very deep/cosmological sense, to the speed of light.
 
I give an 80% chance that even the equation that doesn't mention c by name, actually involves c, because you need it to derive one of the constants that they give you
"Conductivity of annealed copper" isn't a fundamental universal constant, I expect
 
It could be, though
And from it one could derive c
 
Yeah, yeah, "fundamental" is a label that humans apply to things in the universe but it isn't an actual property you can objectively find
 
@Kevin Surely not. Does it rely on such constants? Does the size of electrons, or the magnitude of their charge, derive from factors including the speed of light/properties of space time when the universe was/is forming?
 
DSM
@Kevin: that's not necessarily true. I'd argue that certain things really are more fundamental in physics than others.
 
2:38 PM
Partially agree. In the same sense that an elegant mathematical proof is more fundamental than an ugly one
 
I want to hammer this question, but I feel a little bit funny using my own answer as a dupe-target. And I suspect that the OP may not understand how to use my solution. But he's stopped responding to comments; hopefully, that means he's actually experimenting with my code. :)
 
Ridiculously prolific mathperson Paul Erdős 'spoke of "The Book", a visualization of a book in which God had written down the best and most elegant proofs for mathematical theorems. Lecturing in 1985 he said, "You don't have to believe in God, but you should believe in The Book."'
 
Here's a nice page with diagrams that discusses the speed of light in relation to permittivity and permeability
 
You can see echoes of this sentiment in anybody that ever looked at the 129 page proof of Fermat's last theorem and said "this can't possibly be the simplest way to do this"
(Not to diminish the incredible achievement of proving it at all)
 
DSM
2:56 PM
I suspect that in the future we'll improve the proof by using better technology (math tech, I mean), but I suspect there are always going to be truths which can only be proved using a certain level of complexity. There are lots of no-go theorems that show you can't solve a certain problem in a certain direction because there are inescapable obstructions.
 
The statement of Fermat's last theorem is simple, but it's asking a question that involves all possible powers n, and integer equations (aka Diophantine equations) involving powers get very tricky, very quickly. So I'm not surprised that the proof requires heavy mathematics.
 
DSM
I think of these facts as defining the landscape. There are bridges, and lakes, and streams, and forests. #platonistatheart
 
Browsing through Wikipedia, I see an interesting passage: "the conjecture was seen by contemporary mathematicians as extraordinarily difficult or perhaps inaccessible to proof." I'm surprised that anybody would hold the opinion that a meaningful theorem would be straight-up impossible to prove.
I understand that you can't have consistency and completeness at the same time, so there's going to be some truths that have no proof, but I always thought those truths would be impractical self-referential statements and not, like, something involving properties of regular old exponents.
In this specific case it's a moot point because they did end up proving the conjecture, but I wonder if there are any other "unprovable" theorems out there that stood up to time.
 
P=NP
 
@DSM Ok, I can agree with that. In fact, I think you can objectively prove that there's always some true statement that has no proof smaller than N characters (or whatever unit you care to measure proof length with)
 
DSM
3:01 PM
FLT is a little different from some theorems people talk about, though, because if it were false it would definitely be provably false. It couldn't be orthogonal to the assumption system.
 
Simply by virtue of the fact that there are an infinite number of true provable statements, and a finite number of strings of length N
Although that's substituting "length" for "complexity" when the two don't correspond perfectly. "Prove that 1+1+1...(a million more of these)...+1 equals 1,000,004" has a proof that's one million and four steps long, but it's simple enough that a very persistent middle schooler could do it.
 
OTOH, Hilbert's tenth problem, to find an algorithm that could determine whether a given Diophantine equation has a solution, has been answered in the negative: there are families of Diophantine equations where there is no finite procedure for determining whether a solution exists. Note that Hilbert wasn't asking for an algorithm to actually produce a solution if one exists.
The Berry paradox is a self-referential paradox arising from an expression like "the smallest positive integer not definable in fewer than twelve words" (note that this defining phrase has eleven words). Bertrand Russell, the first to discuss the paradox in print, attributed it to G. G. Berry (1867–1928), a junior librarian at Oxford's Bodleian library. == Overview == Consider the expression: "The smallest positive integer not definable in under sixty letters." Since there are only twenty-six letters in English alphabet, there are finitely many phrases of under sixty letters, and hence finitely...
 
My smoke alarm went off for 2-3 seconds for no reason at 3am, then for a quarter of a second an hour later.
I want to just replace the battery and call it a day, but I also want to experiment and find what the real cause is
 
I see a lot of purple links in those Wikipedia articles, so I think we may have had this conversation before and I forgot about it
 
Bah missed physics chat
You guys are the worst
 
3:16 PM
@Kevin I'm not sure such a proof would even count, save for the limited scope to which it could refer. Surely at some point the concepts of 'characters' and 'statements' become inadequate/irrelevant, higher intelligences, alternate ways of representing ideas, etc.
 
I don't know about that. It's all fine and good if we evolve into beings of pure energy and solve problems using the Music of the Spheres, but if there's no translation process from sphere-music to regular old "if A then B; A, therefore B" formal logic, then our energy descendants are hippies, not scientists
It's fine if a translation from sphere-music to formal logic exists but is hugely impractical. I don't mind if one note of sphere-music corresponds to a million petabytes of logical predicates. It only needs to be possible in principle.
 
DSM
If you have True and False, you have bits; and one bit is a character, and collections of characters are statements. There's no escape from reason.
 
@PM2Ring Hmm, I can't decide if undecideable problems are the category of problems I'm talking about ;-)
The Halting Problem is real relevant here if "Paul Erdos drinking a lot of coffee, thinking real hard, and then writing down the answer" counts as an algorithm
Who wants to get into a slapfight about ~~~mind-body dualism~~~
 
Jan
3:52 PM
Hi wanna ask about Einstein summation. Do someone just happen to know how to write the math expression of np.einsum('ij, ik->kj', A, B) for A and B matrices?
 
recbg
 
Gah! People who post answers without reading the question properly. And the OP even posted sample input & expected output. And specifically said they don't want a regex answer :grumble: stackoverflow.com/questions/47038551/… However, the OP is almost as bad: they accepted a reasonable-looking non-regex answer before they realised it gave incorrect output.
 
people don't like reading :)
 
Doesn't want a regex answer but tags it as regex?
 
DSM
I turned on --spew for gunicorn, to see if it was getting stuck. I should have listened to the warnings that it was going to be too dense. Plus it's spending most of its time in sre_parse. :-/
 
3:57 PM
Because there isn't a [^regex] tag
 
@PM2Ring I'm not sure "non regex answers" are the only viable thing. Especially considering the statement " I know this can be done with regex and with for loops but regex seems a bit difficult for a beginner like myself."
A good answer would actually show that -if doing it manually- you'd basically reinvent regex.
 
Duplicate of 1 2 3 4. Just enter the title of this question into Google search. — vaultah 7 mins ago
Another day, another duplicate HNQ
 
One might interpret "regex seems a bit difficult for a beginner like myself" as the OP being open to regex answers, but only if they are posed in a way he doesn't find difficult
 
@paul23 Regex are the proper tool for a task like that, and I said as much in my answer. However, it's fair enough that a Python beginner may feel daunted by having to learn a whole separate cryptic language to do string processing. OTOH, I'll freely admit that my groupby solution isn't exactly child's play either. ;)
 
3:59 PM
@AnttiHaapala not my question :P
 
I know I was going to ping pm
but ... then noticed that you're talking about this
 
@PM2Ring remember that SO is gamification and one viable strategy is to answer fastest. In so doing, it is often an effective strategy to answer quickly and often with only a modest reading of the question. If answerer is wrong sometimes, who cares, delete the answer and move on. As long as answerer is right often enough to justify the strategy to themselves, then the behavior continues.
 
I downvoted the guy with 70krep
 
@AnttiHaapala Certainly.
 
I guess it is time to write yet another meta that we need to get rep for closing as a duplicate
 
4:02 PM
Do it
 
something like at least that the OP could accept the duplicate
and the guys who flagged the dupe would be awarded say 5 rep
 
@AnttiHaapala that's already implemented
 
accept as in "hereby I accept this duplicate question as the answer to my question"
 
If you only hammer posts when the dupe target's answer is written by you, then you'll get points if the OP finds it helpful and upvotes it :-P
 
321
Q: New UI encourages askers to confirm or dispute duplicate votes

Shog9As of the 9th of March, the banner shown to askers whose questions have attracted at least one duplicate close vote has a couple of new options: If the author clicks the first button, they're shown a confirmation that clarifies the results of this action somewhat: If they click "Ok", the qu...

 
4:03 PM
11
Q: Asking for downvote clarification only to be able to revenge downvote

MichaelI'm a big believer in justifying a downvote if someone asks for the reason. It's annoying to put a lot of effort into a post only to have someone anonymously acting like a displeased Caesar. I want to write good questions and good answers, and it's difficult to get better at that without feedback...

 
@vaultah Antti means the dupe-nominator / hammerer should get the 15 accept points. I think that might be a bit too much, but 5 or 10 points sounds fair to me.
 
Right
 
well I did say 5 rep
that's only fair, because usually the askers do get something like 1000000 upvotes to their blatant dupes
 
I don't hate the idea of a reward system for post closers, but it's got to be carefully done or complaints about tyrannical hammerers will multiply by ten overnight
 
if gaming is suspected to be a problem, then that would be awarded for targetting questions that weren't written by the deduplicator, or answered by them
and OP would have to accept this
 
4:08 PM
Giving the OP power over whether you get any points would go a long long way to addressing problems of incentives
The unfortunate consequence there being, there's a huge intersection between "lazy OPs that never hand out accepts or upvotes for anything" and "lazy OPs that write closeworthy posts"
 
22
Q: Do we need to breed some common sense into users who keep asking bad questions?

CodeCasterA lot of work is going into making new users ask better questions, and I can only applaud the effort. I'm still wondering though, what about "grandfathered" users who consistently show that they don't quite know what they're doing, who ignore or even get angry at comments asking for clarification...

 
Meaning that closers will get close-accept points one in every hundred attempts
 
I love the narrative there!
that's well worth an upvote :d
 
@Kevin And I think the dupe finders need to be rewarded more than the dupe-voters / hammerers. It's easy to vote / hammer a question when someone else has already done the hard work of finding a good target. OTOH, I'm concerned that people will be less diligent in looking for good targets if there's a reward system.
 
@PM2Ring One might hope that finding poor targets wouldn't result in such rewards.
 
4:21 PM
Hello!! I want to write a progarmm in python that reads two lists A, B and checks if the one of the lists is a circular shift of the other list. The result is either True or False.

I thought to do something like that:

if sorted(A) == sorted(B):
C = True
else:
C = False

But it cannot be correct because if we consider the lists A=[1, 2, 3, 4, 5] and B=[2, 3, 4, 1, 5], the sorted lists are the same, but B is not a circular shift of A. Right?

Could you give me a hint?
 
Hard to say how new and low-rep users would act if there were rewards for closing questions. On one hand they might overdo it because they want the rep, but on the other hand it's entirely possible that they want to "help" the asker by posting an answer instead of closing the question
 
Stack Overflow could run a short experiment and see if it's a viable idea if they wanted to
 
@PM2Ring less diligent... how?!
they're not doing anything at all now.
 
like this 70krep guy
he knew he's going to get +17 etc.
I am going to star that question and then delete once the grace goes
just to show him :D
 
4:26 PM
@AnttiHaapala I think you'll need ~5 more votes to delete it :P
 
:F
I am pretty sure I can get at least 2-3 more :P
@PM2Ring see, here I used 5 minutes of my time finding this nice dupe to this c question: stackoverflow.com/questions/47039675/…
what is my reward:
 
do you guys generally work with multiple languages in a day, or do more senior devs tend to specialize in a single language?
 
nothing at all. Nought, nil, nada, nothing, zero, zilch and zip
 
@excaza Ah ok! Thank you! :-)
 
no programming languages at all? you have truly ascended
 
4:35 PM
@corvid that's for PM :P
@corvid all the programming languages are the saem
they're turing complete. They map to lambda calculus
 
@corvid it kinda depends on the stack, some folks will only ever need to use one and some will regularly use 2-3, moreso now that all the web stuff is the new hotness
 
yeah, but there's usually syntactic sugar and different conventions around them, like JavaScript and Python, class doesn't work the same at all
 
but they do!
 
First experience of candy corn: "Why?"
 
You can't add up all the cells in an excel spreadsheet with lambda calculus :-P
 
4:37 PM
but you can!
 
I think we're operating on different definitions of "excel spreadsheet" here
I'm specifically excluding things such as "a sequence of integers equivalent to the bytes of an excel spreadsheet as they appear on one's hard drive"
 
and you're including what?
 
@toonarmycaptain Indeed. But that's hard to automate. And there are problems if you have people voting on the merits of dupe targets.
 
If you remove a spreadsheet from a computer and put it in the realm of pure mathematics, then it's lost its indefinable qualia of excelness.
 
@AnttiHaapala not on a literal functional level, just in the syntax to do things... like if you wanted a function bound in a certain way, you'd use @classmethod or @staticmethod but in javascript it's like myFunction() {} or myFunction = () => {}
 
4:40 PM
@corvid and then?
the same with human languages. I try to communicate. Language doesn't matter.
should I stop speaking Finnish say?
specialize in English only?
 
@MaryStar Right, sorting doesn't help with that task. But what you can do is see if B is a sublist of A+A.
 
or would it be that it is more appropriate to sometimes use different languages?
 
yeah, the structure of languages can be different, like English and German are structured differently, that's why I am curious if people just end up specializing more
 
@MaryStar simply, you could try all circular shifts of one list against the unshifted other...
advanced: pick the first element of the one and find the positions of that in the other
 
I imagine some limits would have to be put in place to prevent farming/teaming, putting the OP in place to judge - so if their question is answered by the dupe, they say so, might be the way to go?
And if the OP needs convincing/help applying the dupe to their situation, then the dupe-er has to work for that approval, and that interaction may be positive in the long run.
 
4:43 PM
I so want Jeff back :F
 
@toonarmycaptain That sounds reasonable. However, many times the OP is the least competent coder contributing to a page, so they may not be the best judge.
 
@PM2Ring Fair. The same could be said of them choosing an answer to accept though.
 
indeed
 
5:06 PM
@toonarmycaptain What Antti said. And that's why so many questions have the top answer below the accepted one with many more upvotes. But on plenty of questions that haven't had a lot of voters viewing them the best answer(s) don't get the upvotes they deserve because the accepted answer is more visible. This is a known problem with the Stack Exchange system, and has been discussed on the various Meta sites ad nauseum.
 
@Jan result_kj = sum_i A_ij B_ik i.e. result = B^T A with a transpose
 
@PM2Ring I'm wondering if separate vote counts could be shown for moderators/gold badge-in-language-tag voters. Sortof a "experts' choice." Then again, that just sounds problematic from the get go.
 
So I missed both general theory and solid state physics talk :(
I could've explained for minutes how effective mass works :P
 
@AnttiHaapala I guess you could do that, but list.index is a PITA, and unless I'm misreading the source it looks like it just does a simple linear scan (although it does so at C speed), so it's probably not much more efficient than just checking every position, unless the lists involved are large.
@AndrasDeak Is that what kids say these days instead of relativistic mass? ;)
 
@PM2Ring of course it does a simple linear scan.
 
5:19 PM
There was coldspeed's HNQ answer with +50 and the runner-up with ~10 or something
 
Look at those math equations :D
 
I have a physics-adjacent question regarding this video:
 
129
Q: Took airline plane blanket by accident; didn't realize it was forbidden. What should I do?

feels-really-badI'm very new to traveling in general. When I flew on a long flight, the airline gave us blankets and pillows. I, having no idea that I was supposed to leave the blanket behind, took it as I collected all my things, and left. I had assumed that since it was a somewhat cheap blanket they were part ...

 
Is it really alright for these guys to play with these things? Aren't they concerned that one would fly off and break something important?
 
like what :D
 
5:23 PM
At the very least I expect it could crack the laptop screen on the upper left at 0:28
Not even mentioning all of the sweet flips they're doing inches away from the walls
 
@AnttiHaapala I enjoy that read a lot more than I'm willing to admit.
 
I am a Finn and I'd spend exactly 0.2 seconds worrying about that blanket.
 
@Kevin I imagine if doing flips etc in the ISS were going to break something important, it would have long before now.
 
Possible answers:
- spinning objects aren't likely to fly off in some random direction, because [mumble mumble] rotational inertia
- they don't have _that_ much kinetic energy even if they look like they're spinning real fast. They're more likely to bounce off of something than crack it
- they're recording the video in the capsule specifically designed for stupid stunts like these. If that laptop breaks, the only consequence is that they can't play Doom during their off hours
Interesting easter egg on that video: the loading/buffering icon is a fidget spinner.
 
> BTW "do not remove from plane" tag means that if you decide to take blanket with you, you should take plane as well.
:D
 
5:30 PM
@AnttiHaapala I've been explicitly told by at least 2 airlines I can/to keep a blanket. I know some airlines dispose of them rather than washing and reusing.
 
@AndrasDeak Ah, of course. I'm familiar with that concept. Frank Wilczek has some nice articles explaining how the mass that comes from the Higgs interaction is an effective mass.
 
there was a picture on the internet, someone had found a 50 EUR banknote in an apartment building, so they had pinned it on the bulletin board alongside with a note, and and the banknote was there for weeks :D
 
"do not remove from plane" means that the blanket must stay on the Prime Material Plane and not travel to any other planes such as the astral plane, the Elemental Plane of Fire, etc
 
@AnttiHaapala It could do some variation of BMH, but I guess that gets a bit messy when working with general lists that don't have a fixed alphabet of items.
 
sorry, 20 € :D
 
5:33 PM
That's worth a fortune in the UK right now
Probably double the value of the building
 
@RobertGrant if you exchange that to pounds you get the raw materials for another building
 
@MaryStar Here's another solution that doesn't involve conversion to strings. FWIW, I also thought of doing it via strings, but decided that would be less general, and you need to guard against false positives. circular_shift.py
 
@AnttiHaapala @PM2Ring Ah ok. Thank you!! :-)
 
Lol
better not lose a wallet in Lisbon:
"Wallets returned: 1 out of 12. A couple in their sixties spotted our wallet and immediately called us. Interestingly, our reporter learned that the two weren't from Lisbon at all—they were visiting from Holland. The remaining eleven wallets were taken, money and all."
 
5:44 PM
From stackoverflow.com/a/47038785/4014959 "If I were to create code that removes the 1's from He11o but not the second @, I think this would become way more complicated than what the OP wanted." IOW, "Sorry, I'm not going to write code that gives the correct solution because that would be too complicated for the poor OP".
 
Oh god......
 
@PM2Ring there is another one
a) I'm more interested in helping people to learn to use tools than simply solving problems for them. b) OP indicated that he/she was intimidated by regexes, so I wanted to provide a counterpoint to show that they're not scary. — erewok 2 hours ago
I am going to cast some delvs
 
@AnttiHaapala That's a reasonable sentiment, IMHO. And the OP didn't exactly say they don't want a regex answer, but just that they don't know regex and so they're looking for a non-regex solution. However, it is a bit silly to then use regex and not actually write an answer that gives the expected output.
 
They didn't even say that they're looking for a non-regex solution, unless it was in a deleted comment or something.
 
lol that comment
 
5:54 PM
Heck, all their comments on the regex answers express gratitude and an intent to learn about regexes.
 
@user2357112 True, but they did say "I know this can be done with regex and with for loops but regex seems a bit difficult for a beginner like myself. " And that can be interpreted to mean "I'd prefer to do this without regex, unless someone can do it with regex and explain it to me".
 
00:00 - 18:0018:00 - 00:00

« first day (2572 days earlier)      last day (2380 days later) »