« first day (3132 days earlier)      last day (1833 days later) » 

2:08 PM
Haha yeah :D I just realized that my files are anyways only 1kb so my 4kb recv is basically the second version^^
and the transfer speed is 0.3kb per minute :( This is so sad. Not sure how much the remote desktop connection I had open or the vpn encryption matters, but it's soooo slow
 
user7437554
2:44 PM
items = [1, 2, 3, 4, 5]
squared = list(map(lambda x: x**2, items))
 
user7437554
Is list() needed there? I've took it from a tutorial and am a bit confused
 
@santimirandarp it would be a generator without list() in python 3
 
user7437554
and in python 2? @AnttiHaapala
 
@Hakaishin google tells me that just because you send the data in one big chunk, doesn't mean that you'll receive the data in one big chunk. It might arrive over the course of several packets, requiring several recv calls. So you're going to have to track how many bytes have been received whether or not you're manually chopping your data before calling send().
In other words, I think it's OK to send() your data all at once, and I think it's OK to call recv with a huge size argument. But the library might say "I don't have 10,000 bytes for you, I've only got 1024, so I guess I'll just give you that", so you've got to write your code with that scenario in mind
@santimirandarp In Python 2 it returns a regular list.
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.
>>> map(lambda x: x**2, range(10))
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
>>> ^Z


C:\Users\Kevin\Desktop>py -3
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> map(lambda x: x**2, range(10))
"Is list() needed there?" is a complicated question because we don't know what the purpose of squared is and how it's going to be used after it's created. If all you want to do is display the elements of the sequence, then you'll need a list() call (in Python 3.x). On the other hand, you don't need a list() call if you only want to iterate over the elements of squared, either explicitly (e.g. as the target of a for loop or list comp) or implicitly (e.g. passing it to another map call)
>>> squared = map(lambda x: x**2, range(10))
>>> for item in squared:
...     print(item)
...
0
1
4
9
16
25
36
49
64
81
No list call required here
This is all a long winded way of saying "convert to list if you need behavior that Sequences have and Iterables don't have; keep it as a generator otherwise"
 
user7437554
3:13 PM
I don't follow the last sentence @Kevin
 
user7437554
what do you mean by sequences have an iterables don't have?
 
@Kevin I do that. But it still leaves open, what will be moee efficient, chopping up urself or one big send that gets chopped up by some underlying layers?
 
user7437554
lists are both isnt it?
 
I dont think so
 
A list is both an iterable and a sequence. A generator is only an iterable; it is not a sequence
 
user7437554
3:15 PM
:P
 
@Hakaishin I'm inclined to say that one big send is more efficient. But I don't think the difference is very large, especially since it sounds like the runtime of your program is dominated by your network bandwidth.
@santimirandarp To give a concrete example, you can index a sequence, but you can't index a non-sequence iterable. my_list[10] works. my_generator[10] does not. So if you need indexing, use a list and not a generator.
You can call len() on a sequence; you can call reversed() on a sequence; sequences have the methods count and index. If your object is not a sequence, it probably does not have these things.
 
user7437554
3:31 PM
So sequence means that the items are indexed @Kevin?
 
Short answer: yes. Long answer: consult the glossary entry docs.python.org/3/glossary.html#term-sequence
 
user7437554
Yes but is a start, if it fails I consult the glossary
 
There is some nitty-gritty in there that makes it more clear why a dictionary isn't a sequence even though it supports len and indexing
(TLDR: because we said so)
 
user7437554
oh what a mess
 
user7437554
too many things to remember
 
3:35 PM
You don't necessarily need to memorize which built-in types implement which abstract base classes. It's easy enough to look up or test emprically.
"Hmm, can I reverse a generator? reversed(my_generator) just crashed with TypeError: 'generator' object is not reversible, so I guess not"
 
user7437554
yes...
 
One of the benefits that programming has over other crafts is that failure is very very cheap. Building a hundred terrible birdhouses is havoc on your wallet, but writing a hundred terrible programs costs you 0.00$.
 
user7437554
haha, that's right...just lose time, in both
 
3:54 PM
On the other hand nobody complains if your birdhouse has a squirrel injection vulnerability
 
NotImplementedError: categoricals are not support in cython ops ATM. Definitely the worst part of my day. Was wondering why something that took a few minutes wasn't finished several hours later
 
4:22 PM
morning cabbage
 
someone just downvoted 10 of my top answers in a span of a minute of so
what should I do lol
 
Nothing
SO bots will catch it and reverse it
Give it a day
 
SO bots are intelligent enough to revert such an action
 
yes
 
and whoever did that, will they be suspended or banned?
I think I know who the person was too lol
 
4:29 PM
warned at least
 
cool, I flagged a downvoted answer and reported to a moderator
I will wait for a day :)
 
cbg
 
I guess people just hold grudges very easily :/
 
Haha, first time I have seen this 10 downvotes in 3 minutes lol
Not sure who I pissed off
 
4:46 PM
maybe someone tried to apply one of your solutions to their problem, where it didn't fully apply, got frustrated and went on a rampage
 
that's why the comment section is there, maybe a new user since he could only downvote 10 posts
anyways, hopefully the bots pick it up and revert those!
 
Well they must have had 125 rep to downvote (and in this case 135 I guess). Maybe that's why they stopped, ran out of rep
 
A lot of the hurt feelings I see on SO I chalk up to two things:
- online text-only mediums make it harder to convey tone compared to mediums where body language and voice are present
- tech communities have a higher-than-average concentration of neuro-atypical users, which can impede this even further
 
Generators scare me :(
 
Right, I avoid downvoting as much as possible, since it hurts my rep and also shooes away new users from this medium
 
4:52 PM
For example, I might or might not be on the spectrum, so I miss subtle cues that indicate whether someone's being nice to me; and one of my default modes of communication is "brusque infodump".
 
the downvote is fasted when an answer is posted on a duplicate question, all answers there are downvoted lol
 
fwiw, appreciate the "info" dumps kevin, keep em comin :P
@biggi_ just close your ears, yell "na na na na" and treat them as one-use iterators. If you need to reuse them, then do one better and convert to list :P
 
Brusque infodumps are excellent ways to convey dense information in a small space but they're not great for reassuring the reader that everyone makes mistakes and it's all going to be OK etc etc
 
Some python purist might die inside, but hey, 90% of the time it works 100% of the time! ;)
 
@ParitoshSingh WARNING: Do not read out of context.
 
4:54 PM
My first "real" python thing was this Lidar that used a generator. Most of my other programming knowledge is .net/embedded.
 
@piRSquared oh gosh haha
 
what's a "brusque infodump".
 
objective technical information presented without regard for social niceties
 
I basically never downvote an answer. I think in most cases issues can be addressed by comments, which lead the answerer to either delete or address the issue. For questions I downvote a lot more, but again my threshold is pretty high and I typically avoid instantly downvoting. It tends to cause an avalanche and too many questions end up -3 that get edited within a few minutes and then look perfectly fine.
And anyone going through the review queue isn't going to go back and reverse their vote after an edit
 
aah understood, btw @ParitoshSingh I actually put both in a for loop and iterate
 
4:57 PM
I downvote when I think the answer can actually cause harm
 
I've downvoted answers in the electronics SO because people are just flat out wrong sometimes and will not correct even after comments.
 
yes, I did downvote that dataframe.name = 'something' answer we stumbled upon the other day, because I did not agree with it, and the problems it would inevitably cause
 
some people downvote and then comment so that the answerers check and react on the post lol
 
"comment, then wait X amount of time for a reply, then downvote if the answerer has taken no action" is my typical downvote strategy for answers
 
that's not nice haha, but for each his own
you can always revert the downvote once the poster answers :)
 
5:00 PM
"X amount of time" is long enough for me to be certain that the poster is completely uninterested in ever replying
 
yes btw you are quite prolific in python 3.5k+ score is pretty awesome @Kevin
 
I try.
 
That's humble :) May I ask you something, whatever Python I have learned so far is by actual coding
and learning concepts through them, not really gone through a formal tutorial or a course, just on the job
should I sit back and actually go through some of them, maybe docs.python.org/3/tutorial/index.html to further strengthen my knowldege
 
Devish: I'm the same way, All I learned in school was embedded/matlab/some c# winforms
 
well I used java for 3 years, and now using python for the last 2
I have actually forgotten Java quite a bit now lol
 
5:07 PM
nope, and im sure you already know it. you're good to go. Just, keep learning as things come your way. read up on docs whenever you need to look something up.
(granted you didnt ask me... i.. uh.. goes back to hiding)
 
I already know what @ParitoshSingh I didn't get you. Yes I still look up docs time to time to refer them back to my answer, and when someone points out a basic flaw in my answer :)
 
Tutorials can be an effective way to fill in the gaps in your understanding. Especially for self-taught programmers, there may be areas of the language that you've overlooked, and a good way to discover what you're missing is resources that give broad overviews of whatever topic.
 
you already know you wont need to go through the full tutorial or a formal course :P You wont really gain all that much now, the little bits that will be interesting can be tough to spot in an info dump where you already know most of the things
oh yeah thats true though, overviews or roadmaps can help as checklists
 
Thanks for the advice @ParitoshSingh and @Kevin , Looks like a good idea. I will now patiently wait for all those downvotes to get reverted :)
And perhaps spend less time on SO
 
I don't think that you have to trawl through a tutorial line-by-line, following along with every exercise... If you already know how lists work, writing for i in range(10): seq.append("blah") isn't going to improve your skills much. You might be able to find some gems just by skimming over the chapter titles. "Decorators? What's this @ syntax? I've got to see this!"
 
5:12 PM
eh, dont worry about the rep really. i mean, you can if you want to, but in the grand scheme of things, its a bean counter on a server :P
 
I know, haha you are right lol @ParitoshSingh but things like these can discourage newer SO users and must be dealt with
I have started using it for maybe 2 months lol
 
you're also spewing out answers on whatever you can find so it's understandable if you step on some toes along the way
 
spewing out as in, is it directed to the general tendency of answering anything one knows about?
 
@DSM You here?
hmm...didn't autocomplete
 
5:19 PM
@Code-Apprentice I don't think so.
 
the leather related use of the word spew is new to me, TIL
The spew on these boots is terrible, ha! Everyone would think someone puked on my boots :)
 
i wouldnt encourage you to .. yeah.. that
 
wim
Excellent C code — stark Oct 15 '16 at 13:42
 
@AndrasDeak understandable, maybe I need to start selectively answering lol !
 
wim
5:25 PM
@U9-Forward you should refrain from answering old (2012) questions unless you have something significantly better than existing answers to show
 
@smci Name change? I'm a new user!
;)
 
some answers are also to earn badges some badges say edit an old answer get upvotes, and get a badge lol
 
@DeveshKumarSingh and some people commit crimes to get money
 
wim
don't take the badges too seriously
if you edit some old answer to try and get a badge rather than because it really needed an edit, then you're doing SO wrong
 
@wim unless it's for hats... then take it super seriously
 
5:28 PM
the same goes for rep farming, really
 
I know, and I don't do that, but I have seen some of the badges stating the fact, which might lead to people commenting on old answers
 
wim
@piRSquared ugh, yes. all actions taken for hats should go away when the hats go away
 
@piRSquared I forgot that he's not been in chat for a while. I got a ping from him on one of my comments on the main site, so was hoping to catch him here.
 
a SO hat? now how do we get that
 
Hats are available during the Winter Bash, in December
 
5:30 PM
ugh
 
@DeveshKumarSingh it's an obnoxious event that occurs annually around the year end/beginning
 
@Code-Apprentice i think you could open a chatroom with them on SO if you really wanted to, via their chat profile
 
@piRSquared "he preaches water and drinks wine" :P
 
Hah! (-:
 
let the children have their fun
 
5:32 PM
playgrounds have fences for a reason
 
@ParitoshSingh good point. It's not important enough to bother him that much, though.
 
to keep predators out?
 
To keep snotty nosed brats in
 
F
 
Adults can walk in anyway. The fences are there to keep the kids in.
 
5:36 PM
If I had a nickel for every time I yelled at my younger son to not run into the parking lot from the playground... I'd be depressed because the mountain of nickels would be a glaring reminder of how much he doesn't listen /sigh
 
now, take off a nickel for everytime you yourself didn't listen in your childhood
though that sometimes skips a generation, or goes to a sibling. but hey, im taking a chance here :P
 
Hey! Whose side are you on? (-:
 
We never climbed the fences of our school, as behind it lived a ghost who wanted to eat our right hand!
 
yours, reducing that mountain of nickels to ease depression :P
 
wim
perhaps you could use the nickels to build something, like a fence or an odeon
 
5:46 PM
@Code-Apprentice Show me a fence that's successful at this ;)
If I had a nickel for everytime I climbed said fences... ;)
 
@Kevin Oh man, MinGW was a hot tip! I wish I hadn't mucked about with Visual Studio
 
I did things when I was kid that I'd 💩 myself if I saw my kids doing the same. Most of those things involve skateboards and swings.
 
I hope I've improved your C++ experience :-)
 
well there you go, its in your kid's blood :P
 
^ This fact explains a good portion of my parenting that my wife doesn't fully appreciate.
 
5:49 PM
Unfortunately my C++ experience has turned into a C experience (I did need that redistributable thingy after all...), but you certainly did improve it
 
And, indeed, my parents' parenting of me.
 
Wow, so many fathers here.
 
My boy ask me when he could start skateboarding and I dodged the question by telling him I started when I was 10. He's 6, the other is 5
 
wim
man, JFF makes some really weird decisions
he edited @AnttiHaapala's comment into the answer and deleted comment (why?!)
 
i think ive heard something along the lines of: comments arent supposed to be permanent
somewhere in some context anyways
 
5:52 PM
The phrase you're looking for is "comments are ephemeral"
 
wim
right but that doesn't mean they should be turned into a useless edit
 
that part i agree with.
 
wim
anyway, after user2357112 recent cleanup can start to use this Q as canon. It will be nice to get this answer deleted (came 10 mins after top one and doesn't do anything new/useful)
 
if i had to contrast with edits by say, Aran that ive seen to older posts, this edit just says "this is the answer. oh, this is not a good answer anymore". A better version would be to either fix the post with an update. (or heck, if the better version already exists, i'd say shouldnt outdated answers be pruned?)
 
@piRSquared I'm pretty sure my answer is going to involve "when you stop complaining to me after tripping and falling in the yard."
 
wim
5:55 PM
yes I'd actually pinged him asking to delete it but he did that instead, bizarre
 
jw, does pruning an old answer remove rep for the person who wrote it at the time?
 
wim
I think so. And it should.
 
Thinking about it just now. As a comment, it is not accessible by the community to edit over time. If the comment itself becomes outdated, it is stuck while the answer can be edited by anyone and has an audit trail. It is better to have that information in the main post with all the accountability that comes with it. @wim
 
i dont think it should.
 
wim
Well, it didn't add any value even then.
 
5:57 PM
@ParitoshSingh rep sticks after 60 days on posts with +3 score or more
 
@AndrasDeak oh, that's good to know, ty.
 
wim
@AndrasDeak TIL
 
"Comments are ephemeral" is one of those guidelines that we ought to follow, but which 99% of the community quietly ignores
 
@Kevin scanner is working great now. Now time to get a best fit line of some of the data out of that text file...yay!
 
Find any answer from a decade ago and you'll find comments from a decade ago. So much for ephemeral
 
5:58 PM
there's a quiet division between what's new and in the realm of new rules, and wild unruly old questions lying around.
 
is there a way to launch a python script multiple times (each with different parameters) - basically to run simultaneous jobs at once
 
wim
my theory about how useless late answers on popular questions get disproportionally upvoted: there is a badge about voting X number of times in a day. n00bs are trolling popular questions and just upvoting everything trying to get the badge.
 
Apr 23 '17 at 14:32, by Andras Deak
some people will upvote anything
 
your theory is definitely right, if not the entire picture.
 
@biggi_ That's good to hear. Best of luck finding your best fit line :-)
 
6:00 PM
Is that going to be "fun"?
 
@AndrasDeak i swear, the way you find older posts sometimes feels like youve got a stash of bookmarks just stored, waiting to be used :P
 
wim
memcached
 
@ParitoshSingh That's part of it, but even questions that were asked after the "comments are ephemeral" dictate still have lingering comments
 
i blame the word "ephemeral"
scoffs in disdain
 
@biggi_ I've dabbled with statistical computing languages and line fitting wasn't too painful of an experience.
 
6:02 PM
Sounds good, I'm going to pull like 170-190 degrees and then find the best fit line between those distances after converting to x,y
 
Maybe it gets harder the more sophisticated you want the algorithm to be. I only needed to know "least squares" to pass the course.
 
I just want a best fit line y=mx+b on my dataset
 
The Peer Pressure badge always seemed off to me. Disciplined makes sense, but I can imagine someone just thinking, "I should just write garbage, quickly get 3 downvotes and then delete"
Like you're getting rewarded twice for writing a bad answer. Once for increasing your rep for your now deleted bad answer, and again with a badge. At least with disciplined you lose rep, but gain a badge.
 
@ALollz it's consolation prize for having written a crap answer, and the community benefits from the crap being removed
 
the upside is that atleast it doesn't leave things worse off than before
 
6:26 PM
@burnash can you help me here stackoverflow.com/questions/56134112/…
Guys anybody guide me for this problm im facing stackoverflow.com/questions/56134112/…
 
please read the room rules, link top right hand side
> If your question is eligible for a bounty (>= 48 hours old) and hasn't received a useful response, then you may link to it.
 
wim
any SEDE query to show which post you earned peer pressure / disciplined badge for?
 
@ParitoshSingh my question is not eligible for any bounty, i'm facing issue of that and there are no good documentation of gspread
 
@Chethi why would you even ask the same thing twice?
also why are you trying to ping burnash here and on your question, none of this looks reasonable
 
@AndrasDeak that was by mistake
 
6:33 PM
in two places?
 
wim
6:45 PM
sad, the canon for dict comprehensions uses spurious genexs 3 times stackoverflow.com/a/1747827/674039
i.e. don't suggest people to write `dict((key, value) for (key, value) in zip(key_list, value_list))` when they can just
`dict(zip(keys, values))`
 
looks like a fair game for edit
do you wanna edit it?
 
Hello guys, I have a question, when building a setup.py (with non-standard library packages e.g ntlk) which syntax is better?
`install_requires = [ 'nltk == 3.4']` or `install_requires = [ 'nltk >= 3.4']`
 
I prefer >= if I have no reason to believe that I'm dependent on a feature that will get removed in future versions
I have a couple video games from the 90s that refuse to run because I don't have QuickTime 2.0. I guess Quicktime 7.7.9 isn't good enough. These games effectively have a Quicktime == 2.0 requirement, and as a result have annoyed the user
 
@Kevin Hello there. I was thinking more of future versions altering the past functionality of modules/libs. Can we be sure something non-standard-library won't break in a future version (pythonic paradigm or PEP or whatever)?
 
can we be sure? nope, never.
 
6:58 PM
No, but at the same time we can't be sure that the non-standard-library will continue to make old versions available for download. So a sufficiently bad project manager can ruin your day either way.
 
having said that, a lot of libraries tend to keep their basic apis intact once they've established themselves. too many people with too many things to break
 
wim
@ParitoshSingh yeah, fair game. almost completely rewrote. :-\
 
much cleaner ^^
 

« first day (3132 days earlier)      last day (1833 days later) »