« first day (2897 days earlier)      last day (2051 days later) » 
00:00 - 15:0015:00 - 00:00

3:02 PM
@Alucard You aren't running this on Python 2 are you?
 
@PM2Ring no, 3.7
 
@Alucard Good. But in that case, you need to fix up your input. input() returns a string, but you're comparing that sign to numbers. That won't work.
 
He was also using equality instead of assignment in a couple of places. There's all sorts of fun problems that need sorting out.
 
Should keep him busy for a while...
 
is there a python equivalent to # define TRUE FALSE ? asking for a friend
 
3:08 PM
@FélixGagnon-Grenier Not any more. There was in Python 2.
 
You could probably still hack something down at the C level though.
 
I recall that you can change the value of integer literals by injecting values into the Python process. I forget if changing 1 also changes True.
I'm going to guess "no"
Ho, what's this?
Apr 25 '17 at 17:42, by Kevin
c:\Users\Kevin\Desktop>py -2
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> marker = "blah"
>>> marker != 'o' or marker != 'x'
True
>>>
>>> import ctypes
>>> ctypes.c_int8.from_address(id(True)+8).value=False
>>>
>>> marker != 'o' or marker != 'x'
False
>>>
Not optimistic about this working in 3.X as-is
 
Here's a classic post on the topic from Andrew Barnert: stackoverflow.com/a/49272080/4014959
 
3:25 PM
morning cabbage
 
cbg
 
3:48 PM
mmh, an if statement is applied but the else too :/
 
My crystal ball suggests you may be doing something like:
x = 1
if x == 1:
    print("x is 1")
if x == 2:
    print("x is 2")
else:
    print("x is something other than 1 or 2")
 
ah...
your ball is very good xd
 
That second if should be an elif if you want the else to execute only when none of the preceding conditionals do
 
oh i already wondered what elif is for
 
long week
 
4:00 PM
'morning cabbage all
 
@Alucard elif also makes a difference if your first two ifs aren't mutually exclusive. if cond1 followed by if cond2 will always enter the second block, even if cond1 was truthy. If the second is elif then the check for cond2 is only done if cond1 was falsey.
if this is unclear to you you should learn a tutorial that describes basic programming constructs
 
to be honest i just never made a program with more then one if statement :D but now i read it it's clear
 
^ closed
 
4:15 PM
Thanks.
 
4:32 PM
What's up, Python room?
 
These salt and vinegar chips are pretty salty.
 
Are they vinegary enough though?
 
Sodium acetate. Yum! :)
 
There is an adequate amount of vinegar.
 
sounds tasty.
 
4:36 PM
Sometimes it gives me an ulcer but so far so good
 
On a related note, I'm not a Jupyter power user, but I'm trying to learn - anyone got favorite tips for using it to make presentations?
 
Evening cbg
 
wim
@Aran-Fey I would also be interested in downvoting such answers
 
There should be a downvoting badge... checks if there is...
 
4:39 PM
I think there's a badge for the first downvote?
 
@AaronHall there is probably a downvote hat^^
 
Yeah, there should be a silver one for like 100 answer downvotes, and a gold one for 1000 ones...
I don't watch game of thrones, but we could call the silver one "Wall Watcher" or something like that... and we could call the gold one "It Stinks".
 
^ We've never interacted but your opening statement there makes me immediately wary of you...
This should be fixed as a matter of urgency :) There's still time to catch up and keep a job before the final season starts!
 
I'd probably rather binge watch "The Critic"... I was enjoying marathoning Archer, but as funny as it was I really didn't like the characters...
 
I can't remember where I was up to on Archer. At one point I was all the way through but there may have been a new season since
 
4:48 PM
Anyhow... anyone got Jupyter tips?
 
I watched up to and including the season where they decided to start selling drugs
 
I don't use it sorry. I need to catch up now because I think it radically changed in the last year
 
Mine's vanilla, no extensions (that you would have seen).
 
@Kevin I think there was one more after that
 
At least. I saw ads for it.
 
4:50 PM
So not the fancy jupyterlab?
 
exactly
I have to do an internal presentation on Tuesday, and I want to use it... my thoughts right now are to go full screen, and hide the bars at the top.
I'll zoom in too...
 
wim
And now, I am also out of downvotes today ..
 
I need to figure out a way to show off the graphing...
 
wim
Hopefully the answer from np8 will bubble to the top eventually ...
 
I wish I could be more help, Aaron :/ My passing knowledge is not going to give you any insight into how to make it look fancy, I normally use Spyder
 
wim
4:54 PM
amazing that it took 22 answers and 9 years before someone mentioned installing the module.
 
@wim if there's not a comment calling out that fact there, I'd make one... maybe on the accepted answer as a critique so it won't be deleted (or better - so the answer gets improved... but that seems to rarely happen)
 
wim
OK. It looks like the OP is still active (and has high rep now). I dropped a comment on their question asking them to consider the 2018 answer.
 
That's a good way to change the overall problem too - but I wouldn't be surprised if they ignore it. In which case, the comment eventually gets flagged and deleted...
 
If you like your comments to stay undeleted (until they're obsolete) the way to do it is as a criticism on the answer.
 
5:03 PM
    # Complete the squares function below.
    def squares(a, b):
        number_list = range(a, b+1)
        squareInts = list(filter(lambda x: float.is_integer(math.sqrt(x)), number_list))

        print(len(squareInts))
        return(len(squareInts))

Getting timeout error for this function any advice?

hackerrank.com/challenges/sherlock-and-squares/problem
 
wim
@AaronHall why is that?
 
@wim because it's the sole undisputed reason for comments to exist on answers.
 
wim
Hmm. My comment doesn't really concern that answer, though.
 
@AaronHall: Hardly undisputed, considering how many times I've seen criticism purged.
 
@newguy I believe my advice to you last time was to iterate over the numbers from 0 to sqrt(b) and count all the numbers higher than a
Which is considerably faster than iterating from a to b themselves
 
wim
5:07 PM
It's not a terrible answer, it's just sub-optimal and abusing the PYTHONPATH feature somewhat
 
@Kevin Yeah thanks sorry I forgot will try now
 
@user2357112 I sometimes critique answers on other sites that have had comments purged/moved to chat. To make it extra clear, I preface the comment with "I think this answer could be improved by..." Does the criticism survive future purges? Maybe not, there's a human behind the delete click, but it's got the best chance of doing so.
 
wim
now I'm out of downvotes, all you lambda and itertools fans can post your one-liners today with immunity
 
func = lambda: __import__('itertools') muahahaha
 
Being wim, I suspect you'll be keeping a list :)
 
5:14 PM
(ok, iterating from 0 to sqrt(b) isn't always faster than iterating from a to b, for example when b equals one quadrillion and a equals b minus one. But that's a comparatively rare situation, given the boundaries of the values in the challenge)
 
...why not just take the square roots of both endpoints?
 
I had a very good reason which I can no longer remember
 
You decision has already been authenticated. No need to re-authenticate every time you reference the decision.
 
Which reminds me... How come so many newbies do range(0, n), and even range(0,n,1) isn't uncommon?
 
@PM2Ring I did too. If I had to take a guess, there are learning resources that make it explicit for you and, in the process, give you a bad habit
 
5:20 PM
@PM2Ring bad teachers?
 
Taking "explicit is better than implicit" a little too seriously
 
But I can't remember where I picked it up
 
I would guess that they're only taught one signature, or that they find it easier to remember one signature.
 
A characteristic of newbs is that they don't know what is important to be explicit about.
 
This is also true
 
5:22 PM
And enumerate... well that was not mentioned. It was always range(0, len(x)). But that I picked up from SO
 
@roganjosh Fair enough.
@piRSquared And they're terrible with whitespace. Either too much, or not enough.
I read a confusing Tkinter-related question a while ago. The OP has just responded to my comment, but I'm still not sure what's going on. He has a GUI program that uses Tkinter to do clipboard stuff. The GUI displays a treeview, but the treeview isn't a Tkinter treeview... stackoverflow.com/questions/52447485/…
 
The kind of questions you search for when starting out also happen to often be asked by previous people starting out. I guess it's a reinforcement cycle at the bottom rung of the ladder.
 
@PM2Ring or worse... inconsitent
 
# initialize x to zero
x = 0
 
There was a question yesterday like "why does for i in range(0, len(seq)+1): print(seq[i]) keep crashing?"
There was a kind of sublime beauty to it. The platonic ideal of a misunderstanding.
 
@Kevin So your reaction was "Awe! That's adorable."
 
Hammered
 
I didn't want to interact. Take only pictures, leave only footprints.
 
Thanks
 
@PM2Ring beat me by thaaaaaat much :P
 
5:26 PM
@WayneWerner I'll reopen for you
 
:)
 
Once it gets towards the 30 min mark, the lurkers that probably don't know what they're talking about start gathering :/
 
For people just learning Python, I can guarantee it's not a contrarian philosophy - they've learned one signature, and that's what they're using... I teach both, however.
 
With Pandas questions. The API is so flexible, I'd make every post 4 miles long to cover all possible ways to have expressed the same thing.
Sometimes, it's got to be on the end user to do a little digging themselves
Or! next time I'm going to create a button "<Press For Instant Enlightenment>"
 
5:30 PM
@piRSquared how would you say you mainly learned the API? Did you work in contact with others that knew it well? I follow so many of the questions but I still don't get the breadth of ideas on how to solve the problem like the top answerers.
 
A week or so ago I hammered a really obvious dupe within 4 minutes of it being posted. I would've done it quicker, but I was on the phone, and the mobile interface is painful. Anyway, in that 4 minutes, 4 answers got posted, one from a newbie with 50 something points, and the other 3 by people with 1k+ and 10k+. I was not impressed.
 
It's become a serious race, PM :(
I don't know whether I've compartmentalised pandas in my head to a few set patterns or whether I'm actually just still baffled by the API
 
@roganjosh I was the only one who knew any python at my last place of employment. I struggled through every task I assigned myself. I learned it the only way I know how to learn anything. Give myself a task and then do anything and everything to figure out how to get it done.
 
wim
controversial opinion: answering dupes is not necessarily bad. unless the answers are worse than the answers on the dupe, then it's bad.
 
A couple of times now I've answered a question and then hammered it, because the target wasn't a 100% perfect match
 
5:33 PM
@wim I don't disagree or agree. I sometimes answer obvious dupes because I can't find the right target. I know I've seen that question a ton of times but it's too onerous to find the target. Meanwhile, OP is waiting for an answer that I can give in 20 seconds
@Kevin that I do a lot
 
Haven't done it in a while since it's real bad PR to look like you're closing a question in order to strangle any competition
 
Or think about doing
 
Nobody ever complained but I could feel their eyes upon me
 
@wim Not that controversial. Jeff A said as much in a blog post years ago. Martijn P will often post a small summarising / localising answer on stuff he hammers. And if I think a newbie could do with a little TLC I'll wait a little while before hammering in case a decent answer appears.
 
@piRSquared I, too, will always get it to work, but either I'm not getting problems that require enough of the library for me to find new methods or I've become some kind of groupby/agg fanboi.
 
wim
5:35 PM
@Kevin comment "possible dupe?" and let someone else strangle the competition ..
 
@Kevin Probably better to do that sort of thing in tag team mode.
 
Answering and then closing can't be right. Strangling the competition is exactly what that is.
 
If it is a carbon copy, I'll leave a comment with the customized modification... then I'll go add an answer to the target
 
@wim Yeah I do that increasingly more these days since I can bask in the utter lack of responsibility if the target turns out to be a bad fit
 
Earlier, this kind of dialogue made me chuckle. Now it's grating again:
me: Please show your attempt based on your research on this problem and explain why it didn't work as expected.
OP: when you divide a list of strings, how do you make a collection of different types based on a string? to have numbers int
 
5:37 PM
I'm glad we're all in agreement that we shouldn't strangle people
 
@Aran-Fey when I've done it, I rarely get any upvotes and I don't care. It is an attempt to be helpful and respectful. If others who frequent the tag disagreed, they can flag it I guess
 
If I think the OP needs help digesting the dupe target answers I post a comment after I hammer, paraphrasing stuff, or directing them to a specific answer if it's better than the accepted one, or contains useful additional material.
 
Or, I'll edit dupe targets to fill it up with helpful posts
 
And sometimes I write a new answer on the dupe target, and direct them to that. But I haven't done that much, and mostly when others have hammered the new question... that I was in the middle of writing an answer for. :)
 
@piRSquared You're preventing other people from being helpful if you close the question. If you feel the need to post an answer, other people might, too. And they might post better answers than you. Either answer or close. Not both.
 
5:43 PM
I see the merit of your argument and it is persuasive. However, all too often I am convinced to try and help OP then I find a dupe. When I think about it though, I will find dupe first, often allowing others to answer it, then answer and hammer. But a bit of perspective, this has actually happened less than five times (rough guess)
 
If closing helps OP, and answering helps OP, then doesn't doing both help OP more?
 
But my brain is still mulling over your point
@AaronHall I think you are right but I also think @Aran-Fey's point is valid in that we should respect the gamification aspect
 
I agree with Aran-Fey on this
And why is it the gamification aspect? In your actions, you make the judgement that your answer could be the best one to sit with the question before closing
On SO, literally nobody but Skeet can make some judgement that their answer is the one that should be the final say on the question
 
I've already been bestowed the authority to hammer questions closed. My judgement has been authenticated by the ever important reputation metric
 
Yeah ok, but do you honestly believe that means you have the best say? You don't strike me as that kind of guy :)
 
5:49 PM
@AaronHall In the short term, yes. In the long term, no. If the question is a dupe, then obviously we want all the answers to be on the canonical question. If the question isn't a dupe (or at least different enough from the canonical to warrant an answer), then everybody should be allowed to post an answer. If it's similar to another question, you can link to it in your answer - no need to close as dupe.
 
As Aran said; one or the other but not both is my standpoint on that
 
I mean, the questions I answer-then-hammered were of the braindead type that had exactly one indisuptable objective answer. "How come if input() == 3: never passes in 3.X?" does not invite a diversity of solutions.
 
@roganjosh I agree that no one can make that judgement with certainty, not even Skeet. But we become comfortable with the fuzzyness of some peoples judgement
I hope that people in the Pandas tag trust my judgement to some extent. And I've made mistakes that I'm happy to have overridden of fixed by me.
 
@piRSquared I wanna clarify that I'm only making comments on the subject here, it's not specifically about you. I've never seen you do anything like this, but apparently you have on a couple of cases so I'm (trying to) bolstering the counter argument.
 
That was clear (-:
 
5:51 PM
Another option is to answer & hammer, but make the answer community wiki. However that doesn't seem to be a popular option. Yes, it shows you aren't trying to get all the points for yourself, but lots of people don't like community wiki answers since it looks like you're denying responsibility for the answer.
 
^ yes. Which I should do
 
wim
no. community wiki is stupid
this feature is nerfed and should just be removed from the site.
 
^ yes, I shouldn't do that... it's stupid
 
@Kevin And then python 4 comes along and re-introduces raw_input, which makes your assumption that input() always returns a string incorrect. I say the less duplicated content we have, the better. Otherwise it becomes impossible to update all the outdated stuff.
 
wim
you're very agreeable today
 
5:52 PM
You're right
 
In the early days, CW made sense. But not any more. They just degenerate into lowest common denominator answers: the tragedy of the commons.
 
Can I borrow $1000, piR? I'll handle the currency conversion.
 
wim
this is like the opposite of argument clinic
 
Yes, it is.
 
I think the larger issue is, I don't believe that a finite set of rules can govern a community. I think that trust must be established. People whose experience will be governed by others must buy into the authority that those others have. Once they do, those that govern should actively seek continued trust.
Btw @wim where is that packaging canonical?
 
5:57 PM
The fact that you're mulling this debate over does work to improve trust in you
 
I hate it when I go to hammer a question, and all the likely looking targets are ancient, with pre-Python 2.5 answers with hundreds of points crowding out anything more modern. In those cases, I think it's better to just let the new question get some good modern answers. But that can be a gamble, since it's very likely that you'll also get modern rubbish answers from clueless newbies.
 
A thougth: Can you protect your own question to avoid newbs from answering?
 
I'm pretty confident that if any of the regulars in here hammered something that I disagreed with, we would have an adult conversation, whether heated or not, that establishes whether or not it's a dupe. The debate, as I saw it, was answering something and locking everyone else out. That doesn't seem reasonable.
 
^ agreed... there I go again
 
The system gives us privileges because we've earned a certain level of trust. We need to remember that we have trust and we need to be careful not to abuse that trust.
ok - gotta go! Cheers!
 
6:01 PM
Good luck with your presentation on Tues :)
 
@piRSquared Yes!
By not posting it. :D
 
Actually, that doesn't seem such a bad idea
(Not the not asking idea)
 
An "I only want answers from high-rep users" checkbox would be great at first, but then the community would stagnate
One of those "entry level position: five years experience required" paradoxes
 
100 rep would be enough
 
# Complete the squares function below.
def squares(a, b):
    number_list = range(int(math.sqrt(a)), int(math.sqrt(b))+1)
    squareInts = sum(i>=math.sqrt(a) and i<=math.sqrt(b)  for i in number_list)

    print(squareInts)
    return(squareInts)
@Kevin This worked thanks
:)
 
6:04 PM
The site has a hard enough time retaining qualified people, we shouldn't make it harder for them to climb the ladder ;-)
 
How many 1 rep users are answering proper questions and coming out of that without downvotes?
We get blasted with reminders about new users that are askers. All the answerers are getting trampled
Well, not all, but a lot
 
lunch rbrb
 
@roganjosh I try to help them with constructive comments to improve their answers. Sometimes they appreciate my suggestions, sometimes they ignore them. But I probably spend more time doing that these days than I do writing answers myself.
 
Exactly
 
If I see a decent question with a bunch of newbies scrambling to answer it I'd rather assist them than compete against them for points. Unless they're writing rubbish that will mislead the OP.
 
6:16 PM
If I downvote a question or an answer, I will keep it in a tab and I'll review it at least every 5 minutes. There's a lot of new people just dropping garbage and walking away. I guess they don't know how active the Python tag is. Why is it that the whole welcoming parade should apply to askers and not new answerers?
 
I wish there was a way to get a notification or something similar if an answer you downvoted was edited.
 
If I can improve their answer with comments, I will do so. You know how often I'm online, yet 270 answers. I'll only answer if I think I can't solve the problem in a comment, the problem genuinely interests me, or if there are downright wrong answers already
 
wim
just learned a new trick ... yaml merge
 
Recently I downvoted an answer that was objectively wrong. The user eventually edited it, at which point it was objectively correct, and in fact was IMO the best answer among all existing answers. I upvoted, but it still had a negative score. This made me sad.
 
wim
the syntax actually is the same as Python [*list, *unpack, *merge], I wonder if they were inspired by that or ...
 
6:19 PM
Sorry, and also if I think the OP put in a decent amount of effort and is going off-course
 
Wow. From SO Hot Meta: Obvious defacement of answer approved? I just wilted a little .. deep inside. – Tim Post♦
 
wim
@piRSquared I haven't forgotten ...
I'm still on the fence about whether I should recommend pyproject.toml yet or wait it out a bit
though, I suppose there is nothing to stop me from writing the setuptools bits and editing in pyproject.toml stuff at a later date if I choose to do so.
 
I'm looking forward to when it gets all supported
@PM2Ring that's impressive
 
wim
funny pylint madness
 
6:36 PM
@WayneWerner Very. At least the reviewer has apologized. But how on earth didn't he notice that the thing he approved is a new question and not an answer? I understand how it's possible to get into a robo-review mindset, but that's ridiculous!
 
@wim As the saying goes "Don't let perfect be the enemy of good."
^^ that is funny
 
@WayneWerner true that :)
 
If the odd comment gets flagged and removed, do you get notified?
Flagged as something negative rather than "no longer needed" etc
 
6:54 PM
@PM2Ring Yeah, that's pretty impressively... I don't even know. I've never seen anything entirely replaced that I was like, "Oh, yeah, cool" - that usually makes me go "oh wait, what's going on here?"
 
You'd think it'd be obvious...
 
one would have to get in a super autopilot state
 
We've all seen newbies posting questions in the answers section, and once or twice I've had OPs append new questions to my answers, but I've never seen anything like that before.
@roganjosh I don't think so. But if it's really bad a mod may invite you to a little private chat.
 
@PM2Ring I can't decide if I imagined whether I posted a comment :P It definitely wasn't really bad, but I'm not sure if it was removed
 
OTOH, there are pretty strong penalties for actual commercial spam, so I guess you'd get some form of notification for that.
 
7:02 PM
Damn, so I can't post my RoganJosh sauce as competition to Reggae Reggae sauce while answering questions? I think this should be clearer in the rules
"This answer was sponsored by me, sole owner of RoganJosh mixin source"
 
Every one of my messages is an advertisement of my personal brand [100 emoji] [100 emoji] [100 emoji]
 
[1e6 emoji ** 3]
 
"It's super() tasty(pie)". Programming gives too much scope for puns that they become just awful. I'd better stop.
 
Hello
I could use some help with regex
 
Hello just ask your question
 
7:17 PM
I am trying to split up a captured group into the two parts
When there is a cloud, ie. FEW, SCT, BKN, OVC I want it to split the height and cloud into two different parts
 
@roganjosh There's no such thing as too awful. Puns are glorious
 
 
define "height" and "cloud". Is this regex terminology I'm not familiar with?
 
If it is not group 1 I want to be able to access group 2 seperately
 
@Vader The cloud is group 3, and the height is group 4, right?
 
7:19 PM
@Aran-Fey bingo
 
So... what do you need to split?
 
@Kevin It is referring to the meteorological terms
right now when I print out the cloud.group() I get 'OVC100', I want 'OVC', '100'
 
print(cloud.group(3), cloud.group(4))
 
thanks
I guess I still need to figure out a way to make this work when it is group 1
but this has been good so far
@Aran-Fey thank you
 
If you're saying "I need to extract the digits when the first group isn't None", that's impossible, because the first group is only not None when it matches CLR, and CLR doesn't have any digits
 
7:25 PM
exaclty
I will return None
I'm just gonna but it in an if statements for when it is not CLR
 
I see a lot of advice online about what to do in case you find a magic lamp, all about wishing for more wishes, or wishing there was no rule against wishing for more wishes, or wishing that the genie was bad at counting, or wishing for more magic lamps. But they never tell you what to wish for once you have succeeded in getting an unlimited number of wishes.
Is getting an unlimited number of wishes all that great anyway? If a single wish has infinite power, then is infinity times infinity really that much better than infinity?
 
Yeah, you could just ask for magic powers and grant your own wishes ¯\_(ツ)_/¯
 
@WayneWerner Swamping with puns is in bad taste, though. There's also an element of timing :)
 
That went badly for Jafar though. I guess the lesson is: pick your wording better
 
Because we all know that we will mess the wishes up. We just want a do over. If the rules were laid out. You get wishes until you are happy or dead, then we wouldn't be having this conversation.
 
7:38 PM
I have a minimalist strategy. Rather than wish to have infinite wishes so you can get everything you ever wanted, instead use a single wish of the form "I wish to have everything I ever wanted". One might argue that the genie could twist that wish into something bad, but if that's the case, then he could twist all of your individual infinite wishes too.
 
Are you aware what kind of wishes children make? Not that hard to turn that against you.
 
Ooh, perfect wish with no chance of turning against me "I wish for no one to feel misery."
 
Really I think any wish that isn't along the lines of "I wish my terminal values were maximally satisfied" is just needlessly meta
"nobody should suffer" is a cromulent terminal value, so I award pir the Plaque of Practicality
 
@piRSquared not even people using tabs?
4
 
@Kevin He did get back in Aladdin 2
 
7:42 PM
Perhaps we should take the Aladdin franchise off the table, since it is as representative of real-world wish-making theory as Terminator is representative of AI.
 
@AndrasDeak of course I don't mean them.
 
You can't expect the average genie to be as genial as Robin Williams.
 
i would wish that the genie is what the genie wants to be, maybe an efreet^^
 
Does anyone know (or want to look for) a better dupe target for this? stackoverflow.com/questions/52450069/… Preferably something that uses with to open files. Maybe something with a regex answer. I didn't want to waste any more time looking, since the answers were starting to pile up.
 
@PM2Ring IMO leave it
Thank god you put the final nail in on that :)
It's just noise, I don't think it's a good signpost as a dupe
 
7:47 PM
@roganjosh Fair point. The target I chose is ok, but it would be nice to add a better one, if it's not too hard to find.
 
Also, two plaques in one day? Yay me. Also-Also, TIL: cromulent
 
@piRSquared were you aware of embiggen? Are you now?
 
Can you concatenate wishes together like "I wish for world peace, and laser vision"? How about "I wish for a sandwich and a glass of water"? Is it just a matter of magnitude? Or is it literally just the presence of "and" that disqualifies it? So maybe you could get that sandwich and water if you wished for a good meal instead. So you just have to find a descriptive category that includes only world peace and laser vision, and wish for that.
 
I'm glad your vocabulary has been embiggened by "cromulent".
 
@PM2Ring stackoverflow.com/a/52450098/4799172 is frustrating me too much :P
 
7:48 PM
@WayneWerner I am now
 
Not least because they can't even spell my name/handle
 
I got kevin'd in the same post because I didn't finish reading before I started typing... there is a lesson in there somewhere.
 
@roganjosh I think it may be time to invoke the Hicks protocol...
 
Hack: invent your own conlang that contains exactly the categories you need.
 
7:52 PM
If you object "the genie probably only grants wishes made in its native tongue", then we're in a lot of trouble, because I don't speak the Old Tongue and neither does any living human
 
@PM2Ring Are we gonna delete the duplicates as well? If not, it's kind of a shame to delete that 0-score answer...
 
@PM2Ring such power....
 
giving me a genie lamp would result in suicide by genie lol
 
@Kevin a conlang designed to con a genie, how appropriate
 
If a genie wants you dead, then I don't think there's any wish innocuous enough that they can't interpret as "I wish I was a smoking crater" with a little creativity
 
7:55 PM
@Aran-Fey The 0-score answer was ok, but the rest of the answers made the whole thing into a train wreck. I guess we could've advised Dusan Gligoric to post his answer on one of the dupe targets. But it's too late now. :oops:
 
Oh well
 
So the sine qua non is that the genie is at least neutral towards you. No point in having this conversation without that
 
there is a xfiles episode involving a djin
i found it ok
 
Or, if not neutral, bored to the extent that he'll reward a mortal that impresses him with outside-the-box thinking and/or stellar moral character
 
state~taste->stateless~tasteless
 
8:00 PM
~tessellate
 
^ part of me is hoping that's an Alt J reference
 
@roganjosh was the first thing you get when you google it^^
 
It's the first thing that my brain google thought of when I saw ~tessellate
@Alucard youtube.com/watch?v=Qg6BwvDcANg totally unrelated to programming
 
@roganjosh i have heard it already :d
if i were such a good programmer like a linkclicker i would be next bill gates :D
 
:)
 
8:17 PM
drinking a rose hip tea
 
8:28 PM
always nice to see 99 of 100% installing anything =)
 
On Windows that's meaningless
80% of the time might be in installing the last 1% of the program
 
the usual "crap, we estimated badly, let's stall" strategy to progress bars
 
That e question was a bit silly. What's wrong with
e = d = 1
for i in range(1,18):
    d *= i
    e += 1/d
print(e)
 
so e=sum of fractions?
 
e = sum 1/n!
 
8:41 PM
Or if you want lots of digits, using simple arithmetic: math.stackexchange.com/a/1295561/207316
 
oh, we talk about euler e?
 
Yes
When I say "simple arithmetic", I mean stuff that can be done with plain machine integers, not Python's arbitrary precision integers, or Decimal, etc.
 
if you have arbitrary precision ints you should just do (1+1/n)^n for n=inf
 
9:01 PM
mmh i guess i'm spoonfed by certain compilers, trying to get a .exe from a .py :)
 
Hmmm... I think I just made my first machine learning model. It understood that a hockey player's total points are their goals + assists!
 
@AndrasDeak You can accelerate the convergence of that a little. (1+1/n)^n < e < (1+1/n)^(n+1), so if we take the geometric mean,e ~=(1+1/n)^(n+1/2), or (1+1/(n-1/2))^n. Further improvements are possible. Using bc, with a scale of 20:
n=10000
(1+1/n)^n;(1+1/n)^(n+1);(1+1/(n-.5))^n
2.71814592682522486403
2.71841774141790738652
2.71828183072428007976
Here's an enhanced version, once again in bc:
m = 15
scale = 4*m
n = 2^m
n2 = n*n
b = n2*(1 + 1/(5/9 + 140*n2)); a = 1 / (12 + 1/(5*b))
y = .5 - a/n
b = 1 + 1/(n - y)
# Raise b to nth power by repeated squaring
for(i=0; i<m; i++) b *= b
print "Library value to ",scale, " places\n"; e(1)
print "Calculated value\n"; b/1
#output
Library value to 60 places
2.718281828459045235360287471352662497757247093699959574966967
Calculated value
2.718281828459045235360287471352662497757247093699959575012731
 
9:21 PM
in context of security of web app, what are the things that we should make sure they are secure once we develop a web app?
 
yeah, used now pyinstallerto make an exe, nice :)
 
@ArunRaaj there are no things you should not make sure are secure
 
@ArunRaaj That's a pretty broad question! But firstly, never store passwords in plain text. In fact, don't even encrypt them. Only store properly salted hashes of passwords, using a strong, slow, cryptographic password hashing function. Any sensitive data must be properly secured with proper encryption, eg AES. And Merely using AES isn't sufficient if you don't use it properly.
 
:) ... point taken
 
lol 200 megabyte for a cmd tictactoe game, something went very wrong haha
 
9:30 PM
I read somewhere "Always Encode the request/responses",
what technique is used to encode request, responses?
 
thanks
 
curiosity intensifies
 
9:56 PM
i think of uploading pics of honey on a free ftp server, so i have a literal honeypot xd
 
... that would be an metaphorical honeypot ;)
 
10:47 PM
release 0.5.0 of our in-house, OSS data visualization framework: bitbucket.org/accendero/sabroso/src/master
@DSM you might be interested ^
 
That was a fun combinatorial question. I hope my output is random enough to satisfy the OP. stackoverflow.com/a/52451858/4014959
 
what means "would this make sense to people?"? is it just a phrase to spam after some statement or is it an actual question?
probably better asked at english SE
 
11:15 PM
@PM2Ring are you hitchiking in this answer? :d
 
@Alucard What do you mean?
 
seed(42)
 
Ah! I see. :) Yes, that's my standard random number seed.
 
chosen by fair dice roll
 
Jul 11 at 20:44, by PM 2Ring
Hey, 42 is my standard random seed. :)
I must have the touch of death today. Almost every question or answer I've commented on has been self-deleted. But I think the last one is just temporary while he figures out how to make his answer work properly.
@Alucard "would this make sense to people?" is an actual question. Something might make sense to you, and to the people you hang out with, but it might not make sense in a more general context. Eg, it might make sense to people in the Python room, but not make sense to the average newbie on the main site.
 
11:24 PM
like cbg
said when normally greeting^^
 
Indeed!
 
can we post questions here which have been posted in the forum? just to get action
 
@AndrasDeak My backup random seeds include 37 because it's a medium small prime, and 163, because it's the largest Heegner number. exp(pi*sqrt(163)) is almost an integer. If I want shortish random sequences of digits, I'm likely to use a few digits of pi. I might as well do something useful with them. :)
@Alucard Sure! As long as it's at least 2 days old.
 
ah ok, now i only have to wait 46 hours ^^
jk
 
The main reason for that rule is that there's no point in having two isolated pools of people working on the same question in parallel.
 
11:30 PM
yeah, kinda like posting on multiple sites
stealing time from all partipicants
 
@Alucard side note: it's not a forum
but yeah, thanks for understanding
you should read the room rules which includes asking about questions here
 
oh..
 
OTOH, if you want advice about the form of a fresh question, then you can mention it here. Eg, if you need someone to check the grammar, make sure it's sensible, and mentions all the relevant facts, whether it has enough code or too much. That kind of thing.
 
at which point some regulars will start discussing the content anyway...
 
i wish there was a spoilertag that also shrinks the text to one line
when unspoiled i mean
what i saw at puzzles SE is that only the visibility is altered not the linesize
 
11:38 PM
@Alucard That would be wonderful. The XKCD forum has that, and it's very handy.
 
00:00 - 15:0015:00 - 00:00

« first day (2897 days earlier)      last day (2051 days later) »