« first day (2463 days earlier)      last day (2475 days later) » 

7:00 PM
@d-coder That's right.
 
When it mentions "loaded" in the end author is referring to RAM ?
 
A Python file is compiled to bytecode before it's run, so if it's already bytecode, that step is (obviously) skipped.
 
They're referring to the process of loading, whatever that entails. It probably includes putting something in memory.
 
Sorry if my question sounds really stupid
 
Loaded into the python vm. If both the .py and .pyc files are already cached in RAM, the .pyc will still load faster
 
7:02 PM
PVM resides in RAM ?
 
If by PVM you mean python vm, yes, all running programs on a computer reside in ram. These are all details you shouldn't have to worry about, though
 
Sorry for getting more stupid here but I'm just curious and new to this
 
@d-coder Your questions don't sound stupid.
 
@PM2Ring : Thank you!
 
@d-coder When the OS reads a file off the HD it keeps it in RAM, if it can, just in case it needs to read it again. That way, the second read is really fast. That's what Kevin M was talking about when he said "if both the .py and .pyc files are already cached in RAM"
 
7:05 PM
So all .pyc files are loaded into RAM irrespective of they have been used when the interpreter wants it or not ?
 
@d-coder No.
 
Just remember-- if you're trying to learn python, this isn't stuff you have to keep in mind while writing it.
 
The file caching Kevin M & I are talking about is a general thing that all modern OSes do for all files, it's not just a Python thing.
 
My understanding so far is that when interpreter compiles the modules then it generates .pyc files.
 
Of course, RAM is a finite resource, so the OS can't cache everything in RAM. So old files in RAM that haven't been read recently can get dumped to make way for new ones.
 
7:09 PM
I can actually see those files in directory which is kind of cool. I tried opening it using some editor but it was all gibberish stuff as expected
RAM also has something like LRU/FIFO what cache follows ?
 
Yep, it's all bytecode. If you want to see the equivalent readable form of that bytecode, you can put a python statement into dis
 
dis actually disects into LOAD COMPARE etc.. It's really cool.
 
Kevin'd
 
I want to learn programming and get into Google ( or alike companies ) but can't afford to join MIT for that. So I copied all the syllabus of their UG course for computer science and will start learning on my own.
First class was Introduction to Programming in Python
Then I started learning Python 3.6.x
 
that's a good version to start learning Python with :)
 
7:13 PM
then I read that sentence which made me wonder what it means.
 
@d-coder Sort of. It generates the bytecode, but it doesn't necessarily create a .pyc file. However, when you import a module then a .pyc file will be created for that module, if necessary. But I think the exact details of that changed from Python 2 to Python 3.
 
Do you guys know any references for the same ?
 
Learning Python 2 now as a precursor to learning Python 3 makes about as much sense as learning Shakespearean English as a precursor to learning modern English.
12
 
@PM2Ring : OMG! .pyc files are generated on demand
 
Exactly
 
7:15 PM
So .py file can also be executed st away ?
 
@d-coder Note that's all just an implementation detail, though
Python is a language spec, CPython is just the reference implementation :)
.py files are actually never executed
 
@d-coder Only because they get compiled to bytecode first. :)
 
because ^
then the byte code is executed
 
@WayneWerner : I want to be ready for any kind of question during my interview when it comes to that.
Thanks for adding info on that.
 
Most of them will probably be about algorithms and data structures
learn to whiteboard program. There are loads of great resources out there online
 
7:18 PM
So Jython, IronPython has different syntax ?
 
but you'll seriously need to be able to do those things if you expect to get into Google et. al
 
I hope not
 
as comapred to Cython ?
@Way
 
@d-coder nope, same syntax, different underlying implementation
 
the point of the python language vs implementation details is that the language is the same, but what happens underneath is different
 
7:18 PM
Cython definitely has different syntax. But Cython is not CPython.
 
for instance, on CPython the underlying implementation was written in C with a GIL
 
@WayneWerner : Hey I'm quick learner!
I was also reading about that GIL but people have not seen any perf improvement to perform a gilectomy
:P
 
this is another subject which shouldn't affect you in any way as a novice programmer
 
Seriously? eval and 'unicode_escape'??? — PM 2Ring 15 secs ago
 
@d-coder You should check out Larry Hastings talk from this last PyCon about the status of the GILectomy
 
7:21 PM
when python is already a doubly linked list why do they still ask to implement it ?
 
python is an interpreter, not a doubly linked list ;)
 
I'm so sorry! Python list implementation
 
And its lists aren't doubly-linked either. You're thinking of a node structure.
 
They're going to ask you about algorithms and data structures because they're important concepts
 
shame they still force whiteboards though
 
7:22 PM
Admittedly, there's not much use in a doubly linked list given the Python standard library.
 
it doesn't matter what language you're using, you still need to be able to grasp the concepts
 
>>> x = [1,2,3]
>>> x[2]
3
>>> x[2].prev
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'int' object has no attribute 'prev'
 
it boggles my mind that they don't let you actually code at a computer
 
I use PyCharm I love it!
No whiteboard practice till now.
 
shrugs sometimes there's something to be said for being a computer yourself
 
7:23 PM
ain't nobody got time for that
 
Do any of the stdlib datastructures use a doubly-linked list? I guess collections.deque probably does...
 
would guess deque, yeah
 
if you can't go line by line/char by char and actually grok what the code is doing there will be times in your career where you will be making terrible mistakes that other people have to clean up
 
Python list are doubly linked list ? A positional ADT ?
@WayneWerner : I agree!
 
@WayneWerner A lot of that can be done at a computer too, though -- I feel like the whiteboard introduces a whole slew of other variables that get in the way. It'd be like trying to find a good... idk, archer or something, but they have to throw the arrow instead, and you're going to be launching water balloons at their face the whole time
 
7:24 PM
9
A: Why Python doesn't have a native Linked List implementation?

Russell DavisPython has collections.deque which is a native doubly-linked list.

 
Where can I find such internal stuff ?
 
Either that's right or wrong, but 9 upvotes agree :D
 
@WayneWerner What he said. Walking through code on a whiteboard / paper is a valuable skill. I can mostly do it in my head, but sometimes I still need to do it the old-fashioned way when I'm trying to understand a tricky algorithm.
 
@Marcus I just did a phone interview yesterday that was half generic brain teasers.
 
@WayneWerner :punches air:
 
7:25 PM
Something that, I hope, has nothing to do with the devops role I applied for.
 
@MorganThrapp those are just silly
 
@WayneWerner Yeah, tell me about it.
 
There's some argument for helping see how you think...
 
Thankfully I completely flubbed them, but they still want to schedule a practical programming interview next week.
 
Aren't those questions supposed to be a secret ? Like you sign up the NDA and stuff ?
 
7:26 PM
if a company makes you sign an NDA to interview with them that's a bad sign
not always
 
If you want to see how someone thinks, why not give them a more appropriate problem relevant to the position either way?
 
@d-coder No. A standard Python list, the thing you get from list() or [1,2,3], uses a simple array to hold the references (pointers) to its items.
 
I mean if you're working for a game company or something then yeah probably an NDA would be fine
 
e.g. bringing up a past project you worked on, asking how they would have implemented such-and-such or what considerations come to mind
 
but most things are actually hard to do
 
7:27 PM
simple array ? NOOOOOOO!
I checked in and out printing id(list_name)
 
even if someone gave you the most genius idea, you probably don't have any clue how you'd capitalize on it
 
address were totally different ?
I checked the size of list to see when it grows actually.. when it uses the spaces.. expands the list..
I'll look into again then let you know @PM2Ring
 
it's open source
 
@WayneWerner
Thank you!
I actually tried measuring the size of the list.. to see when it grows.. printed out the id(list_name[0]) and then id(list_name[1])
Difference was not making any sense.
Difference bet address locations I mean
 
@d-coder Can you read C? If so, you should take a look at the listobject.c source code.
 
7:33 PM
Thank you all. You all made me realize that I've so much to learn.
 
@d-coder The list object has some extra stuff, but where it stores the pointers to its items is just a standard C array, which it re-allocates when it needs to change its size.
 
@PM2Ring : I do know C. Good enough to make sense out of it if not committing to Linux kernel Open source!
@PM2Ring Thank you :D
 
I keep seeing few user names quite often like @PM2Ring @poke @davidism @MartijnPieters
@Alex martelli
 
Please don't ping everyone like that.
 
7:36 PM
Your names are there in so many answers
Sorry.
No.
Just hit with reality
 
It's nice to be appreciated. But I don't think I'll ever catch up to Martijn. :D
FWIW,I've only been on SO for a few years, but I've been coding for decades.
 
It's impossible to catch up with the likes of Martijn and Jon Skeet now
I mean, unless you literally deleted all of their old answers or froze them from voting or something
 
hmmmmmmm...... :P
 
new life goal: become a SO mod an surreptitiously lock all of Martijn and Jon's old answer/questions so I can catch up with them on rep :D
 
suddenly, some people re-thought running for Mod
Kevin'd!
 
7:43 PM
wonder how long it'll take for jon to hit 1mil
 
I heard he was on track to hit that this year? At least I think that's what @davidism or Aaron said at Pycon
 
Did the comment flag options just change?
 
Something is missing
 
They squashed everything into "no longer needed".
Maybe the different categories weren't helping mods evaluate the flags any faster.
 
ooooh that's amazing!
there was a bunch of controversy on meta
 
7:49 PM
I actually like this change
 
typical case: something flagged as non-constructive, flag declined but comment deleted because it was "too chatty" :|
IIRC Aaron had some meta posts complaining about mislabelled comment flags
this is great!
what matters is that needles stuff gets removed
 
needless stuff, too!
 
:P
hmm...the flag descriptions don't fit into the flag window for me. But I'm too lazy to take a screenshot and post a bug report :P
 
@Thundzz nice catch on the query syntax
I can never remember which db drivers use which placeholder.
That op is unusually clueless though. Finally just told them to go read the help center.
 
Today I wake up being pinged and confused for Alex Martelli.
 
7:58 PM
lol, access log is so quiet now after locking things down
 
But seriously, thanks Davidism for telling people not to ping people randomly. I got the ping notification.
 
The dangers of having a non-unique prefix.
 
It was me and I'm truly sorry for the pings!
 
The fact that you didn't continue to do it after being asked not to already puts you above many other newcomers to the room :)
 
:D My high school graduation was a mess for that reason. 100 Alexs and 1000 students. My parents weren't sure when I was actually graduating.
 
8:00 PM
I would say sorry personally but for which again I've to ping you ( which I really don't want to )
 
And exactly, cbg.
No worries, stuff happens. Owning up to it is a sign of maturity.
 
Cbg
 
cbg
 
cbg @BhargavRao
how goes it?
 
Doing great, thanks. Wbu?
 
8:04 PM
well, just trying to write a query to fix some data
 
Best of luck!
 
8:15 PM
@PM2Ring Right out of “Things, that are definitely not on my to do list”
 
8:27 PM
\o cbg BR
 
9:09 PM
@davidism Yup, thank you very much for the help and the editing :)
 
9:23 PM
anyone know how to message a user who is outside of chat by their usernumber/username?
 
you can't
leave them a comment on main
 
i see. they had only posted one question which they deleted. their username is very common. would the message still direct to them?
 
No, you need to leave it on their post. Otherwise you can only ping them on main where they've left a comment themselves.
you can try inviting them to a chatroom via their chat profile, but I'm not sure if non-chat-users get a notification about that
 
i see, right. they had only recently joined/have 1 rep point, which I think prevents them from even joining chat.
when you say "main" are you referring to the main SO webpage Q/A webpage interface?
i.e. not chat or other SO platforms
 
9:42 PM
@downshift If they've only posted one question which is now deleted then there's no way for normal SO members to communicate with them. Members with 10k+ rep can see deleted posts, but those posts are locked to new comments.
 
@PM2Ring, thank you for your explanation. understood
 
No worries. It can be a bit frustrating when a new member posts a bad question and you want to post a comment to tell help them fix their question, but they delete the question before you get a chance to post your comment.
 
Sorry, I was away for a bit. But what PM 2Ring said.
 
10:05 PM
It was actually a question from yesterday that I just found interesting and wanted to do some research and work on it, but came in to work first thing this morning and found it deleted and just wanted to inquire with the poster. not a big deal though
i'll learn to let things like that go, thanks for the info. good to know for future
 
@downshift Ah, ok. If you just want to re-read the question we can get that for you, if you still have the link.
 
@PM2Ring, I still have the question visible. It happens often enough that I first use Chrome Dev tools to delete the real-time deletion notification to view and copy the page before I let the page refresh :) Thanks for the offer though
 
@downshift Sorry I can't be of more help. Diamond mods can leave messages for anybody, but they wouldn't do it for something trivial like this.
On a totally different subject... It's a bit scary that this OP is supposed to be a Web developer, but they didn't recognise that &gt;and &lt; are HTML entities... stackoverflow.com/q/45111767/4014959
 
@PM2Ring no worries at all, you and Andreas answered my question.
 
10:22 PM
stackoverflow.com/questions/45111767/… I'd class that as a typo, and it won't get Roomba'd with that 5 upvote answer :(
 
@downshift *Andras, but you're welcome
 
ah yes, :) noted
 
@PM2Ring even Bill answered that, hmm
 
ah..also deleted.. <sigh>.. see!
 
@AndrasDeak Yeah, I was a little surprised by that.
@downshift Even if someone else had the exact same problem it's highly unlikely that a search would lead them to that question. So we deleted it because posts like that just add clutter to the system. And I'm sure the OP doesn't mind: they got their answer, and they got the points back that they lost through the 5 downvotes.
 
10:33 PM
oh, you guys deleted it. interesting.
 
it's a typical case of "the question is on topic, but it is unlikely to help future readers". Typos and brainfarts are typically this category.
when you reach 3k rep you'll be able to vote-to-close with a similar reason (I assume close-flagging is already an option for you)
at 10k rep you can vote to delete closed/downvoted posts
 
ah right, once I click the delete notification it does indeed show "for reasons of moderation. "
 
oh, it comes with restrictions. so that's why I've never seen a "vote to delete" button before
...so far, editing tags inline has been the most useful of the 10k features
 
@O.KOO Please don't attempt edit out the python-3.x. While it appears that the user is not using Python3, we don't know that for sure. We need to wait till he clarifies what version he's using, then we can remove the tag if need be. — Christian Dean 20 mins ago
But in this case, there's basically 0% chance they're using 3. Is there still precedent to not edit against the OP's intention?
 
BS
did OP put python-3.x there?
 
10:41 PM
Yep
 
hmm
then perhaps in makes sense as a python-2 answer would not be applicable
 
Ah, true
 
@Rawing it's not that useful: you can't even set a custom edit message that way
I'd rather click 2 more and add something myself
@Rawing read these
 
do you really need to leave a message when you edit the tags? In my case, most of the time it's people incorrectly using the pygtk tag (which has been outdated for years)
 
for which I'd add a message noting that it's been outdated for years
 
10:44 PM
heh, meta memes have made their way to the help pages
 
@Rawing I never bother with an edit message for tag edits. But I always leave a comment for other edits.
 
Is there a dupe for "if you're doing a subprocess as a list of tokens, you don't need to do additional quoting"?
 
people use that tag because they use gtk and they use python, so they think pygtk is the correct tag when in fact it isn't. It's as if someone tagged a question as pycharm even though they're obviously using a different IDE. I really don't see a reason to leave a message in such a case
 
And FWIW, I still use pygtk occasionally... I guess I should upgrade to GTK3, but I haven't used GTK much in recent years, I've mostly been using Tkinter for GUI stuff, even though it's rather inferior to GTK. The reason I'm using Tkinter is that Tkinter questions are fairly common on SO, and I figured it was a good idea to learn something about it so I could answer them. :)
 
@Rawing have you considered editing a short warning about that into the tag wiki excerpt? Not that people read that.
 
10:49 PM
@KevinMGranger best I can find is this
 
Hmm. The problem is the same, although it's through asyncio. I should have clarified
 
@KevinMGranger Maybe put the link that rawing found in a "Also see" comment.
 
Someone already commented. Should I still answer? Bleh
 
@AndrasDeak Nope, that actually never occurred to me. Wasn't aware a 10k pleb like me could do that. Maybe I'll do that.
 
as far as I know even anon users can submit tag wiki edits
 
10:59 PM
@KevinMGranger They were accidentally using Python 2, so we can close it as a typo.
@AndrasDeak Indeed. Oops you need to be registered. And 5k is enough to approve tag wiki edits. stackoverflow.com/help/privileges/approve-tag-wiki-edits
 
ah, at least that restriction is there
I know I've seen tag wiki edit suggestions that were questions asked by a 1-rep user
 
typo stackoverflow.com/questions/45112283/… <- that question Kevin M was talking about. Only 1 more vote needed.
 
done
 
Thanks, Andras.
 
my pleasure :P
 
11:14 PM
I guess we might as well leave the Python 3 stuff in there. It'll get Roomba'd soon enough, and in the mean time it won't make sense if the Python 3 stuff is edited out.
 
weekend-rbrbs!
 
rbrb
 
Hey Andras, here's a MatLab to Numpy translation question, with code in both languages, if you're interested. stackoverflow.com/questions/45112856/…
Hi @TemporalWolf Welcome to the Python chat room!
 
11:30 PM
So what is the general consensus for answers to low-quality questions. Another "do my homework for me" question popped up, and they OP gets 3 answers for zero work. I look at his profile, in the last week he's asked 7 questions which are exactly the same format and were all answered for him... I'm sure we'll see another from him just like it tomorrow -.-
 
downvote and vote to close these effortless craps
sooner or later they'll run into a question ban
also downvote any answers on effortless requirement dumps (<-- not consensus, just my take on the subject)
 
7/8 of his questions are zero or upvoted, despite being completely garbage.
so i doubt it'll solve itself
 
@TemporalWolf now that might be worth some investigation
if they are blatant crap, consider flagging for moderator attention, explaining in detail that the scores don't seem to correspond to quality
mods see some vote patterns and can investigate if there's anything fishy going on
 
Pretty sure people are just so rep hungry they'll answer anything. They all would be valid questions if he made any sort of effort... I don't think it's vote fraud, just people are too hungry for rep to blam bad questions.
 
link? :P
 
thanks
 
Sometimes those zero-effort homework questions can be interesting, and if the questions are clear I can understand people wanting to answer them (and score some rep). Even so, we don't want to encourage that sort of thing, so we usually close-vote them ASAP as "too broad",
 
although a one-box is probably unnecessary
@TemporalWolf needs way more close votes
 
I'm not sure how to un-box that :P
 
if there's anything other than the link in the message, it won't onebox
 
11:34 PM
@TemporalWolf Just add some extra text. Quick while you can still edit it.
 
Thanks :)
 
Well done.
 
thanks
 
Hopefully he'll get the message from this one getting blammed like all of his should.
 
how optimistic
 
11:36 PM
I'm a dreamer
 
To get quick action on bad questions you can request people here to consider close-voting it, like this:
 
I think we could tile OP's questions right next to each other like dominos, and end up with a final working program put together by the community
 
I haven't used SO chat before, so maybe I'll have to start popping in
@AndrasDeak haha, the sad thing is you're not wrong.
 
there are some rules that apply to cv-pls requests (mostly time constraints), all the rules can be found here
 
11:39 PM
In our room rules we do like to give the OP a 10 minute grace period before making a [tag:cv-pls] request. OTOH, if you leave them open too long the FGITW answers start pouring in...
Kevin'd by Andras. :)
 
I'm thinking that perhaps all these questions could be dupehammered then delvoted :/
it would need some effort, but this OP is bugging me enough that I might try to do that later
 
Maybe it's because it's 2AM, but this sentence from the wiki doesn't sound like correct english to me: "Add a reason to your request, so others know what to look for when evalating their vote"
that's supposed to be "evaluating" I think?
 
probably evaluate, yes
I'm not sure you can actually evaluate a vote, so...
 
yeah, that sounds a little weird to me too
 
What is the context?
 
11:44 PM
You need more context than that? it's from here under point 3
 
"...when evaluating the question" makes a lot more sense to me
 
@Rawing Oops. I've never noticed that before.
@TemporalWolf Indeed.
 
yeah, either evaluating the question, or deciding on one's vote, or something
 
How does this sound? "Add a reason to your request, so others know what to look for when deciding to vote".
 
but then again the intent is pretty clear
works for me ---------------------------------------------------^
 
11:47 PM
Alright gentlepeople, I'm out. Good luck, and I'll be sure to come back.
 
not "deciding how to vote"?
 
@TemporalWolf good night, nice meeting you
 
I think I'll go for the minimal change: "Add a reason to your request, so others know what to look for when evaluating the question."
 
but...but...I want a blue bikeshed ;)
 
that works.
 
11:50 PM
evaluating vote... evaluating vote... vote evaluated. evaluation: this vote is a hot dog.
 
@Rawing Well, we don't want to imply that people are under an obligation to vote. That'd make us a voting ring. And we're definitely not that. ;)
 
we're a voting* cabbage (*voting optional)
 
"not a ring" says the person with "ring" in their name... I'm not convinced ;P
 

« first day (2463 days earlier)      last day (2475 days later) »