« first day (1651 days earlier)      last day (3280 days later) » 

12:26 AM
Do you mean mate as in "friend"?
(sorry, naive American here, sometimes I have trouble deciphering which meaning is being used)
 
@JonClements Understood -- I hope things work out, regardless.
 
This week, I'm checking out asyncio and MyPy for the first time. I am shamed by how I've fallen behind on what's new in Python.
 
12:54 AM
@JeremyBanks Yeah, py-dev has been overrun with discussions about PEPs relating to both of those lately
 
 
5 hours later…
5:49 AM
Cbg
 
Cabbage
 
6:26 AM
cbg
 
6:48 AM
cbg
 
7:11 AM
cbg
 
Hey up!
 
user4433485
Cabbage!
 
'Hello'.encode('salad')
 
'Hello'.encode('fizzy')
 
7:14 AM
'Hello'.encode('puppy')
 
>>> 'Ffisegydd'.encode('salad')
'Fizzygood'
 
7:25 AM
cbg
 
Cbg
 
If only work consisted of solving fun programming puzzles
 
@Robert you mean that's not what life is like in industry? Screw this I'm going back to academia!
 
7:42 AM
whenever i read a new udacity assignment... i have to read it like 10 times to figure out what they even want from me
 
@Ffisegydd :)
@MartijnPieters cbg
 
@davidism: this edit was actually correct; one of the few suggested edits to code I get that was. :-P There was a missing closing parens.
The rest of the edit was to meet the minimal editing character count requirement.
 
user4433485
woops
 
My answer to the BWT question on codeeval works, but takes more than 10 seconds to run, which gets it killed :)
Oh well. Last night Rob was very tired. I'll have to try again at the weekend.
 
7:50 AM
@MartijnPieters stop scaring me - I see the blue and thought something was up :)
 
Yeah I keep getting worried
"It's a grownup!"
 
@JonClements sowwy
Can't turn it off at will.
 
first cup of tea, and some toast, then there's blue in the room.... !
 
Can't ninja as effectively with that big whopping shiny diamond giving me away.
 
@MartijnPieters if The Pinker Panther taught us anything...
 
7:54 AM
then realise it's our good old friend @Martijn
mind you.... someone has to have better photoshop sklls than me (ie: none) so we can do the little ninja a blue suit? :p
 
Cbg :)
 
when you guys have an assignment, how much time do you spend on average to figure out what to do, and how much is then just executing the right approach ?
 
cbg @Ian
 
Jon :)
 
@Stephan hard to say... when you've done it for 20+ years, you "just know"
 
8:00 AM
ok:(
 
Yeah, insanely broad question is insanely broad.
 
Bah, working all night, is it wrong to open a beer before I go to bed now?
 
@StephanKetterer you can practice that skill by planning with pen and paper before you start coding
@JonClements not if it gives you heartburn
 
@StephanKetterer depends on how well the teacher explained the assignment
 
The number of stars in this room is too damn high.
 
8:05 AM
since it is all in english, maybe sometimes that gives me additional problems
but i was in the chat of it recently and many people have given up or are even behind me
 
@StephanKetterer you can practice that skill as well by asking questions using drawings as metaphors. It'll come in handy when you're whiteboarding with MBAs
 
what is white boarding ? drawing something on a whiteboard? :)
 
@Ffisegydd Blame Kevin!
 
@Jon it's not that :P it's people (possibly one person) starring messages that aren't really funny so there's dozens and dozens of one-star messages in the log.
 
@StephanKetterer yeah so you're in a meeting and trying to explain a concept to someone who doesn't know about computers, but their input is vital to understanding how the system should behave. Pictures can really help.
 
8:11 AM
for my last audit assignment , it took me 3 weeks, this one is more complex... hopefully i can do it in one :P
 
@Ffisegydd isn't 'funny' subjective?
 
(Had to)
 
@Tim No. There are some things that are not funny/informative at all, and people star them anyway :P
 
oh , random question, if i have a program in python that takes some inputs/ give some outputs etc .. just a very small program.. how hard is it to put that in like a gui and make it into an easy to use desktop program ?
 
Depends on how well you've designed your program.
Harder than you may think though.
 
8:17 AM
Depends, have any experience with GUIs?
 
i did once a small course where they had like a preloaded GUI, so i would say no :)
 
If you've designed your program in an efficient and modular manner where the I/O functions can be replaced easily by GUI stuff then it'll be much easier.
 
got it , thank you
pastebin.com/Vvmsn6St it says i am trying to append to a string,i thought i am appending to a dictionary ?
 
8:32 AM
Well this isn't confusing at all. There's another Alembic.
 
@Stephan when asking for debugging help, it's always better to give the actual, full error.
I know it may seem like you're being helpful in summarising the traceback, but it actually makes it more difficult.
 
@StephanKetterer you show the method but not how you call it, we have no idea what fields represents
Although smarter people than me could have spotted that it was a dict..
 
Cabbage!
 
8:51 AM
@poke cbg
 
Switching to Windows... Rbrb for sometime
 
9:07 AM
oh i am sorry
had no intention to annoy people :(
 
I don't think anyone is annoyed
 
i included all the relevant things and the error:pastebin.com/AX4FWaSC
 
annoyed about what?
@StephanKetterer fields is your FIELDS dictionary, so if you do e.g. fields['URI'], you get 'uri' back which is a string and does not have an append method. Lists have that.
 
@MartijnPieters lol :d
 
@poke i am sure you are right but i don't understand it :)
oh..
so since i only have one value in it, with the datatype string, i cannot use append to it
 
9:19 AM
Yes
 
so if i had to fill it with only one value, i could just use "=" to assign a new value and overwrite what was in there, but what if i have a string it it now, but there are values coming it, maybe a list, will that still work ?
 
It actually doesn’t make much sense what you’re trying to do there. If fields is your FIELDS dictionary, then process_fields are the keys of that dictionary. So when you loop over the keys, you are essentially trying to do this:
for key in FIELDS.keys():
    FIELDS[key].append(key)
 
re-hey-up
 
damn you are right :(
 
9:24 AM
You probably can skip the append line altogether
 
what i should be doing is filling a list with dictionaries that each contain data of 1 spider
    for line in reader:
        for col in process_fields:
            fields[col]=line[col]
 
allData = []
for line in reader:
    obj = {}
    for col in process_fields:
        obj[col] = line[col]
    allData.append(obj)
^ maybe?
 
looks a bit similar to mine i think :)
 
You’re overwriting your FIELDS dictionary all the time though
 
so maybe, fill it, put it in the list, and then go again
 
9:28 AM
No, you need to create a new object for every item you want to put in the list
Otherwise, the list will just reference the same object multiple times and you keep changing the same object.
 
oh damn, i thought just, append it to my list data, after a line is read in
ok i know i can create an empty dict with {}. and i know i need a new dict for every new line
hmm
 
This playlist on YT, been listening to shitty music for 40 mins and I didn't even notice
 
Cabbage, all loyal followers of the greenest leaf. Mornin' to the rest of ye
 
Yo
 
@poke i tried to just create an empty dict at the start of each line, and then immediately put it in my list, and it seems to work ?
 
9:39 AM
@StephanKetterer Yeah, that’s what I did above too
 
damn.. i am even too inept to read your suggestion right lol
 
Don’t worry about it ;)
 
poke - have you much experience working with Austrians?
 
don't make fun of their futile tries to speak german ^^
 
As long as they don't make fun of my futile attempts to speak english ;)
 
9:44 AM
in general austrians are the the nicer, more laid back version of germans
 
Okay. Because I've worked with Germans before and working on a collaboration document I know they liked it to very formal. But someone has asked me to read over their collobaration document and it's much more informal - so I was wondering if it could potentially be a mistake if they're anything like their neighbours :)
 
no
its probably just cultural difference
 
Okay, I won't tear the document to complete shreds then - just mildly maim it :)
Thanks Stephan
 
lol :)
will take germans another 200 years to get a different image i guess
 
9:55 AM
I don't think they need a different image - they're fine as they are. The world would be boring if we were all the same. (Unless we were all like Katy Hopkins, then it would be far too bloody interesting :P)
 
There's not many people I actively hate, but I can safely say that I loathe Katy Hopkins and Robert Grant.
 
I loathe people who say Python 3 is impossible to support in their library.
 
I think people like Katy Hopkins and Robert Grant are important to have around as a sort of moral compass...
 
You mean like "It doesn't really matter what you do in life, as long as you don't behave like Katy Hopkins and Robert Grant."?
 
10:01 AM
Exactly
I mostly lead by counterexample
8
 
@IntrepidBrit Not particularly… but I know a few
@StephanKetterer Depends on where in Germany I’d say.
@IntrepidBrit I know super formal Germans and super informal Germans. Don’t think it’s that easy to generalize ;P
 
i live pretty much in the southest point :) i can walk over the swiss boarder :P
 
Where are you from?
Bayern then, I guess
 
Basically - Fizzy. Although I was trying to be more subtle
 
Love the German geographic names
translated in every language and differently...
 
10:05 AM
Don't beat around the bush man. Katy Hopkins and Robert Grant are monsters.
 
no badén wuerttemberg
 
@poke - That's a fair point. But it's useful to know what the expected social norm is. If they deviate from that (because they're super informal say), then they'll let you know pretty quickly.
 
konstanz, a city right at the biggest lake in germany
 
But there's also the other side of the coin. They might worry that you're too formal oneself..
 
Germany has no lakes!
 
10:06 AM
what :)
 
@StephanKetterer well in Finland the ppl will not be afraid of umlauts so you will see it with ü
 
pretty sure that qualifies as a lake
 
That's a pond
 
Bavaria in Finnish is Baijeri
 
Isn't that a puddle after rain?
 
10:08 AM
then give me an example of a lake
it has a volume of 48 km³
 
How deep is the "lake"?
 
That's a lake
 
That's not a lake, this is a lake loch.
 
Because chances are, it's actually a mere ;)
 
10:10 AM
between 90 and 250 meters
and no, i don't know what that is in a non metric system :)
 
between 90 and 250 yards :p
 
We use SI units in this room, on pain of having your figgin placed upon a spike.
 
Pfft. I don't use Imperial
Or "US Metric"
@Ffisegydd Ah, Urquhart Castle
One of those words that make you pause when you have to read it aloud.
 
Please can someone take a look at this stackoverflow.com/questions/29760130/… and tell me how i can achieve that when the nested lists contains objects instead of just numerical values i.e the objects have a property called value that contains the numbers
 
i love the tourist commercials of england or ireland, when they show the one sunny day they had all year :)
 
10:14 AM
i've alredy tried this print(max(x, key=sum(x.value))) but i'm getting list object has no attribute value
 
@TimCastelijns lol…
@StephanKetterer Bodensee, yay! Nice :)
 
@danidee pastebin what you've got
 
@poke atleast someone knows it :)
 
cbg all and congrats to @MartijnPieters!! :)
 
Cbg and thanks :-)
 
10:22 AM
@StephanKetterer I’m in Dortmund :)
 
oh wow :)
 
BvB! :-D
 
honestly i never got the excitement of grown men shooting a little ball in a net :)
 
I am trying to bond here
 
@IntrepidBrit this is it pastebin.com/mtJLXFyc don't mind my slopiness in appending the values, the real program makes use of dynamic objects created at runtime
 
10:27 AM
It's all about grown men carrying an egg-shaped ball across a line anyway.
 
 
haha :)
maybe i am just still sour because i lacked any talent playing soccer
 
10:41 AM
Sourpuss spotted!
 
1) They've accepted our offer on their house. Hooray!
@danidee 2) max([sum([node.dur for node in object]) for object in object_list])
It's not pretty, but it's functional
 
10:57 AM
cbg!
 
Hi, I'm trying to track down what is going on with
0
Q: Can't use apt because python encoding issue

cram1010I'm getting a python unicode error every time I try to install or update anything with apt or aptitude, preventing me to update my system. The error I'm getting is the following: File "/usr/bin/py3clean", line 4 SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no...

How should having an utf character behave in a python script for python 2 and python 3? E.g. as given in
0
Q: python 2.7 ignores default encoding set in sitecustomize.py when parsing scripts

Honore DoktorrI’m having problems getting python 2.7 to read scripts containing utf-8 strings; setting the default encoding to utf-8 in sitecustomize.py doesn’t seem to take. Here’s my sitecustomize.py: import sys sys.setdefaultencoding("utf-8") I can verify that the default encoding has been changed from ...

 
cbg(unihedron)
 
on debian wheezy, I see errors for 2 but not for 3 with the example given in that file. I did a cut and paste.
faheem@orwell:/tmp$ python test.py
File "test.py", line 1
SyntaxError: Non-ASCII character '\xc2' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
faheem@orwell:/tmp$ python3 test.py
utf-8·filename.txt
The ascii character there is just a dot.
 
hi there
 
@WaitingforDev... hi. Also asked on #mercurial on Freenode. technically it is off topic there, but the devs use python and know a lot about it.
 
11:04 AM
A thousand times thanks @FaheemMitha
 
@IntrepidBrit it works but and prints out the total duration which in my case is 16, i'm still trying to find a way to print out the nodes id which add up to 16, so i can print out something like this "The critical path is C==>D and the total duration is 16".Thanks for the help though
 
@WaitingforDev... I don't see why python 2/3 would behave differently on wheezy as opposed to jessie.
 
will be going offline for some hours but you could post any other suggestion you have, i guess i can track back and read older messages
 
@WaitingforDev... let us see if someone responds. encodings is something I know little about.
@WaitingforDev... for you that script gave exactly the same error on python 2 and 3, right?
 
yeah, exactly the same
 
11:06 AM
Asking on Stack Overflow itself is also probably an option, but let's wait and see if someone responds.
 
Yeah, I asked also there with no success...
 
@WaitingforDev... asked what? On SO?
 
0
Q: Can't use apt because python encoding issue

Waiting for Dev...I'm getting a python unicode error every time I try to install or update anything with apt or aptitude, preventing me to update my system. The error I'm getting is the following: File "/usr/bin/py3clean", line 4 SyntaxError: Non-ASCII character '\xc2' in file /usr/bin/py3clean on line 4, but no...

 
@WaitingforDev... Oh. you shouldn't cross post. It's against SE rules.
 
oh, really?
 
11:08 AM
It's not against SE rules per se, we just ask that you leave it a few days before you link it in chat.
 
I can delete SO post, I think is a little off-topic there
 
As per the chatroom rules sopython.com/chatroom
 
@WaitingforDev... Well, it's marginal.
@Ffisegydd he posted the same thing on SO and U&L.
 
Oh I see what you mean.
 
AFAIK that is against SE rules.
@Ffisegydd I'm asking about Python behavior here, per a question on U&L. We're not Python experts there. Basically, if a script contains a unicode character, would one expect it would fail with Python 2 and succeed with Python 3?
 
11:10 AM
I can delete in SO... I wasn't sure which was the best topic-related option, but now I think it has more something to do with system administration
 
@WaitingforDev... No, it's probably at least marginally on-topic there. But I don't think the way you have presented it will be effective.
I think they want to see explicit programming questions.
 
I see...
I will remove it and if we don't succeed here I'll try to ask in SO in a different way more related to python and unicode
 
cbg
 
@WaitingforDev... I made an error earlier.
Paste output of -> /usr/bin/python -c 'import sys; print(sys.getdefaultencoding())'
 
@FaheemMitha Both Python 2 & Python 3 can handle Unicode string data in the script source. OTOH, Python 3 can handle Unicode in variable names but Python 2 can't.
 
11:13 AM
and also /usr/bin/python3 -c 'import sys; print(sys.getdefaultencoding())'
 
@PM2Ring hmm, and what about unicode in comments? Is that a problem?
@WaitingforDev... Check the output of that import and print for python 2 and 3.
@PM2Ring So, if we write -> filename = 'utf-8·filename.txt'
 
@FaheemMitha In Python 3 it's totally fine, as the default encoding is utf-8. But in Python 2 it will bomb, unless a proper encoding directive is the 2nd (non-blank) line of the script.
 
would it be normal for python 2 to freak out, but Python 3 to not?
 
Wondering if this is for codereview or stackoverflow: - In an application I wrote in python (analysing heatmaps of in total 20GB) I keep running into a "memory error" - after about 1gb, I have no real idea how to debug yet my code is fairly large (relevant part is around 1KLOC). - Which site is best to help me find this leak?
 
11:15 AM
/usr/bin/python -c 'import sys; print(sys.getdefaultencoding())' ----------->
ascii
 
@WaitingforDev... and for python3?
 
ascii
same
 
@WaitingforDev... for python3?
 
Just paste it explicitly, please.
 
11:17 AM
I just get that output: one line with the word 'ascii'
 
I'm getting utf8 here. Which I think is what it is supposed to be.
 
@WaitingforDev... Ok, but just paste the thing, so I can reference it.
 
@FaheemMitha The default encoding for Python 2 is ASCII. So, a script with utf-8 in it without a utf-8 encoding directive can work fine on Py3 but crash on Py2, even if the rest of the script syntax is compatible for both versions.
 
11:17 AM
@PM2Ring yes, I see. Is this encoding related to locales in some way, or a separate creature?
@WaitingforDev... No, both the command and the result, please
 
ok, sorry :)
/usr/bin/python3 -c 'import sys; print(sys.getdefaultencoding())' ------->
ascii
 
Guys, this is not correct, right? ^^
 
But I'm not an expert on this topic; I think our encoding / Unicode experts are Antti Haapala and Martijn Pieters (of course :) )
 
@WaitingforDev... locale
 
11:18 AM
I get:
 
what does locale command say
the sys.getdefaultencoding is very unfortunately based on the LC_* settings
LC_CTYPE
 
locale---------->
LANG=ca_ES.UTF-8
LANGUAGE=
LC_CTYPE=ca_ES.UTF-8
LC_NUMERIC="ca_ES.UTF-8"
LC_TIME="ca_ES.UTF-8"
LC_COLLATE="ca_ES.UTF-8"
LC_MONETARY="ca_ES.UTF-8"
LC_MESSAGES="ca_ES.UTF-8"
LC_PAPER="ca_ES.UTF-8"
LC_NAME="ca_ES.UTF-8"
LC_ADDRESS="ca_ES.UTF-8"
LC_TELEPHONE="ca_ES.UTF-8"
LC_MEASUREMENT="ca_ES.UTF-8"
LC_IDENTIFICATION="ca_ES.UTF-8"
LC_ALL=
 
@AnttiHaapala that is indeed unfortunate.
 
hmhmmh
 
11:20 AM
Thoughts?
So, a locale setting could force python 3 encoding to ascii? If so, that would be a major bummer.
 
well, locale should warn if that's not the case, but... does the 'ca_ES.UTF-8' work with setlocale
@FaheemMitha it is and it is the major suckage currently with Python 3 (I am coding in Python 3 only)
 
@AnttiHaapala his locale is currently a bit broken, I think. Debian packaging problems. But I don't know if that has any bearing on that.
@AnttiHaapala could he do any basic sanity checking on his locales setting?
 
I have been for years with debian in ca_ES.UTF-8 without problems :(
 
@AnttiHaapala could resetting to something else temporarily be an option?
@WaitingforDev... Ok.
Probably it is unrelated. I think a reasonable question is whether the default encoding is being set somewhere.
 
@WaitingforDev... import locale; locale.setlocale(locale.LC_CTYPE, 'ca_ES.UTF-8')
 
11:23 AM
Which is why I asked about the /usr/local stuf earlier
 
@FaheemMitha there is a default encoding that you can set with an environment variable...
@WaitingforDev... does the above work in Python3 shell?
 
@AnttiHaapala Maybe he could reset it temporarily to get out of the hole...
 
I try
It seems it works...
python3 test2.py
it doesn't return any error
 
@WaitingforDev... what did you change?
 
Just a small question if I have a class (cont) that has 3 huge arrays inside it, and I put mycont = cont(blabla) and later mycont = None the memory gets cleaned right?
 
11:25 AM
@WaitingforDev... what do you get for @AnttiHaapala's question?
 
yeah... it would raise "locale.Error: unsupported locale setting" if ca_ES wouldn't work
 
@WaitingforDev... what is test2.py?
@AnttiHaapala that's what I get.
 
I put what @AnttiHaapala in test2.py
and there is no error
 
but I'm not using that locale. What is ca_ES?
@WaitingforDev... ah, ok.
 
you can do print(setlocale(...))`
to ensure that it returns 'ca_ES.UTF-8'
 
11:27 AM
ca_ES is Catalan
 
(in Spain)
@WaitingforDev... what is your python3 version?
 
I get NameError: name 'setlocale' is not defined
with 3.2. Is this only valid for later releases?
 
ooooops
I run python3 --version
and I get
Python 2.7.8
 
lol :D
 
maybe there is simply a malformed symlin in /usr/bin :S
 
11:29 AM
that could explain a lot :d
 
yikes
 
I'll try :P (quite embarrassing right now :p)
 
% /usr/bin/python2 -c 'import sys; print(sys.getdefaultencoding())'
ascii
% /usr/bin/python3.1 -c 'import sys; print(sys.getdefaultencoding())'
utf-8
% /usr/bin/python3.2 -c 'import sys; print(sys.getdefaultencoding())'
utf-8
% /usr/bin/python3.3 -c 'import sys; print(sys.getdefaultencoding())'
utf-8
 
what does ls -la /usr/bin/python3 show?
 
this is debian 7 ^
 
11:30 AM
@AnttiHaapala wheezy?
Yes, wheezy.
 
I dunno, not my server :P just read from /etc/issue
LC_CTYPE="fi_FI.UTF-8"
 
ls -lah /usr/bin/python3
lrwxrwxrwx 1 root root 9 Oct 22 2012 /usr/bin/python3 -> python3.2
 
@FaheemMitha it pointed to /usr/bin/python
 
@WaitingforDev... hmm.
 
@WaitingforDev... definitely wrong
 
11:32 AM
that is what I thought...
:)
 
@WaitingforDev... yes, that's wrong. wonder how that happened.
 
only arch linux so far has Python 3 as python
 
@paul23 Yes, those arrays will get garbage collected, along with any other memory associated with that class instance, assuming that there are no other references to the instance (or the arrays).
 
@WaitingforDev... ok, do you know how to fix that? or do you need pointers?
 
@FaheemMitha surely when I had to play with pyenv, I did touch too much
no, I know how to fix it
now dist-upgrade is working :)
 
11:33 AM
pyenv is not a good match with debian
 
ok, good to know
 
@WaitingforDev... ok. good. I'll post an answer saying your python version was messed up, then. But not right now.
 
my apologizes, because it was due to a very silly reason
 
@PM2Ring weird? guess I have a good SO question now why it bugs then after doing those lines ~100 times for 75MB sized numpy arrays
 
ok @FaheemMitha
 
11:34 AM
Thanks for the help, guys.
 
I will remove the queston from SO, it was related with U&L
 
Thanks @AnttiHaapala.
 
Thanks a lot for your help, I really appreciate that
 
@WaitingforDev... hehe from now on I'll ask the --version thing first from everyone
 
11:37 AM
@WaitingforDev... Don't feel too bad: silly reasons can be the hardest to track down.
 
and they're the most interesting ones :D
bc usually they're overlooked
 
@paul23 Perhaps. Make sure that there's nothing else in your code that's maintaining a ref on those arrays. Or maybe numpy's doing something annoying; I don't know much about numpy, so that's just a wild guess. Make sure you tag your question with .
Why can't OPs answer a simple "how big is the file" question with an actual numeric answer? unix.stackexchange.com/questions/198349/…
 
It is a very hard question
ooo ubuntu 15.04 is out
 
Does it search alibaba.com just in case you're searching for a product to have manufactured overseas?
 
@TimCastelijns I guess it could be, but a rough ball-park figure would be nice. They might say it's large because it has a million lines, but that wouldn't be a problem if they have a GB or two of RAM to spare.
 
11:52 AM
I was joking :-) about the question
 
Ah, ok.
I'm tempted to vtc this as unclear if the OP doesn't respond soon.
 
waits while SQL Server Setup is installed, so it can then install SQL Server
 
Why wait?
 
@TimCastelijns because less than a day is a bit of a short time to expect people to respond in
 
Does it matter when they are (or not) going to respond?
 
11:57 AM
@RobertGrant Hello Robert
 
@TimCastelijns well yeah, otherwise why not just close it instead of giving any feedback?
 
The close reason is also feedback :-) and you have even commented about it
 
python feels easy.
 
That doesn't make sense; I'm not talking about it closing, and that being a form of feedback, I'm saying if you give feedback in a comment, then obviously you have to wait for them to respond to it.
 

« first day (1651 days earlier)      last day (3280 days later) »