« first day (2749 days earlier)      last day (2197 days later) » 
00:00 - 19:0019:00 - 00:00

7:00 PM
Here's mine: gist.github.com/kms70847/4bcf5cf65c177cc12ec215a5ad3cd5c9. Requires third party library dateparser, available at a pip install near you
Kevin: 3872
user559633: 1409
Ffisegydd: 1251
davidism: 1029
Andras Deak: 944
DSM: 759
PM 2Ring: 630
Jon Clements: 626
Antti Haapala: 589
Robert Grant: 537
 
I've got 19719 stars total
 
Kevin's script is clearly better because Andras' script sorts the output backwards
 
but my star list is hand-made, the script only does the scraping and jsoning
 
Mine gives me 19722 stars.
 
wim
who is user559633
 
7:02 PM
I'm going to guess that it's Tristan.
 
wim
he ragequit?
 
He quit
 
Yep, it's tristan. My script output from two years ago indicates that chat.stackoverflow.com/transcript/message/27509919#27509919 was authored by him
 
@Kevin yeah, I took the stars half an hour ago or more, the two newest messages got a few since
 
@wim he ragequit from stackoverflow?
 
7:09 PM
Here is the current all time top ten. Compare to the rankings from two years ago.
I think I could have done a better job writing that serialized decorator. It has O(N^2) complexity when you call the decorated func N times.
Should have tried to do file I/O only once per script execution. Something involving atexit.
I think network I/O still makes up the plurality of the runtime, regardless
 
hey guys - does anyone know whether Django takes in each httprequest in parallel(truly parallel, like multiprocessing, none of that GIL stuff)?
 
That is not something that django deals with
That has more to do with which server technologies you are using
What are you using to serve django?
 
@chrisz I honestly have no idea
 
Are you using wsgi, nginx, gunicorn, etc.
 
wsgi I'm pretty sure
 
7:22 PM
Right, so (and correct me if I'm wrong, I haven't touched django since 2015), Django is designed to be thread safe, but it is a wsgi application, not server. You have to handle concurrent requests on whatever is serving your django application.
 
Apache / Nginx will be one layer above wsgi
 
wim
Impressive star monopoly Kevin
 
@chrisz So this WSGI thing, I read up on it and what I can gather is that it's an interface for some python web frameworks with servers like apache/nginx
so that means that django has the capability of being concurrent
 
@wim If it weren't for Andras's own version of star aggregator, one could easily say that the list could be suspiciously spoofed :-p
 
but it all depends on apache/nginx or whatever is behind the middleware for it to really be concurrent or not?
 
7:26 PM
@AshishNitinPatil the lizard people have meddled with both lists on the server side
plus Kevin and I are part of the same cabal
 
Less impressive of a monopoly, I expect, if you calculate total stars / total posts. It's easy to get a bulls eye if you fire a thousand darts simultaneously out of your comically oversized dart cannon.
 
Pretty much, there's not an option you toggle in Django to handle concurrent requests or magic like that, you just set up your uwsgi or whatever and Django rolls with it
 
@chrisz gotcha. Thanks so much :)
 
@Kevin For some reason I thought PM2Ring commented that and was going to shush him on revealing your secrets :-p
 
Hey if I could spend 0% of my time programming and 100% of my time deploying I'd be happy ;)
 
7:28 PM
@chrisz try devops jobs then
trust me, they aren't that easy
but definitely fun
@OneRaynyDay wsgi / gunicorn usually run multiple threads of the app in order to handle concurrency, IIRC
 
@AshishNitinPatil is gunicorn the home-baked solution for django when you first pip install it?
 
wim
is this over entire history of rm 6? or just last couple of years
 
100 pages is the limit I think
Need to check their code and the star page
 
@AshishNitinPatil no
 
wim
I can't see pastebin other wise I would answer my own question
 
Oh, so our 100 is just a happy coincidence?!
 
Let's see. The room has existed since at least 2010. The last star on chat.stackoverflow.com/rooms/info/6/python/… is from 2013.
 
yup, it was 99 when I started earlier today
 
sweet...
 
wim
@vaultah does just quitting make your username go back to anon, or you have to ask specifically for that?
 
7:33 PM
@wim automatic
it's not even a link in the transcript
 
wim
huh, I wonder why they do that.
 
because it's almost as if the user had never been there
on main even some posts get deleted... along with answers by others
@Kevin messages are a bit mingled in the starboard, the oldest starred message is chat.stackoverflow.com/transcript/6?m=9799725#9799725
still 2013, but it's June
 
Maybe there were no stars before 2013... Kevin, when did you join?! :-p
 
I know that the room's early history is muddled because there was a period where there were two Python rooms, and they got frozen and unfrozen and deleted and undeleted and merged... Easy enough to accidentally drop a couple tables while doing that.
@AshishNitinPatil 2011, apparently
 
no, it's just that the crony takeover happened in 2013, just ask wim
 
7:39 PM
@chrisz hey, sorry to bother but what's the rationale for the whole django-restful framework? I see serializers being a major selling point of it, and sure I understand that
what I don't understand is why can't we just run queries on the database and get back json?
 
@OneRaynyDay To provide restful APIs
 
like, that's already "serialized".
 
I think I joined after the room merging kerfluffle, so that doesn't account for the stars missing from 2011-2013.
 
@OneRaynyDay RESTful APIs don't just include GET on objects, they go way beyond that.
 
I am about to migrate a flask/angular project to django/angular, so I'm using the restful framework for that extensively
 
7:41 PM
There was an additional smaller kerfluffle when that one fellow said "I'll make my own Python room!" and he did so for a while. I don't think that caused any problems on the backend.
 
@AshishNitinPatil from what I learned in school RESTful apis is just "everything is an object", and state change is only given in some interfaces
 
That was around... 2014?
 
(obviously I didn't learn it properly)
 
You don't want angular interacting with a database
But you want angular to be able to access a database, thus, use a restful api
 
@chrisz I'm not familiar with angular, but I'm guessing it's some javascript framework on the client side
And if so, how can it possibly interact with a database?
 
7:42 PM
It's awful
It can't really
That's why you need a restful api
 
Project report: my Internet Connection Strength Indicator LEDs have been functioning correctly all day. Unfortunately, they are sitting in nearly direct sunlight so it's not obvious which ones are actually lit up.
 
But say you want some object Foo with its attributes in the db. You make a GET request and the server goes and queries for the database. Finds the items and gives it back to the user.
 
you should install a few LEDs to signal the activity of the LEDs
 
@OneRaynyDay Sure, but then you need to handle authentication too. DRF (rest framework) essentially is like Django, it takes away the pain of writing your own things every single time. You just have to have a config, then create serializers (like models), and you are almost good to go.
 
This didn't need restful api in anyway - I didn't even include django-restful as a plugin
 
7:45 PM
Authentication has to be handled with each request as well, not just what the request is for
 
I have a tiny electric motor in my box of fun things. Maybe I could rig up a little spinner dial, like the kind that comes with the game of Twister.
I have some nice high contrast markers at home, we could go full arts & crafts on this thing
 
@OneRaynyDay But who is allowed what object? What about Rate limitations?
 
@AshishNitinPatil I see... So you need some registration of the user for authentication
 
APIs are necessary for mobile applications. Web frontend can be rendered with Django itself, to an extent
 
This is usually done by cookies and session ids added in the header of the Http response right
 
7:46 PM
@Kevin "They've gone plaid!"
 
Plaid is reserved for 125% connectivity, which occurs only when the response arrives before I send the ping
 
@OneRaynyDay yes, but mobile apps don't have "cookies", so you need regular HTTP based auth.
a token, or the username password thing, but usually a token
 
@AshishNitinPatil ah yep, the API keys?
 
that too :-p
 
Not necessarily an API key
I usually go with json-web-tokens
 
wim
7:50 PM
@AndrasDeak italicize the RO's on the tally and prove me wrong ;)
 
But all my mobile development has been on iOS
 
wim
'crony takeover' good name for a band or something
 
'crony takeover' is the name of my _____ cover band
 
@chrisz I see... I might be going down the rabbit hole there so I'll step out for a second
But I understand somewhat now - so RESTful is mainly used to encompass models, users as objects, and their attributes?
 
RESTful is just stateless, standard convention. They are basically APIs, usually for non-server side consumers.
Mobile, frontend, other web services, etc.
My April 26 ends in 5 mins. Still waiting for Ubuntu 18.04 release. wiki.ubuntu.com/BionicBeaver/ReleaseNotes
 
7:57 PM
Are they focusing on Steam support in that release? Maybe it's on Valve time.
 
But Valve released Dota2 714 already a few hours back :-p
 
> Freezes normally happen at 2100 UTC
are you pre-UTC?
 
@AshishNitinPatil okay, got the memo. Thanks :)
really appreciate the discussion.
 
@WayneWerner am UTC+4
and thanks, didn't know 2100UTC was sacred
 
Then you're probably going to have to wait for April 27+4H ;)
 
8:01 PM
na, just 1 more hour :-p
 
Me either, until I clicked on "April 26" and started reading around
 
I think my eagerness made me blind
 
usually does
 
@wim I'd rather not indulge your paranoid delusions
 
There's probably a fable about that
 
8:02 PM
I just applied for my first IT job! It's a Computer Tech position in the school district where I work.
 
best of luck!
 
Break a leg :)
 
@toonarmycaptain gl!
 
@toonarmycaptain best of luck!
 
@AndrasDeak If they want me to sing and dance as well, I will!
ty all :)
 
8:05 PM
:D safety first
 
cbg
 
cbg
 
Turns out, Andras, that trying to replace that Modbus equipment (the non-exception exceptions) with Raspberry Pis is a gateway to a whole world of pain :/
 
aww :(
which part makes it painful?
 
8:11 PM
Well, the existing equipment literally just throws values up on a screen and it'll cost yuo £2K a pop to do just that
People have come to live with it
In production environments
 
I know, but that's why you want the pi instead, right?
so what's the pain?
 
Giving the opportunity to do "a little more"... well now my mini Django project is some kind of swamp monster
 
:D
scope creep ate it?
 
Oh for sure
Modbus is old. People who rely on it expect minimal features. Don't open the gate to that beast :P
 
just tell them the pi can't handle more, and it's solved
 
8:15 PM
I made a critical error in judgement myself, though, thrown into the mix
 
Today I get 4 upvotes for finding a typo in someone's code... I've never made so much questionable rep in just two days
 
xkcd.com/1985 for those data nerds out there
 
@Aran-Fey time to opt for deletion
 
of what? my account?
 
yup :D
unless you can live with all that dirty money reputation
 
8:17 PM
I let a browser display sending Ajax requests run the process. That has been a painful mistake but a good learning experience. The browser is stable in Ras Pi 3b but, for some reason, crashes a lot on Ras Pi 3B+, and that shuts down my modbus queries
 
I'll try to endure it :p
 
@roganjosh can't they order a few rpi3s for the fraction of that 2k?
 
Flask 1.0 has been released. 🎉 https://www.palletsprojects.com/blog/flask-1-0-released/
 
@Aran-Fey: ...did you answer something today? Your profile says you haven't answered anything in 3 days.
 
neat!
 
wim
8:21 PM
 
@user2357112 No, I just pointed out the typo in the comments and the guy went around upvoting my other answers
 
wim
@davidism not 1.0.0? (question: are you doing semver)
 
@AndrasDeak My mistake was thinking Chromium would behave the same way across B and B+ models. It seems not to be the case. It's not (I can't find why), but it's a bit of an embarrassing mistake for me too since the IT dept. was sure it would fail
 
@davidism YEEEEEEEEAH!
 
If (when) there's a bugfix release, it will be 1.0.1. We don't do .0.0. They're equivalent as far as pip is concerned.
 
8:25 PM
@davidism congratulations; you've put a lot of hard work in
 
wim
ah
 
Now to weigh up whether we should upgrade relatively soon before go live
 
wim
good to hear
and good to see dropped support for 2.6
 
I'll tweet about this more later, but you'll notice donate links everywhere now. We're officially a member of the PSF's sponsorship program.
 
Congratulations, Davidism
 
8:26 PM
@roganjosh :(
 
wim
got some bad news for you
you didn't do the release metadata correctly pypi.org/pypi/Flask/json
requires_python is not filled
 
Andras, my swamp monster only needs a 5th arm to keep going long enough that I can just start from scratch with a proper scope :) I'll throw a few more globals into the mix, weep a bit inside, and get the job done properly :)
 
wim
it means pip/python2.6 users will try to download and install sdist, and fail at install time if you're lucky - fail at runtime if you're unlucky
 
@wim hey, thanks for the feedback, really, but can I have like 1 day of just positives about it? :-)
 
at least there's a reason for a third decimal point now ;)
 
8:31 PM
1.0.0.epsilon?
 
wim
wasn't trying to be a dick, just thought you'd want to know before "bug" reports from n00bs on 2.6 come streaming in..
 
I know this is not the best timing but could you please unprofanitize that? :)
 
wim
I'm not sure if the new pypi.org allows you to edit a release after the fact (think it's immutable index now) but a 1.0.1 would shadow it for all practical purposes
@AndrasDeak hmm, too late sorry
 
Python 2.6 is still secretly supported for 1.0, we just decided not to say so.
 
secret support is best support
 
wim
8:39 PM
what does the "dotenv" extra do?
docker thing?
 
who on earth still uses python 2.6
 
dotenv is a cross-language convention that lets you set environment variables in a file
 
it's useful whenever you have some environment variables that are necessary but you're switching between shells/environments quite often. Docker might be an example of that but it's useful even without it
 
(Flask-agnostic) Coming from a naive standpoint, I'd assume that 1.0 suggests you're feature-complete from your initial goals? There's a number of big businesses using Flask (as an example) already, does this translate to increased support from them?
 
8:41 PM
It also certainly helps to have a "env defaults"
 
Is dotenv new in this release?
 
Yes, the CLI is way more powerful now, that's just one part.
 
I have to admit it's a little funny that the whole reason for using env variables in the first place is to avoid config files, so we all decided on a file format for it
 
wim
@KevinMGranger yes that's what had me scratching my head
never used this thing, seems like a good way to leak your secrets to crash-loggers and child processes
 
That's a fantastic change, definitely will make docker deployment easier. Congrats on the 1.0 release!
 
8:44 PM
in prod these will be passed in by the execution environment, in dev they'll just refer to local things
See, docker is arguably one of the times when you're less likely to use dotenv, in my experience
If you can't trust child processes to not read your env variables, then you need better isolation on them anyway
 
If there's anything I learned from Home Alone, it's "don't trust children"
 
I traditionally have a run_local script that sets env vars for local
 
wim
@davidism whoops. do you ask contributors to squash/rebase or do you just let github UI do it directly
 
@wim these are some weirdly specific questions
 
8:52 PM
^
 
@wim You can squash, that's fine.
 
I thought it was bad form to not commit over master when submitting a PR
@RobertGrant I presume he wants to submit a PR
 
I'd rather look at latest merged PRs for that.
 
@AndrasDeak The CV question is truly awful, but my interpretation is that they have 5 distinct lists and want to see if there's items in those lists that appear in other lists. I'm not sure the dupe is valid.
 
wim
@RobertGrant believe it or not, some projects are very opinionated about it
 
8:55 PM
@roganjosh in that case cv-pls as unclear
 
@AndrasDeak ... I have CVd but I inadvertently went too broad. I'd rather it be closed than change my reason. D'oh
 
agreed
 
now there are 3 different CV reasons (1 vote on each), great
 
9:10 PM
Well, it's not ideal, but I did link to the resources they should use before asking
 
jesus, the django-restful api reduces a little too much code; I don't even know where in their class mixins exhibits specific transactional behavior
 
wim
huh, did they just remove the 5 mins edit window?
answered 1 min ago edited 47 secs ago
 
No, comments break the grace period
perhaps even flags do, assuming you were flagged
 
wim
weird, is that a new "feature"?
 
@wim do you mean that it doesn't show the "edited xxx ago" when you edit within 5 mins of posting?
 
9:20 PM
@wim not even close
it's been like that since I've been an advanced user
 
wim
@Code-Apprentice yeah
wow, somehow I never noticed comments break that
 
I never noticed that, but I've noticed that a comment often triggers the edit notice
 
wim
why they bother with implementing these crazy obscure features but won't implement basic and useful features (such as searching your deleted posts) is beyond me
 
I think that's on purpose, wanting to prevent a lot of meta posts complaining
just like an opt-in "notify me of negative rep changes too" feature; it always gets shot down because "it would cause too much drama only to satisfy the curiosity of a few people"
it's silly but that's how it is
 
9:37 PM
I like how the top comment on the HN post for 1.0 is "here are these other projects that are better." Thanks, random HN user, that's great to hear. :-|
 
wim
jerk move
 
I try not to listen to most of the sorry souls on The Cursed Orange Siteâ„¢
 
wim
> some design choices which look like afterthought hacks
^ that is pretty much the opposite of the truth
he obs doesn't know the history because the crazy hacks were intentional design choices in denied
 
"The real value of Flask is that it makes you appreciate what Django does by default." What are these people even talking about at this point
I have never seen hacker news before, and I hope I never see it again
 
HN is trash, the only reason I was looking was because it directly involved me. Which on second thought was probably a worse reason than normal to read HN.
 
9:45 PM
@davidism in my pathetic attempt to pretend I'm a full-stack developer recently, the only thing that has made any sense to me is Flask. Whether you want to unleash people like me on to the net is one thing, but the framework you maintain is truly awesome in its simplicity to enable this kind of thing. I'm sincerely grateful for it.
7
 
The comment is immediately followed by a comment praising it for helping them avoid "django bloat", so the opinions are at least diverse
 
9:58 PM
I have a bs4 problem. I am trying to parse this text but I only want the message. data = BeautifulSoup(content, 'html.parser'); print(data.li.text) returns the whole lot.
 
wim
are you trying to write the third starboard scraper
 
I better get started on the fourth
 
Yep :) @wim
 
I just realized the starboard is on the right side. The starboard is starboard.
 
@Simon data.li.contents[2].strip() seems to do it
 
10:05 PM
I found a "secret" link so I'm ahead of you @KevinMGranger :p
@Aran-Fey Yep you're right it works. Just got that - on the final line. :)
 
Hi, guys how can I do something similar to this:
 
def current_starlord():
    return "Kevin"
 
if ("Up" && "Running") in var_status:
 
@Damon no, that's a syntax error
and no, you need to check both separately even if you fix the syntax
 
if "Up" in var_status and "Running" in var_status:
 
10:10 PM
oh ok, so I can't do it in one line
 
sure you can
 
ohhh .. let me try
 
and you could do if {"Up", "Running"} < set(var_status) but don't
 
you stop that
 
if all(thing in var_status for thing in things_that_need_to_be_in_var_status):, if you have a lot of things that need to be in there.
 
10:11 PM
:D
 
@AndrasDeak not if var_status is a string
 
@Aran-Fey why?
 
Its a string
 
oh, you mean semantically
 
that will just make a set of characters, no?
 
10:11 PM
yeah, I had lists in mind
another reason not to do that
 
Worked like charm .. thanks guys!!!
 
More taste questions, since I never tire of them:
def to_json_file(self, path=None):
    if path is None:
        path = join(self.base_name, '.json')
== or ==
def to_json_file(self, path=join(self.base_name, '.json')):
    # the base name *should* never change, so from a practical pov this is ok
 
err wait
 
mutable default args aren't an antipattern, only a danger
 
It's a string, it's not mutable anyway, right?
 
10:24 PM
if you're sure you can't shoot yourself in the foot I think that's better, as it only creates that path once
join is not a builtin
 
but doesn't that require self to be available at class definition time, which it isn't?
 
@KevinMGranger oh, good point
 
The first one is perfectly fine
 
Yeah, that ocurred to me just now as well
 
I prefer to set optional parameters to None because it avoids having to define the default value in multiple places (like in a child class that overrides the method)
 
10:28 PM
@Aran-Fey even for simple defaults, like reverse=False?
 
In any scenario where it's not obvious what the default value is. Numbers and booleans are usually fine, but it depends on the context
 
ok cool, I'll rethink some of the defaulting I do.
 
rbrb
 
10:48 PM
rbrb
 
@wim hold on, fridge moment: you can search your deleted posts above 10k stackoverflow.com/search?q=user%3Ame+deleted%3Ayes
 
11:15 PM
If you're under 10k I guess it just shows all your posts?
stackoverflow.com/questions/50053174/… no effort, just linked 4 images of code.
 
django is making me sad.
Well, not django - django rest framework
what's a boy gotta do to get some batch inserts in when many=True and a single insert when many=False man
 
@chrisz please read the cv-pls rules: don't link questions newer than 10 minutes unless they're a hopeless exception
 
11:48 PM
@miradulo not even kidding I thought it was called an iter. I'm too tired right now
 
00:00 - 19:0019:00 - 00:00

« first day (2749 days earlier)      last day (2197 days later) »