« first day (2022 days earlier)      last day (2931 days later) » 

1:00 PM
actually I now have a bigger problem than that: I need to code PHP.
 
Dom
I actually asked quite nicely, just being curious, then you insulted me. I said it was a probably a silly question so the "indeed it is" wasn't necessary.
 
hey I didn't say that you're silly, only that the question is silly.
 
user559633
@Dom we joke with each other here and it's not meant in a mean spirited way.
 
Morning cabbage.
 
Dom
It's really hard to tell if it's real or banter
 
1:04 PM
I am a Finn, if someone suggests that there is a possibility that their question could be silly, I'll frankly tell if it is silly indeed. Now, if you'd not suggested that, then I'd just have answered with the latter line.

In any case there's some data that is pushed automatically to a server, and individual customers can set an alert condition using a formula. If it evaluates to true on a given piece of data, they're notified via email/sms/whatever
 
user559633
if someone saying "indeed, your question is silly" is an insult, you should kindly find the nearest adult and say "excuse me, i seem to have found my way outside of the padded safe space"
 
I am defining a custom class, and want to change the outcome of if myobj. What builtin class method do I need to override in order to change how the boolean comparison result returns? Is the comparison always down with an implicit bool() conversion, so I just need to overload that?
 
user559633
@Dom banter. rooms/6 is actually one of the nicer places on the interbutt.
 
@Oliver __ bool __ ?
 
@Oliver __bool__ in Python 3. In Python 2 rather ridiculous __nonzero__
26
Q: overriding bool() for custom class

WallacolooAll I want is for bool(myInstance) to return False (and for myInstance to evaluate to False when in a conditional like if/or/and. I know how to override >, <, =) I've tried this: class test: def __bool__(self): return False myInst = test() print bool(myInst) #prints "True" print my...

 
1:07 PM
so If i do:
if myobj
the result can be changed by overloading __bool__?
 
@PeterVaro Someone didn't read the instructions for their do-it-yourself human centipede.
 
@Oliver yes, provided that you're using a recent version of Python
 
@Kevin That gif is going to give me nightmares.
 
I'm using 2.7, so I guess I'll use 'nonzero
Cheers
 
@Oliver then another question is why are you using Python 2 :D
 
1:10 PM
Because change is scary
 
is it?
 
user559633
 
It was at one point, I assume it still is. I haven't checked to see if it changed.
 
user559633
python 2 is a good language.
 
"Oh I'd not rather switch to that small life-boat, change is scary, they said Titanic is unsinkable"
 
Dom
1:11 PM
Why is Python 2.7 the max supported on a lot of services?
 
it is. Python 2 is better than Python 1.
@Dom it is not.
it is the max on Google App Engine
because they're the Google.
 
Dom
exactly, that's a pretty mainstream service
 
user559633
"Why are you still eating t-bone steak? Everyone is eating rib-eye now. It's fattier, but worth it."
 
I've said that Google and Redhat are the 2 worst things ever happen to Python.
they're the companies who should change their slogan to "F*ck you Python".
 
@tristan Honestly, if you're starting something new, default to Python 3.x because it'll make your life easier. I only use Python 2.x for legacy projects.
 
Dom
1:16 PM
GoDaddy Hosting also support up to 2.7, admittedly not cutting-edge, but what is it about 2.7 that makes them choose to stick with it?
 
it does not need updates :D
because it will never be updated
 
now if you pick 3 instead
 
Occam's Razor is pointing towards "laziness"
 
@tristan yeah, it is so refreshing, python3 works and python2 says "command not found"
 
user559633
1:17 PM
I go with Python 2.7 when I know the input will be in english or bytes and I don't want to pay the python 3 tax.
 
python 3 tax :d
 
FWIW App Engine's "flexible" environment support 3.4, but it needs more management than the the trad app engine
 
Uh - sorry Tristan. Meant to ping Oliver.
 
Dom
Ok I see
 
@snakecharmerb exactly, we don't care :D
 
1:18 PM
:)
 
user559633
@Dom GoDaddy is the McDonalds of the internet services world. The only people that buy things there are disgusting people, people without a choice, and/or people that don't care about how their personal decisions are destroying the environment.
 
Dom
@snakecharmerb I've read about workarounds for getting 3.x into these services but I wouldn't want the headache
@tristan they have the best customer service I've ever encountered
 
user559633
@Dom 'GoDaddy Hosting also support up to 2.7', oh, so the polite liar.
 
user559633
GoDaddy is a plague.
 
Dom
@tristan I don't get what you mean
 
1:20 PM
at least GAE has made a custom python version
it took a looong time for them to even support 2.7
 
user559633
They will smile and be polite while you're buying things, but if you have an actual problem, they do not give a solitary shit about you.
 
Dom
@tristan in my experience that's not true. Whilst they are reading how to help from a script, they do go out of their way to help you sort out the things they know how to sort out.
 
user559633
That's what I mean by a liar. They can have polite and friendly "customer support", but when it comes to things that matter -- reducing spam coming from their networks, honest domain registration practices, non-abusive behavior to other hosts, not scamming people, they aren't lifting a finger.
 
Dom
I think we're coming from different ends of the spectrum. I've only used them for small websites and for that I think they're good, but large-scale apps and enterprise stuff is probably not their forte.
 
lol even php storm gave up on this project
 
1:25 PM
GoDaddy - burn it with righteous fire.
 
@tristan, have you joined Boston Python yet?
 
user559633
@corvid I'm uhh....not a people person
 
user559633
meetup.com/bostonpython is this the one you're talking about? i'm going to this today: meetup.com/Canopy-City/events/230641419
 
The thing that bothered me about GoDaddy last time I used it years ago was having to pay extra for EVERYTHING, that and having to figure out what "Check this if you don't not want us to not not send you spam never, but not really, but just kidding" meant.
 
user559633
@MorganThrapp Oh, I take it you haven't had them grab a domain from under you or put you through the auction process?
 
1:28 PM
@tristan Oh I only had one small personal domain from them that I never ended up actually using.
 
user559633
Parked domain up for grabs and not just flat out parked? Pay $15 for a auctions account. Okay, pay $3 to bid. Okay, now you can bid on one of our parked domains. Hope you like bidding against a robo-bidder owned by godaddy.
 
hey everyone
 
user559633
hey andy!
 
Hi Tristan
 
Last time I registered something I used namecheap, and it was amazing how much easier it was, and how much I didn't feel dirty afterwards.
 
user559633
1:30 PM
Gandi is my favorite. Straightforward contracts (you actually own the domain, with godaddy, iirc, you're still just technically renting it) and registration process. Professional, polite, great uptime.
 
@tristan yeah, it's actually a bretty good group, it's how I learned how to into python
 
I haven't used them, but I've heard very good things.
 
user559633
When AWS first offered route53 domain regs, they were using Gandi in the backend.
 
user559633
They also offer mail forwarding and zonefile hosting, which is f-ing awesome.
 
I'm a fan of 123-reg for domain names, but their hosting isn't worth toffee.
 
1:32 PM
Afternoon salutations from Leicester. I see @martijn has been grumbling again ;)
 
Oh nice. I just went with namecheap because they had free whois privacy, but I didn't even look at Gandi, so they might have the same.
 
Hi @JRichardSnape
 
I've used 123-reg for registration too and not had any issues.
@AndyK o/
 
I use modulus for deployment, it's super easy to use and has a great CLI
 
I'm actually looking at some cheap/free hosting for a little web app that I might be collaborating on. What does everyone recommend? I just want support for flask and 3.x.
It doesn't need to be crazy powerful.
I'm looking at heroku and pythonanywhere right now.
 
user559633
1:36 PM
Modulus looks slick. For personal: I have a jenkins job that handles deployments if I push to the "release" git branch, tests pass, and I type in the "launch code" (useful for if i want to do manual checks or not do it immediately)
 
Sorry, we only know about terrible things in here.
 
Dom
@MorganThrapp I saw a service that allows you to host a few python apps completely free, I'll look it up a few mins when I'm back
 
@Dom I'm guessing it was pythonanywhere.com
 
user559633
Digital ocean is $5 a month. Webfaction would probably be popular if they offered referrals. AWS is something like $6 a month for their smallest of servers.
 
The only catch with modulus is that it favors mongodb mostly. I use heroku for python/postgresql and it works reasonably well
 
1:37 PM
Yeah, I've used DO and AWS before. I really like both of them, but since this project isn't bringing in any money (or probably many views), I'd rather not spend anything since I'm cheap as frack.
 
user559633
@MorganThrapp $5 a month is too much? (not judging, actually curious)
 
I mean, it's not really.
 
user559633
What would you spend?
 
Dom
@MorganThrapp no I think it was a .io, have to dig it up in a few mins
 
If DO is the best, I'll drop the $5. I'm spending more money than that on other recurring services that I use less. :P
I'd just prefer to spend nothing until I know that this is actually going somewhere.
 
user559633
1:39 PM
DO isn't the best, but they're pretty good for cheap dumb stuff.
 
Of course, this may be a moot point, because the person I'm working with may want to buy a service.
 
user559633
Moot as in "up for debate" or moot as the erroneous way that most people use it?
 
1:42 PM
Sorry am I not meant to post questions here?
 
> Do not link your recent (< 1-2 days) questions in the room. The main site is the dedicated space for posting questions, and having them answered.
 
user559633
@Gareth Please check out the room rules. sopython.com/chatroom
 
Okay no probs
 
hello everyone
 
The justification being, if you posted the question ten minutes ago, then everyone in this room already interested in answering questions saw it seven minutes ago.
So posting it in here doesn't actually increase viewership.
 
Yeah, I mean like how dare people ignore your important question for all of 11 minutes? Clearly it's time to loo for help somewhere else! Seriously, though, just give SO a little time to work as it was designed
 
user559633
We've had problems in the past with people aggressively soliciting help for recently asked questions instead of being patient, so unfortunately, we've somewhat codified it.
 
Note taken
 
1:47 PM
Why it is not printing row and column of all the items in the list
 
user559633
@Gareth Sorry for the ping and if this is belaboring the point, but it's nothing against you and that rule has been the subject of some debate lately.
 
@Gareth chatroom is very helpful if you are banned from asking questions.
 
user559633
Yeah, people in here are too nice.
 
@Freddy row = int(str(user_input)[0]) doesn't look right to me. In general*, it's a bad idea to create a variable inside a loop and then use it later outside of that loop
(*unless you are absolutely sure you know what you're doing)
Notice that user_input will have the same value in every iteration of your second loop. That is, it will have whatever value it had in the last iteration of your first loop.
I'm guessing that's not what you want.
 
I really miss the close vote option that said "this person has no clue what he/she is talking about"
 
user559633
1:51 PM
@GamesBrainiac Yeah, the meta "user is lazy"
 
You should probably be doing something with item, not user_input when you assign row and column.
 
Btw @JRichardSnape what means o/ ?
 
user559633
It's like someone waving: head-> o/ <- arm
 
@AndyK What Tristan said.
 
Ohhhhhhhhh, that's what that means.
 
1:53 PM
yes yes. it should be item!
 
I've always wondered, but felt like I should know, so I never asked. :P
 
Ah see. I was not the only one wondering :D
 
Likewise, \o/ is being super excited. Rather than something somewhat ruder
 
@Freddy Actually the exact opposite. If you get banned for asking question then that is for a reason, please don't come here and ask questions that actually belong on the main site.
 
@IntrepidBrit Well, now that's all I'm going to see.
 
1:55 PM
I would be down with "chatroom is very helpful if you are banned from asking questions [and you want to learn how to ask better questions and are willing to be patient and take constructive criticism]"
 
@tristan It's actually - STOPPED DUE TO GODWIN'S LAW
I would also be "down with that" (as I believe the kids of today say)
 
@Ffisegydd I know. I am trying to contribute something so that I can ask question again.
 
user559633
@Ffisegydd Hi y'all, it's Merl
 
@Freddy If you know that, then why did you tell someone otherwise? :/
Anyway.
 
user559633
it's not self improvement if you don't do it yourself
 
1:58 PM
My day of annual leave has been entirely unproductive. I only got 5 hours of video games in. I'm a failure.
 
user559633
thanks to obamacare and the grand state of assachusetts, i learned that if i quit my job to do a startup, i have to pay a penalty for not giving money to a health insurance company. what a scam.
 
@Ffisegydd You'll never reach level 99 at this rate.
 
Hello all!
 
Damn S3 is not that cheap.
 
Last time I was banned for like 4 months. I posted 1 or 2 answer. They lifted ban. Then I posted 1 question(without any down votes) and was again banned. I don't know why!
 
2:00 PM
The question ban algorithm is indeed mysterious.
Probably by design - if it was well understood, it would be easier to game.
 
user559633
@Freddy Post on meta.
 
@Ffisegydd it is not for storage. But its strengths are elsewhere
 
Google Cloud or AWS? Go.
 
Cloud, because I distrust acronyms. What are they trying to hide???
 
user559633
@Ffisegydd Who's paying and what are you doing?
 
2:01 PM
Hi @SeanParsons
 
I'm paying and I don't know what I'm doing.
Occasional random analytics jobs?
 
user559633
You mention S3, are you transferring large amounts of data to/from storage?
 
user559633
brb
 
Spinning up a cluster for an hour or two every once in a while (a few times a month) to do some analysis.
 
99 is pretty bad availability, say
even 99.9 is
you're getting reduced price for the chance that that day when you really need to do the analytics, well you cannot get that file that you needed.
 
2:03 PM
This is all for personal interest, so availability isn't the most important thing - "Oh no! S3 is down! I should just go outside instead."
 
user559633
Is there a reason why you're not just doing this on your local machine?
 
user559633
I think aws claims 4 nines of uptime for s3
 
Need clusters/experience in the infrastructure mostly.
 
user559633
@Ffisegydd The latter part is the only reason I'd use AWS.
 
user559633
Well, in this case. AWS is generally fine, but really spendy for what you get.
 
2:06 PM
(former and latter go in alphabetical order so tristan must mean the experience...)
Sorry I have to do that every single time.
Anyway, I've been reading this guys blog for a while and it's very interesting, would be tempted to try something similar: tech.marksblogg.com
 
user559633
I do mean the experience. Any cluster management you can do with a handful of virtual machines on your local machine, but you have to use AWS to talk about it during an interview.
 
As previously discussed: Pi clusers, fun but far from cost effective.
 
they say that naming things is one of the hardest problems in programming
 
Indeed. I'd like to do a pi cluster but it's just not cost-worthy.
I'd like experience and to do something productive with it.
 
what should be the name of foo where foo is set to "development" or "production", and you read the foo to find out if you should run against development db or production db
 
user559633
2:14 PM
@AnttiHaapala English has 26 letters. That's 52 if you add an underscore before them.
 
@AnttiHaapala ENVIRONMENT
 
@Ffisegydd unfortunately, this will be an environment variable
 
So?
 
user559633
what's the name of the application?
 
so setting an environment variable called environment...
 
user559633
2:14 PM
ANTTI_APP_ENVIRONMENT
 
user559633
(sorry)
 
Well actually I'd prefix it with the app name.
 
os.getenv("ANTII_ENVIRONMENT")
 
user559633
hivemind activate
 
well that's pretty good already
 
2:15 PM
lol
 
@GamesBrainiac thanks, alas this is PHP :D
 
@AnttiHaapala you poor bastard.
 
environment is definitely the correct word.
 
user559633
ENVIRONMENT_OF_SHAME_MISERY_DRINKING
 
user559633
I actually used COSTS_MONEY as an envvar before ;D
 
2:16 PM
@tristan you should keep such variables private, _ENVIRONMENT_OF_SHAME_MISERY_DRINKING
 
user559633
@GamesBrainiac lol as if my failures aren't well known and noted by those that haven't yet distanced themselves from me
 
but srsly, I always manage to mix up AWS_KEY_ID and AWS_ACCESS_KEY_ID
 
this is such a big change...
 
user559633
 
the code I inherited, wasn't in version control
 
2:18 PM
@GamesBrainiac isn't that the same as os.dontgetenv('ENVIRONMENT')? :p
 
there were 2 directories, one for production and one for development
the guy had written a shell-script to make the changes from development to production...
occasionally fix things in developemnt and then copy them over to production
 
@JonClements I think we need a special named parameter for trisitan, os.getenv("your envvar here", tristan_safe=True)
 
occasionally fixing things in production and forgetting to copy them over to development...
 
user559633
sweet, flying under the radar on that getenv
 
@GamesBrainiac watch your i's
 
2:20 PM
@AnttiHaapala I inherited a python codebase, with messed up naming and no code comments and almost no modularity.
no exception handling either
its amazing how they got by for so damn long
and the last few code commits were like "fuck python, fuck this shit, fucking bugg"
yes, had two gs.
 
user559633
haha, baller. that guy knows how to party. please tell me the "bugg" came from a spelling error
 
define("SV_USER", 13466);
wtf is SV_USER :d
 
user559633
It's the counterstrike server owner: tobyscs.com/sv-cheats1-console-commands-guide
 
@tristan some bugs are bugs, others are buggs
one g just wasn't enough man
or the guy was just drunk.
 
Bah, was about to answer a question but it got closed... As a dupe of a question I already answered. Foiled by Past Kevin again!!!
 
2:23 PM
Oh the irony.
You Kevin'd yourself.
 
it takes a kevin to kevin a kevin.
 
Somewhere @DSM is walking down the street to get a nice cup of coffee, and he just started chuckling to himself.
And then he appeared! To mock you!
 
DSM
Actually the self-Kevinning has summoned me!
Mocked, Kevin! You are mocked! By me!
 
Oh, it pains me.
 
anyone ever got dsmed?
 
2:25 PM
Nah.
 
A couple times, yeah.
 
What does "to DSM" mean?
 
@Ffisegydd Only DSM knows that my man.
 
DSM
Something like "to be awesome in EXTREME ways", no doubt.
 
I assume to use a panda.
 
2:26 PM
or itertools.
 
DSM
It bothers me that I'm so predictable, as both of those are very plausible.
 
Cabbage
 
DSM
"Police sniper shoots man in panda onesie after he storms Baltimore Fox station, threatens to blow it up" <- not me
 
I have a theory that whenever someone says "panda" to DSM, he thinks large datasets instead of the cute fluffy animal.
 
@MorganThrapp To use a panda is ok, to abuse a panda is frowned upon.
 
2:27 PM
Surely some of these are DSM's fault.
 
@PM2Ring Have you seen DSM's answers? I'm not sure which one they fall under.
 
:) BTW, after talking about sed the other night I was inspired to submit a sed CodeGolf answer codegolf.stackexchange.com/a/78702/46655
 
@PM2Ring Nice! Isn't golfing fun?
 
yes, yes it is.
 
DSM
2:31 PM
Golfing sounds like work. Now kibitzing other people who are golfing, that's fun.
 
I imagine someone to come out and say "Hi I'm X, and I'm a code golfer"
 
Speaking of DSM, this is still my favorite answer I've done. codegolf.stackexchange.com/questions/61175/…
DSM came up with the h=tuple(a)==next(zip(*d)).
 
@MorganThrapp Sometimes. I must admit I found that sort of thing more attractive when I was younger. These days I prefer to write code that I'm able to read 6 months later. :)
 
PHP is not a language for someone suffering from OCD.
ex: you mustn't add the closing ?> at the end of a file.
 
@MorganThrapp Nice.
 
2:34 PM
Yeah, I found PHP really fugly, both in expression and concept
So glad I'm off that project
 
Dom
@MorganThrapp a little late but I found it: openshift.com/web-hosting/python.html
 
Hello guys, I'm about to ask a longer python question/advice request if that's okay? It's not really suitable to ask on SO (like posting a question I mean) and I think someone who's had experience can help me with two short answers :)
Is that okay?
 
Dom
"Host up to three web applications in the cloud for free. No expiring trial, contract, or credit card required."
 
At this point, I can only accept that PHP was designed deliberately as a honeytrap
 
PHP - the language people love to hate. But as I've said before:
Oct 15 '15 at 11:55, by PM 2Ring
@khajvah Making fun of PHP is like shooting fish in a barrel. Ugly, smelly fish...
 
2:35 PM
It was designed to make personal home pages, idk what all y'all are using it for
 
@Meaty you shouldn't need to ask us whether it's OK to ask us. Just ask us, and we'll tell you if you did wrong! EAFP, remember (Easier to Ask Forgiveness than Permission).
 
@Dom Oh, cool, thanks.
 
ok, gimme a minute pls :)
 
Dom
@holdenweb It's not me asking :) and the other side of that is LBYL (Look Before You Leap)
 
@AnttiHaapala and there are many type conversions it does for you, which worries me sometimes...
 
DSM
2:39 PM
We're Python programmers. (puts on sunglasses) Never tell us the odds.
6
 
/me puts on baseball cap - yeah - tell us the evens... :p
 
@Programmer And so it should. Those automatic conversions can silently hide logic bugs.
 
(I have a feeling I'm not going to get that going as a meme... but hey cabbage!)
 
what does EOFError means?
 
@Freddy Google.
 
2:43 PM
They also aren't obvious though. One that bugs me is the difference between "==" and "===", which the latter checks type instead of trying to match types. I didn't know this until several weeks in.
 
@Freddy Hint: EOF means End Of File.
 
@Programmer are you talking about javascript?
 
In the context of online programming contests, EOFError usually means you called input and raw_input more times than the answer-checker supplied a response.
 
DSM
Look at you, being all psychic.
 
cabbage
 
2:45 PM
No, but I believe it applies to several languages other than PHP. I started with python so I don't know intricacies of other languages so well.
 
I'm using my past-looker-backwards power to remember that Freddy's been doing a SPOJ problem since yesterday ;-)
 
Project Idea: The Sopython Psychic Debugging Olympics! We line up an ever-more-difficult collection of psychic debugging scenarios, people note their ideas down in secret and are then judged for closeness by our panel of expert judges!
 
it says error raised when input() function hits end-of-file condition without reading data
 
@Ffisegydd You lie! EOFError doesn't mean google!
 
@Intrepid you just need to squint a bit.
 
2:47 PM
does not makes sense to me
 
@Freddy, in simple terms, you called input five times, but the user only replied four times.
 
Its that time of the day that you feel really sleepy, but you can't leave the office.
oh well, i gotta get more tea
 
"The reason you shouldn't leave off the php closing tag is because it causes an imbalance in the php tags and any programmer with half a mind can remember to not add extra white-space."
 
okay. so I need to take care of that too before submitting it in spoj
melon
 
If you're thinking you should have a try: ... except EOFError: ... around everything, that's probably only going to mask the underlying problem
 
2:52 PM
so what should I do to really solve it?
 
So, I'm making a rhythm machine in python, (like virtual launchbox let's say) and I wanted to make a GUI in tkinter, then by pressing of a button sound plays and you can record it, load sounds from file etc etc.

Here's how I planned it and where I got to problems.
I admit I made a mistake since I didn't read whole documentation at first, but anyway, I wanted to use winsound to play sounds, but I didn't see there wasn't a record method sadly and I couldn't find any similar library that could just load sounds from an application and nothing.
 
Find out why you're calling input too many times.
 
What "it"? You've not really shown any code apart from an error message.
 
TL;DR. Next.
 
@Ffisegydd wait a minute
 
2:54 PM
Everyone at work?
 
This is the problem I am trying to solve
this is my code
 
@SeanParsons well I am
 
@Freddy Python 2 or 3?
 
python 2
 
1. You should consider using 3 if you can. 2. You need to look into the difference between input and raw_input.
 
2:56 PM
@Meaty I haven't used it myself, but PyAudio sounds promising. And I love their logo. :)
 
Yeah, I'm wondering why that code doesn't crash with SyntaxError: unexpected EOF while parsing considering the second line of input is "3 1" which input should choke on. (in 2.7)
 
I'll try it thanks :D
 
raw_input() is for general input and input() is only for numbers. If I am not wrong
 
That is a pretty amazing logo.
 
@Freddy you are.
 
2:58 PM
@Freddy please just switch to 3.
 
Note that "3 1" is not a number, regardless.
 
input will take your input and try to execute it as Python code.
raw_input will take your input and assign it to a string.
 
in Python 2 the function input shouldn't be ever used.
the fact that it even exists was ruled a mistake, and rightly removed in Python 3; the input function of Python 3 is the same as raw_input in Python 2.
 
I use input() for hackerrank
 
@JRichardSnape (grumble grumble I was asking for insights this time grumble grumble I'll try to grumble less grumble grumble)
 
2:59 PM
Like most tools, they're fine to use if you understand them.
 
input is one of those things that you should use only when you know exactly what you're doing.
 
okay I got it, Thanks @Ffisegydd
 

« first day (2022 days earlier)      last day (2931 days later) »