« first day (2049 days earlier)      last day (2900 days later) » 

1:40 AM
@idjaw - these are pretty good
 
 
4 hours later…
5:13 AM
@MorganThrapp Hola señor
 
 
2 hours later…
7:21 AM
Morning.
 
cabbage
 
Cbg @Jerry
 
Morning both
 
7:44 AM
Good morning ,
small question , I'm trying to create a query string from list :
prefix = 'pref '
postfix = ' postfix'
ampersant = ' & '
my_list = ['aa','bb','cc']
something like that
my_query = prefix + my_list[0] + ampersant + my_list[1] + ampersant + my_list[2] + postfix
the result would be like : pref aa & bb & cc postfix
I need some help to create this query . Thanks a lot !
 
You've not stated what your actual problem is.
 
cbg
 
My problem is to create my_query from any list of items with "prefix" in the beginning of query and "postfix" in the end of query , and ampersand as separator
 
And have you tried anything else other than that code?
It's a pretty simple problem which could be fixed by doing some Googling/research.
 
how to keep separator between printing items ?
with for separator will be printed after each item
I'm on Python 2
 
8:01 AM
@Toren so your problem is that it's not putting spaces between strings?
 
That whatthecommit thing must have a text representation, so that I could git commit -am $(curl whatthecommit.com/txt).
 
Sounds like a job for a Python package :P
 
No , I want to create string like my_query with each item from my_list and add '&' after each item
but last item should be without '&'
 
I'd suggest you do some more research on this, I just googled something and the first topic was an SO post that explains it.
 
actually, whatthecommit.com/index.txt
 
8:07 AM
Can you please share the post URL
?
 
No.
That would defeat the purpose of you learning to do your own research.
 
What keywords did you search ?
 
Simple ones.
 
ha ha
 
@khajvah the hell?
Thanks for that.
Instead of trying to teach someone to do their own research, you give them the answer to an EASILY googleable problem!?
 
8:13 AM
ok, I thought it wasn't the solution itself so it's fine.
but ok
sorry
 
That is all they need to do it.
 
> You give a poor man a fish and you feed him for a day. You teach him to fish and you give him an occupation that will feed him for a lifetime.
 
that answer my question I think
 
just try the code, if it works, then you have it
 
8:17 AM
alias gci='git commit -m "$(curl -s whatthecommit.com/index.txt)"';
 
9:07 AM
Cabbage
@Jerry I prefer the Discworld version:
“Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.” ― Terry Pratchett, Jingo
 
xD nice one
 
I prefer the Fizzy version. "Teach a man to fish and he'll be fed for a lifetime, give a man a fish and they'll keep on coming back for fish over and over again."
 
@PM2Ring yeah I say that a lot :)
 
The SO Meta discussion about non-English chat rooms is rather active... meta.stackoverflow.com/q/323810/4014959
 
Gotta love pandas: pd.pivot_table(data=df, index="date_time", columns="outcome_type", aggfunc="count")['name'].resample('W').count().plot.bar(stacked=True)
It's almost like JS <3
 
9:36 AM
I feel sorry for those Gujarati Android people having their chat room frozen. But I must admit that I was starting to get sick of all the incomprehensible flags from there. OTOH, I suppose if the English-only rule is to be strictly enforced in all SO chat rooms that may not necessarily help: Gujarati English is somewhat different to my dialect. Eg,
I thought ,understanding of queries is more important rather than this language issue specially in #chat room ,Apart from this I guess every one following english in terms of posted their questions and give their helpful answers in on SO . — Radhe 4 hours ago
I think I get what she's trying to say, but I can't be sure, and I don't think I'd get a lot of clarification if I tried asking her to explain. :)
 
9:51 AM
2
A: How can we support languages other than English in Stack Overflow's chat... And should we?

BenjolOn behalf of all Brits, I would like to officially apologise for this unfortunate situation. Despite our best efforts we only ever managed to colonise 20% of the world's population, we therefore recognise that it is our responsibility that there continue to be pockets of uncivilised non-English ...

Heh
 
10:13 AM
@Ffisegydd yuck
 
Just doing a bit of autocorrelation analysis while listening to data science podcasts. I need to up the DS contribution to the room while @DSM is AFK due to his new job.
 
@Ffisegydd deleted now
 
Awwwww man. @Jon ruining all the fun.
 
certain people lack a sense of humour (and reading skills) entirely
 
Well Shog in his actual question can be quoted as saying:
> Well, the #1 reason is that folks are doing it anyway. Saying "English-only" two years ago didn't accomplish much beyond providing us with a fig leaf; I don't expect it to do more now. Also, folks appear to be blaming the British, and while it probably is their fault in some way, I don't feel comfortable letting them take all the blame here.
 
10:17 AM
of course there's a huge overlap with the guys who sparked this whole debate by not accepting the rules set down by Shog
 
So I assumed that it was jokingly answering that.
 
It was.
 
But yeah some of the commenters didn't take it very well.
 
when people got offended, Cerbrus commented "it's a joke"
then they were at him with "you're a joke to us too" and whatnot
 
@Ffisegydd it made me chuckle, but it was causing flags and the comments weren't going to a happy place - so it had to go
 
10:18 AM
Lovely.
Yeah I understand why you did it.
 
By the way I find Undo's suggestion to be the most viable
 
Oh you mean his "Let other people on chat.SE deal with it." suggestion? Yeah I like that one too :P
 
Other people who can speak most major languages
I'm unfamiliar with chat.SE, but from Shog's post I gathered that there's a buttload of mods there from all sorts of nationalities, and those from language-specific sister sites
 
Well - chat.se does have 500+ more moderators about than chat.so - not to mention more 10k+ users... so it kinda makes sense :)
 
I agree it makes sense, but saying it that way amuses me.
 
10:22 AM
well you shouldn't be saying it that way:P
 
A problem avoided is a problem solved.
 
the other option is closing all these rooms down for good, which is equally "problem avoided" for us, but immensely more frustrating to the other people involved
 
I think they should definitely be closed down here, the question is whether they should be opened up elsewhere.
And yeah they probably should be, and chat.SE sounds like a good place.
But that doesn't change the fact that I'm going to label it as "Let other people on chat.SE deal with it." and "A problem avoided is a problem solved."
:P
 
opinion-based Usage of inner function in python - sting_roc - 2016-05-26 10:28:20Z
 
10:41 AM
The "It's not the fault of the British" joking guy has posted a new answer which is more serious meta.stackoverflow.com/a/323848/3005188
I suspect it might also draw flags and problems :P
A lot of the comments are just being completely derailed.
I also swear that some of the disagreements are arising because people aren't able to understand each other - the irony of this isn't lost on me.
 
@Ffisegydd Indeed. And the fact that they don't understand that they are being misunderstood just adds to the irony.
 
10:59 AM
On this note I'm afraid I'll be splitting off to form "Python Northern" for all of the northerners in the room. We'll be speaking in Northern accents only. The Scottish are also allowed.
 
@Ffisegydd Actually, it is partly due to the legacy of the British Empire. Regions in India (also Singapore, Hong Kong, etc) have their own well-established dialects of English that can have subtle but important differences to more standard dialects. It's not uncommon for misunderstandings to arise when these dialects clash.
 
hey guys ! was wondering if anyone can help me out Its been bugging me for hours. I'mt trying to create a binary tree from a list of values [2, 31, 5, 27, None, None, 1, None, None, None, None, None, None, 7, None] and if its None that means it wont show up on the tree so its location won't be there
I wrote this originally def list_to_tree(alist):
    if alist == None:
        print(type(alist))
        return None
    else:
        return BinaryTree(alist[0],list_to_tree(alist[1]),list_to_tree(alist[2]))
ignore the print(type(alist)) was just for testing purpose too see what was wrong with my code. I got this error TypeError: 'int' object is not subscriptable
anyone have any ideas on how to write that function ?
 
@ross.c you seem to be missing a significant part of your code.
What's BinaryTree?
 
BinaryTree is my class
 
int object is not subscriptable is probably referring to you alist actually being an integer and you trying to index it using alist[0]
But as you've not provided a proper MCVE or a proper error code, I'm just guessing.
 
11:04 AM
class BinaryTree:

    def __init__(self, data, left = None, right = None):
        self.key = data
        self.left = left
        self.right  = right

    def insert_left(self, data):
        self.left = BinaryTree(data, left=self.left)

    def insert_right(self, data):
        self.right = BinaryTree(data, right=self.right)

    def get_left_subtree(self):
        return self.left

    def set_left(self, tree):
        self.left = tree

    def set_right(self, tree):
        self.right = tree
thats the class im using
 
You should read stackoverflow.com/help/mcve and post something we can work with.
Also please read sopython.com/chatroom, in particular about posting very large chunks of code.
 
thats all i got for my code :/ i cant think on what else to do to it
do you know ways of doing it ? Ive been trying for awhile haha
 
Hmm - in fact no need to guess. If you pass in the list you gave us to your function, consider what the very first recursion passes into the function. You need to step through slowly. Potentially take your if clause out so you can watch what is passed in at each step.
Start with a really simple input example - [1,2,3,4,5,6,7]
 
One example I've noticed in this very chat room is the use of "few" in Indian English, as in "I have few problems with my code" when they really mean "I have a few problems with my code", which is almost the opposite.
 
There's not really room here to give a complete debugging tutorial, but a good tip is when you get errors like this put in print('debug point n',x,type(x)) to monitor what x is at that point.
@PM2Ring Or maybe they do indeed have very few problems with their code ;)
There are definitely some idiosyncracies.
 
11:10 AM
can someone explain any other ways of approaching this problem
 
@ross.c Your approach is (potentially) reasonable (recursing to build the tree), the implementation is not yet sound. It also relies on a very specific list format, but I guess you've been given that.
cbg('martijn')
 
okay im just trying to think of ways to progress
 
@JRichardSnape :) It helps when you have some familiarity with the speaker or their dialect. FWIW, there's a substantial Gujarati population in this area. Race / cultural problems are few, but the Gujarati people do have a tendency to avoid using English among themselves; OTOH, their kids' English i quite good, even if they do have a noticeable accent.
 
@ross.c I'm assuming this is for some homework? Have you considered going to your teacher/lecturer/teaching assistant if you're stuck?
 
its a project yes :P ive finished everything except for the last two parts. I have but its been 3 days since ive gotten a reply from e-mail and havn't been into college because of sickness
well actually cant walk at the moment
 
11:17 AM
@PM2Ring Yeah, I live in an area very similar and my kids hear a wide range of accents/dialects at school. Good for the soul, I think. Similarly, people often revert to their native language when speaking to each other, but who wouldn't? Same happens at work with e.g. our Greek colleagues.
 
Oops! Our local Indians are actually Punjabis, not Gujaratis. :embarrassed:
 
im punjabi :)
 
@Ffisegydd the reason "sorry -- British" guy has answered again is exactly this: some Indian commenters read the words and still wouldn't believe that he's joking, due to the prejudice or whatever working in those who rebel against the no-non-English ruling
this somehow ties in with some massive sociological issues that I don't even start to comprehend
 
@ross.c that's very unlucky. I'll take a stab in the dark and guess you've got to hand in soon. Here's a plan of action. You are not the first to have this problem. Google "build binarytree from list" optionally add python or change "list" to array to vary the languages in the results. Have a read of the first few results (often SO). Hopefully that will unblock your problem - if you have any specific Qs within the rules that Ffisegydd linked above, feel free to throw them in.
@AndrasDeak Mmmm, years of forceable rule do tend to tie in with massive sociological issues, I believe... :P
 
@ross.c :) I live near Woolgoolga where the 1st purpose-built Gurdwara was built, in 1969.
 
11:29 AM
@JRichardSnape Possible, possible:D
 
@JRichardSnape I have done that trust me haha and yeah It is due soon. I'm just trying to get past that type error which is bugging me
@PM2Ring wow nice :P !
 
Ever since we lost a buttload of our territories after WWI, we've had insignificant amount of nationalities. So I really can't imagine how these things work. My people have to hate other Hungarians if they want to be racist.
wait, that's probably not my point
anyway...
 
Didn't we have a similar question about binary tree stuff yesterday? chat.stackoverflow.com/transcript/message/30746394#30746394
 
@ross.c OK - well - Fizzy has told you the direct cause of the error and I have shown you how to debug it to demonstrate that for yourself (with the print statement). Basically you're dealing with an int where you think you're passing a list. I take it then, that you've found the SO question from 2013 titled "Create a complete binary search tree from list" and the code there doesn't work for you, or you don't understand it?
A tip - don't just assert "I've done my searches", show what you found, how you adapted / used / implemented it and then explain what you don't get. Otherwise the question is too vague and people quickly lose interest or get irritated.
Anyway - I'm off for lunch for an hour or so. Good luck!
@PM2Ring Typical end of year project stuff, I guess.
 
12:06 PM
 
no huge surprises there
except Greece
 
:) I would've thought Sweden would've had a higher ratio than Finland, but there you go.
 
nooo, Finnish metal \m/
nobody talks about Swedish metal
Finnish metal is what made Nokia so enduring...
(I'll let myself out)
 
@AndrasDeak I guess Yngwie is a bit old these days...
 
12:22 PM
cbg
 
aye aye Cap'n
 
ninja pup!
been a while
how are you?
 
Guys, I have a question about compilers. I just read that pypy is written in RPython which is translated to C which then to native code. The question is, why translate it in C? Why not directly to native code?
 
I thought C was native
 
Native 4chan language
 
12:29 PM
C is not native, but it gets compiled to native machine code.
 
a CS friend of mine told me a few days ago something along these lines
I always assume that assembly is native
 
If I were to write a compiler I wouldn't compile it to some other high level language.
 
@khajvah Two reasons. 1: C is portable, so you can leverage the compilers that are written for different architectures. 2: Translating high-level code directly to machine code is a recipe for insanity. And errors. FWIW, even C compilers are mostly written in C, with a small amount of assembler.
 
Yeah but C compilers compile C to native.
man, this compiler business is too cool for me.
 
@AndrasDeak Sort of. There's a very close correspondence between assembler and machine code, so writing an assembler is fairly trivial compared to writing a compiler or interpreter.
 
12:36 PM
:)
 
I will continue writing my dumb web applications
 
stackoverflow.com/q/37460934/344286 "Doing this thing does what I want except for it does what the documentation says it will do and not the other thing"
 
Just been catching up on the meta drama.
 
:D
@Ffisegydd it's enough for a whole day
 
or - "If I add 1 + 2, why doesn't it format my harddrive?"
 
12:37 PM
Lol
 
the drama that keeps on dramaing
 
drama llama?
 
Dramatic drama
 
or llama drama?
 
Duh
 
12:38 PM
@WayneWerner I'm fairly certain plt.plot(x,y,".",color=...) would work too
but I don't want to harm OP's learning curve
 
 
@idjaw Ah man, I love whatthecommit. So useful for when I can't think of what to write in my commit message ;)
@AndrasDeak Interesting. Then again, I don't use matplotlib that much, so I'm not surprised that I don't know that ^_^
 
@WayneWerner heh...there are some really good ones in there that I've permalinked.
 
@WayneWerner also, there has to be a keyword just like marker that specifies the line type
so there are many ways around it
but if they want a scatter plot, they should be using that anyway
 
I spent a lot of time trawling through the matplotlib examples page when I've needed to do something
 
12:48 PM
:O :O Another -> buzzcommit.com
 
"Oh, that looks like what I want!"
@idjaw TROLOLOL! That's fantastic!
clickbait for my commit messages
awesome
 
git commit -m " You won't believe what happened when i compiled these typos. "
3
HAHA
 
@WayneWerner you should start with the help
it's great
 
> My FTP program is down, our only choice is to connect and network the auxiliary mainframe!
> Try to bypass the IDE capacitor, maybe it will synthesize the cross-platform hard drive!
 
12:51 PM
I found my new LinkedIn heading -> The HTTP feed is down, synthesize the unicode array so we can generate the PHP alarm!
 
@AndrasDeak I'll have to do that next time ;)
@idjaw I'd hire you
 
Having trouble googling if I can get tkinter to open a file as in display it on screen to the user, not just open in the sense of read it into memory. Specifically, I'm thinking of images. I want users to be able to open specific images. I have file path and everything but not sure if I can get it to open visually.. if that makes sense.
 
@clickhere if it's a gif you can load it on the canvas
if not, you'll have to use PIL(low) to turn it into an image that Tkinter can use, and then display that on the canvas
 
Oh, another thing, I'd rather it be opened in their standard/default viewer for that file type
 
You can't generate the driver without navigating the 1080p VGA malware!
 
12:53 PM
@clickhere things like this?
 
@Ffisegydd Can confirm that the BBC is 100% correct on this one.
 
not like that, Andras. I'm trying to get the image to open in their default picture program be it gimp/mspaint etc..
 
Nobody goes "Who wants a night out?" any more. It's "Drinks? Mine. Got Keg."
 
:D
 
@clickhere oooh, I see
 
12:53 PM
does anyone here have the latest stable intelliJ (or maybe even PyCharm) installed that can run a quick test for me?
 
that's not what you said
that doesn't have anything to do with tkinter, right?
 
@idjaw - I have PyCharm, what is it?
 
Not really at all
 
it's about "call external program from python", isn't it?
 
I should inform the British press that there's a correlation between punctuation and an increase of home alcohol consumption.
 
12:54 PM
@clickhere I bet lmgtfy.com?q=open+file+with+default+application+in+python will give you some solid results
 
sounds right ^
 
@PaulMcGuire thanks. Just create an rst file and let me know if you have any problems doing anything in the file (i.e. my enter key won't work...and eventually IDE just bugs out)
 
@idjaw You have any extra plugins installed? Might try disabling/uninstalling those
 
That was my next step....but my coworker and I are experiencing the same behaviour running latest stable IntelliJ
so maybe it's specific to IntelliJ and not necessarily PyCharm...
 
12:56 PM
I've got latest version of Pycharm installed and was editing an .rst fine yesterday @idjaw
 
Huh vacations are way cheaper than I thought
 
Running 2016.1.3, .rst file is not treated like anything special, is there a plugin I need?
 
@Ffisegydd <3 Spurious correlations
 
> The SMTP malware is down, transcode the neural program so we can input the PHP feed!
 
Thanks, guys. It seems I was definitely asking the wrong question
 
I'm not able to reproduce on my personal PyCharm and I'm running 2016.1.3 as well.
 
snort
 
that totally applies when changing "my text" == something to "my text".equals(something) in Java.
 
@PaulMcGuire Thanks for looking to that for me.
 
12:58 PM
I think I probably hate that more than anything else about Java
 
I'm suspecting we are sharing a common plugin that is doing something funky...
 
at least is has an actual meaning of identity.
Are there any other languages that == is the identity comparison operator for objects?
 
Scala IIRC.
 

« first day (2049 days earlier)      last day (2900 days later) »