« first day (2000 days earlier)      last day (2953 days later) » 

7:00 PM
@Nexion at this point it might be best for you to ask a question on the main site.
 
@Ffisegydd When you say it like that how can I not read it now!
 
I drank too much last night. So much gin.
 
@Ffisegydd Sounds like you need a Corpse Reviver #2 to get rid of that hangover.
 
Was in a Bierkeller drinking steins and eating sausages.
Then we began The Ginining.
 
Also what is everyone's preferred setup for Django webservers? I was fighting with a personal project for a few days before I gave up on getting it hosted on AWS - I tried apache and mod_wsgi, tried gunicorn, tried a few other things and couldn't get anything to work.
 
7:05 PM
@Nexion I use gunicorn or uwsgi for the wsgi server, and nginx for the http server
but any app server and any web server will work fine
 
I think that was the setup I had the most success with, but I could never get wsgi to recognize the app wsgi file
But I never had an application.wsgi, it was always a wsgi.py file under my main application - most guides referenced the former.
 
Django doesn't require a "wsgi" file, that's just its weird default.
But it doesn't explain it well, and it doesn't have good documentation about the right way to package and deploy Python packages.
Which reminds me I need to make a doc like that for Flask.
 
I tried Flask too lol.
But yeah, their production deployment documentation is garbage
 
For flask?
 
sopython.com is served with nginx and uwsgi just fine
there's even docs for how to do it
 
user559633
7:10 PM
but it's garbage, don't you see?
 
user559633
flask.pocoo.org/docs/0.10/deploying 5 major headers and how to, including troubleshooting other software is just garbage
 
I mean the Django documentation
 
I like nginx, and used to use gunicorn, but I moved to Python3... I think gunicorn is on Py3k now? I know Django is, of course...
I think I setup an example uwsgi+flask app :P
 
That's my other problem, I'm using Django 1.9 and all the guides are for like, 1.7 lol
 
That shouldn't matter at all.
Django's version has nothing to do with how to deploy a WSGI app.
@WayneWerner gunicorn has run on 3 for a while, it was gevent that didn't until recently
but eventlet has supported 3 for a while
 
7:15 PM
Sorry, that was a disjoint comment - i was referring to general troubleshooting when I was trying to learn things.
Most everything was the same, but a few things were different
 
@davidism Ah. Well, I haven't really done much production servers anyways... stopped with Django when I discovered Flask, heh
 
@WayneWerner Why do you prefer Flask over Django?
 
back in college. Of course, now that I grok a lot of what Django was just doing for you magically, I've been thinking about picking it up again.
 
DSM
That reminds me, a long time ago I think I said I'd write up some notes on the things which puzzled me when I was starting out with Flask.. it wasn't that a particular task was hard, it was that I really knew nothing about what stuff was supposed to be on the server side and what on the client side and whether or not JS was even mandatory. Everything I needed to know could be explained in a few pages, but everything was written assuming I already knew it..
 
:| Okay, even if I pass an int DIRECTLY into this method, it still says its not an int
 
7:18 PM
@DSM I would read that. I still have no idea how the internets work with their fancy pages and what not.
 
@Nexion At the time mostly I had no clue what Django was actually doing. Yeah, it's great for getting things up and running with little fuss... but I can't use a framework that has too much magic. I guess I'm fine with an API that does things for you, but when I'm expected to hook into a machine I want it as simple as possible. Flask did that for me (i.e. @app.route('/') def main(): return 'hi' is a view)
 
Twist: you're actually calling the method twice, but only verifying the type in one of the two spots.
 
I've tried both Flask and Django's tutorials, but both of them seem to assume that I already know how websites work.
 
Meh, Django isn't really magic, it's just opinionated, and those opinions only really match up with blog/news sites.
 
I need one that assumes my computer knowledge is "Clicky things with letters make computer work".
 
7:19 PM
Ah. Yeah I started in Java with Spring - i knew a bit of internety things going in
 
@davidism Yeah, but to me at the time it was indistinguishable from magic ;)
 
But I can see how that would be an issue
 
@Nexion I'm sorry. Though I suppose it's probably possible to do good things with Java and Spring the application I worked on was not
 
The apps I wrote in it were good lol
 
"What are these pages of errors passing by in the log?" "Oh, those are the normal ones. That means it's working correctly"
 
7:21 PM
Not so much my coworkers.
It was funny, we had an app written in Node that once we fired our other office, no one in the company knew node. They spend 3 months developing this app, I rewrote it in Java in a week.
 
DSM
One of the last things I did at my old firm was to get approval on replacing a broken and impossible-to-maintain Java app with a Flask-based solution, which was simpler and much more customizable.
 
user559633
I should start writing more Java. But C is right there and doesn't require a VM
 
I should at least learn Java.
 
DSM
@Morgan: have you worked with many members of the C* family?
 
@Morgan'Venti'Thrappuccino It's just an overly verbose Python ;)
 
7:25 PM
@DSM I've very briefly played with C#.
 
C# is so great
 
My OOP/Compiled language experience all comes out of Delphi.
 
It's like C# but worse
 
It's the only C based language I can stand
 
I do really like C#.
 
DSM
7:26 PM
When I first started working with C# it struck me as Java done right.
 
Which is to say, it's a language that isn't C#
 
LINQ is really awesome.
But, I've used it for ~2 days because work has me only writing Delphi.
 
@Morgan'Venti'Thrappuccino Come to the darkside (apparently I'm a Java lover according to DSM)
 
DSM
It's improving, I guess. It used to only be pretty awesome:
Mar 18 at 17:52, by Morgan Thrapp
LINQ is pretty awesome.
 
And my little bit of free time is spent on Python.
 
7:27 PM
Wow well remembered!
 
Wow, I'm impressed.
 
Or put another way: you need a job :)
 
It's his super power - he's able to remember every single fact that occurs in the Python room. It's both a blessing and a curse, as he also remembers every time he's been Kevin'd.
 
Everything I say is objectively correct, so when you get Kevin'd, that means that you too are objectively correct. It's a good thing.
 
user559633
Pulled pork is more delicious than brisket, but less dignified.
 
7:32 PM
Hello people, once again D:
 
That's why I eat pulled brisket. It's the best of both worlds.
Dignified and delicious.
 
user559633
you can't pull brisket. that's not how it works, frappypants
 
Of course you can.
You can do whatever you want if you beliebe.
 
brisket? burned ends poutine:

https://media-cdn.tripadvisor.com/media/photo-s/08/7c/fe/30/blackstrap-bbq.jpg
 
user559633
have you tried? doesn't work.
 
7:33 PM
burned ends of the brisket on a poutine...so....good
 
Maybe it was shredded brisket? I dunno what to call it.
It was like pulled pork, but beef.
 
user559633
I wonder how long I could last as a vegetarian
 
I think you can pull anything if you can rip it apart with a fork. My roommate in college would make pulled chicken.
 
I make that all the time.
 
Wow. I'm dumb. I was using the wrong variable. I was creating two django page objects and passing one to the other instead of the actual integer.
 
7:36 PM
I can rip a process apart with a fork
6
 
Let me just go not allow myself to be a developer anymore. I suck.
 
Fair enough. Hand in your developer card on your way out.
 
user559633
You can slow cook brisket and break it into pieces, I'm just suggesting that it's not a good use of brisket
 
@idjaw You need to stop making me hungry. I'll just be in the corner eating all day, and then who's fault is that?
 
I'll proudly take the blame
 
7:37 PM
@RobertGrant Pulled python, sounds delicious.
 
@RobertGrant Top quality punnage there.
 
@Ffisegydd Really, I thought it bombed.
 
Truly great artists are not appreciated in their time, they're appreciated 30 seconds later by a hungover Welshman.
3
 
That's more accolade than I know what to do with
Hmm do I start some dev now
 
@Morgan'Venti'Thrappuccino One thing I hate about C# is switch statements require break; statements
 
7:40 PM
Wife and kid in bed; Blue Exorcist on the TV.
 
anything else is a syntax error >_<
 
@WayneWerner that's weird
 
@WayneWerner Yeah, that's a little odd. It does allow for fall through, but I could definitely see where it would be more trouble than it's worth.
 
Well, not if it's a syntax error
 
Er, wait, am I misunderstanding? I thought you just needed one break somewhere in the case.
Do you need one in each switch?
If so, yeah, that's dumb.
 
7:43 PM
Did you use switch and case the opposite way round to how you meant? :)
 
DSM
I dunno. Switch/case fallthrough has bitten me once or twice.
 
fallthrough can be annoying but requiring break is silly
 
I don't care if you don't allow fall through, that's fine
pretty sure VB doesn't
but don't make me type 'break;' in every case
 
yeah it just adds syntax noise
 
that's worse than }
 
7:45 PM
Yeah I'd rather type continue if I want it to fall through
 
rbrb
 
although
can't you stack case labels still?
 
i.e. it falls through but only if the case label has no code in it
 
I hate companies that won't put their product price on their site.
"Contact us for a quote!"
 
DSM
7:47 PM
Looks like C# doesn't allow fallthrough in any event.
 
@Ffisegydd that's incredibly common for B2B companies
 
@Ffisegydd "it'll be more than it could be, purely because we pay humans to reply to you"
 
DSM
That weakens the case for mandating break.
 
@tzaman yeah I know, doesn't mean I have to like it though.
 
DSM
7:49 PM
What's the motivation? To get you to invest time in finding out the price, making it more likely you'll consider that time an investment and make a sunk-cost mistake?
 
@DSM "and each section can have one or more case labels" -- from the docs
 
user559633
A bit of salesperson convincing you to continue down the funnel and a bit of perfect pricing.
 
@DSM I assume so maybe? Also making it not immediately obvious to competitors their current pricing. And also so you can give custom quotes.
 
primarily retaining the capability of selling the same service at different prices to different people
 
DSM
perfect pricing? Remember I don't know much about business jargon.
 
7:50 PM
I can see the reason for it, it's just annoying for me as someone who would like to know a ballpark price.
 
user559633
If I was hesitating on purchasing 5 sofas for my workspace, a salesperson on the phone might successfully pressure me into pulling the trigger.
 
what your prices are is competitive intel
and often you're wanting to undercut competitors in the same space, etc.
or drive your price upwards as you demonstrate value
 
user559633
Or, if I called and the saleswoman inferred that I was price-sensitive, she might offer a 5% discount if I purchased today, but if Fizzy called and didn't give that impression, the salesperson might try the sale at full price.
 
or do a sweetheart deal for a really large customer
etc. etc.
many valid reasons
 
DSM
The joke's on them all: I have no money. They're wasting time even talking to me.
 
user559633
7:51 PM
Who are you, me at a bar in my 20s?
 
Again I understand the reasons, that doesn't make me not be annoyed by it :P
 
"if you have to ask, you can't afford it" ;p
 
user559633
I wasn't talking to you .___.
 
neat
 
8:17 PM
I'd like to see this man write a math textbook - i would actually read it :)
 
awwww
I think. I'm not sure. that's kinda creep the more I look at it
 
wim
8:33 PM
python pop quiz

>>> a == x == b
True
>>> a == b
False

what is a, b, x ?
(builtin/core libs only, no fancy tricks or custom classes .. )
 
A snake!
Did I win?
 
8:46 PM
I have no idea and I have to leave work soon. What's the answer? I spent a while playing with different values, but I can't come up with anything.
 
a and b could be OrderedDicts and x a dict.
Or a, x, b = decimal.Decimal(1), 1, 1.0
 
wim
yeah you got it, kevin. this is what I had:

x = dict.fromkeys('01')
a = OrderedDict(sorted(x.items()))
b = OrderedDict(sorted(x.items(), reverse=1))
 
Ohhhhh, I didn't even think about that.
 
wim
I think the decimal one doesn't work. a == b is true
I don't know of any other cases, tried to make one with NaN but couldn't. the ordered dict one is the only one I could find.
 
Seems like that one was fixed in 2.7 and 3.something.
I checked it on 2.6.
 
wim
8:58 PM
for the dicts, I think a == x should be false honestly
ughhh, keep chatting so that creepy disgusting dog gif gets pushed off the screen pls
 
Oh, I just remembered why the decimal behavior is different in 2.7. That's when they decided that float/decimal comparison should be based on the values rather than the arbitrary fallback comparison.
I forgot that that would hold for == as well as > and <.
 
how many more messages do you need @wim :P
 
wim
I found another wat
check out `ast.literal_eval("1+1")`
 
is this enough for you?
or maybe this
I love your panda suit wim
 
hello
 
9:02 PM
what the
 
wim
in python 2 it (correctly) raises an exception
 
anyone this is 13 years old?
 
wim
in python 3 it works. wat?? that's not a literal !!
 
Oh wait, I misspelled it. That Python 3 behavior is weird, though.
 
wim
I dug into it, and found the root cause
they were fixing this wat in python 2:
>>> ast.literal_eval("1+1j")
(1+1j)
>>> ast.literal_eval("1j+1")
# ValueError: malformed string
and by fixing that, in python3, they accidentally made literal sums and differences work in literal_eval. (but products , divisions still don't)
 
9:06 PM
anyone ask me?
 
@Alchimyst what are you trying to say?
 
wim
i think in python3 it's now a feature not a bug :(
 
I don't think I would have permitted "1j+1".
 
wim
but it's a valid literal
>>> 1j + 1
(1+1j)
what should that do? SyntaxError ?
 
It's a valid expression, but what exactly should be classified as a "complex literal" is fuzzy.
 
9:14 PM
@wim it is not. 1j is a valid literal.
1j + 1 is still an expression.
 
so why does literal_eval evaluate it in py3?
 
The peephole optimiser does collapse that expression into a constant with a very expression-like notation..
 
wim
then you would have to allow literal_eval('1j') and disallow literal_eval('1j+1') , which seems insane
 
@wim yup, which is why literal_eval() added parsing of addition and subtraction...
It should test if one of the two operators is a complex number however..
 
It used to.
 
9:17 PM
@Ffisegydd I did find it interesting. I've seen something similar about project slippage - as it slips, after a certain point, the more time you spend on it the further away delivery gets. Not an exact analogy, but similar I think. Makes me think there's probably someone's name associated with it as a theorem.
 
if not, I propose calling it the Godot Theorem
 
The changeset that allowed '3j+4' also explicitly allowed '3+4+5' in the Python changelog, so it looks like it's a feature now.
4
 
@user2357112 nice find.
 
@JRichardSnape Well, I can offer a hilarious concrete example of this. Last place I worked they were trying to create some financials software. It was originally supposed to be delivered in 2013, I think. I started working there in 2014. First concrete date I heard was that it was late, but scheduled to be delivered in Q1 2015.
 
wim
Indeed. Kind of a lazy implementation, but practicality beats purity I guess
 
9:29 PM
At that point it couldn't even do a simple double entry correctly and actually come out with a balanced journal o.O
 
@tzaman Nice idea
 
It still hasn't been fully delivered anywhere, that I know of
 
wim
They should rename literal_eval to eval , and they should move builtin eval to some obscure library where n00bs won't find it ...
 
despite several thousand man hours being spent on it
 
@WayneWerner this does seem to fit the bill. The NHS software upgrade in the UK seems to fit the bill too. It must be a known phenomenon.
 
9:31 PM
@JRichardSnape especially if your good people leave because the project is failing because [mismanaged, understaffed, politics, etc]
 
Maybe it's called the KPMG effect.
 
@wim from dangerous import i_really_understand_the_dangers as eval ;)
 
@enderland I reckon that's often a big part of the problem.
 
9:32 PM
@JRichardSnape But it's not impossible - see the recovery of the Affordable Care fiasco as an example of what works
 
wim
while we're at it, chuck filter and map in there too and rename lambda to lameda
 
Then again, there's a difference between flailing wildly trying to make a broken thing work, and actually making parts of a thing work
and slowly replacing broken things with working things
 
DSM
I could have lived with putting filter and map in functools, and exec/eval in some inspect-like module. I won't let you steal lambda though.
 
didn't map and filter move to functools already?
 
DSM
only reduce.
 
9:34 PM
or was that just reduce?
oh right
 
wim
y'all can keep your lambda but you have to type "lame" every time you use it, because that's what you are
 
lol
 
@wim we should call it baby_eigensheep
 
just add 'λ' as an alternate spelling
or the only spelling :D
 
wim
9:35 PM
haha
ok but you have to declare at the top of the module:
# coding : lamer
 
If only they'd picked the keyword function instead of def and lambda. Javascript really got that one right.
 
yeah def is silly
 
wim
what's wrong with def? or are you being sarcastic
 
DSM
function seems a little too long for my liking, TBH. I mean, you can get used to it, but it's awfully common.
 
Yeah, I'm much more a fan of typing def than function
 
wim
9:46 PM
what if it was just like

fun good_time():
return 'yippeee'
 
and inside of a class it could be meth
then you could have fun with your meth
 
wim
god damnit, how are you guys getting the fixed width in chat
 
backticks
 
wim
test test test
oh, I tried that before and it didn't work
/me scrolls up
 
for longer sections you need to 4-indent
 
but it only works for the entire message, I thikn
 
DSM
And note that you can't mix indented formatting with non-indented formatting.
 
DSM
check out ast.literal_eval("1+1")
 
test: ast.literal_eval("1+1")
Weird.
 
DSM
9:49 PM
Test 2:
check out `ast.literal_eval("1+1")`
Huh, I wasn't expecting that.
 
how does test 2 differ from test 1?
 
wim
test 3: test test() test
parentheses ?
test 4:
test `test`
 
DSM
Test 2 was "Test 2:" + shift-return + the line with the backticks.
 
go use the sandbox if you're going to keep testing, this is silly() <-- works fine
 
wim
I guess it's multiline
this parser is shite
 
9:52 PM
multiline messages have no formatting, they're either unformatted normal or fixed font
 
wim
pffff
 
DSM
Up until the last few minutes, I'd always thought that you could backtick even in multiline messages. TIL!
 
yeah, weird, I had no idea that was broken
 
wim
👎 💩
 
10:40 PM
theswedishnumber.com how cool is this :D
 
wow
 
DSM
That's an unusual program.
 
now does one have to opt-in to a service like this?
or does the entire population get calls at all hours whenever and they are happy about it
 
@idjaw naturally, it says there on that page "ARE YOU LIVING IN SWEDEN AND WOULD LIKE TO ANSWER CALLS FOR SWEDEN? - JOIN HERE" :D
 
facepalm.....I never bothered scrolling down
I thought that was the page
 
10:44 PM
:D
 
EOD leave me alone....
 
"So, did you get any training on what you're supposed to say?
No. And I mean, that's why I signed up. That's what I wanted to find out, right? And there's absolutely no vetting. I signed up online. All I had to do was enter my phone number. I had to download an app, enter my phone number. I got some kind of activation code as a text message to my phone. I had to enter that, and that was it. Nobody asked me any questions. I got no instructions what to say. I actually asked them about that, too. "How do you know that people won't, you know, be saying things that you won't necessarily endorse
 
I can't wait to see what happens
this is going to be great
takes out popcorn and waits
 
@PM2Ring Thanks. I suppose now that the 'list comprehension vs for loop' question is solved, I could think about 'map/filter vs list comprehension'...
 

« first day (2000 days earlier)      last day (2953 days later) »