« first day (2336 days earlier)      last day (2602 days later) » 

8:00 PM
Wait. The most up-to-date version doesn't define it either. Why does my local copy look different?
 
wim
or use the "w" key .. pro-tip I learned yesterday ;)
 
@MooingRawr sorry got into a meeting... Basically, I am opening a modal, but as the modal is opening, I am blurring out the background
 
Oh, I fell into the master branch somehow, I guess?
 
@Kevin isn't your python older? You said 2.7.11
 
"string.letters
The concatenation of the strings lowercase and uppercase described below. The specific value is locale-dependent, and will be updated when locale.setlocale() is called."
maybe this has something to do with it?
>>> import locale, string
>>> string.letters
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>> locale.setlocale(locale.LC_ALL, '')
'en_US.UTF-8'
>>> string.letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
 
DSM
8:04 PM
Huh.
 
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'English_United States.1252'
>>> string.letters
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\x83\x8a\x8c\x8e\x9a\x9c\x9e\x9f\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
>>>
Well, it's different, but not how I expected.
setlocale calls fixup_ulcase in some code paths. Looks relevant.
It appears to be doing something involving "string" and "uppercase" and "lowercase"
PyDict_SetItemString(string, "letters", ulo);
Ooh, smoking gun
Yep, pretty sure that's the culprit. It puts uppercase letters first merely because they come first lexicographically.
So really the question is, what is the design justification for letters not being in lexicographic order initially?
Who wants to file a feature request?
 
wim
8:20 PM
feature requests for Python 2.7 will get shot down in flames
 
Who wants to submit a bug request which is actually a feature request in disguise?
 
I've definitely not done that before when instructed to add no new features to a project.
"Fixing bug, the bug being that it lacks this feature I want to put in"
 
It's a little tricky for them to deflect with "but that might break backwards compatibility" because the behavior is already locale-dependent anyway. Programs that expect non-capitals first justly deserve to burst into flames.
 
they might hand-wave some that when people test whether char in string.letters, char is much more likely to be lowercase, so test those first
 
wim
fixing up python 2.7 is polishing a turd
 
8:25 PM
hmm...my firefox is being weird
 
python 2.7 was bretty gud back in the day
 
wim
if you find an issue still there in 3.7, by all means submit a ticket, but don't bother with 2.7
 
wow
it was mayavi eating my mouse, and apparently my chat connection??
I was logged out of chat while my mouse was inactive, but now I'm logged in again, wtf
 
8:47 PM
OK, it might have been an unrelated SO thing
 
the main site was down for a couple minutes a while ago
 
maybe mayavi killed that too
 
Mayavi ate the main site too!?
 
ha!
 
Semi-related: Today I was briefly concerned that my Visual Studio project had deleted all the rows in my million row database table, when I noticed that select * from WIDGETS where NAME != '' returned zero rows, and select * from WIDGETS where NAME = '' returned zero rows.
Then I did select * from WIDGETS and got a million rows. I still don't know what I'm doing wrong.
 
8:50 PM
@Ffisegydd if it did: it was worth it
 
I'm liking Visual Studio Code.
 
I'm specifically laying the blame on Visual Studio because every time I do something with one of its "wizards" instead of typing regular text into a regular file, it makes half a dozen changes to config files in my local project and the global assembly cache and the web server and the WOPR missile defense network
No file is safe from VS
 
That question about why Python and Ruby allows for function overwriting... why wouldn't you want to be able to write over your functions if you choose too :\
 
wim
@Kevin it's possible you have millions of rows with name null.
 
@MooingRawr I'd say defining the same function twice is possibly a sign that you've made a bad design decision and/or a typo, so it's reasonable for some languages to disallow it.
However in Python, We're All Adults Here so if you want to shoot yourself in the foot, you are welcome to it
 
8:58 PM
I understand fully well why it could seem like a bad practice, but on the other hand, I second your second comment... Freedom to do whatever you want even if it's a bad idea.
 
"We will only allow you to do things the Right Way (tm)" is just as valid a language principle, it's just one that we don't adhere to.
 
wim
for charfields columns it's common to set them up to disallow null , so that you don't have two different ways to represent empty: null and ''
 
SQL Developer tells me that my column is "NULLABLE: No", and indeed select * from WIDGETS where NAME IS NULL returns zero rows.
 
@Kevin Maybe you have to use <> instead of != perhaps?
 
Is there a difference? I'll try it.
Hmm, still zero rows.
 
wim
9:01 PM
what do you get for select * from widgets limit 3
also show create table widgets
 
I get ORA-00933: SQL command not properly ended
 
wim
put a semicolon on rolls eyes
 
does it change any if you do widgets.name, by chance?
(sometimes using name by itself has weird behavior)
 
Error occurs even with a semicolon. The red squiggly says "Syntax error, expected: <semicolon> \n WHERE \n <period>"
I'll play around with this more tomorrow.
 
On another irrelevant note. My office is thinking to phase out "cubical decks" for the new hip "kinetic decks" that can life and turn into a standing desk. On the downside, not as much privacy... Does anyone else work in a non cubical environment? and thoughts on it?
@Kevin have a nice day :D
 
9:05 PM
Our office doesn't have cubicles, but luckily everyone here is pretty quiet and no one cares if you're browsing the web.
It also helps that there's only about 10 people in the office.
I would much rather have each developer have their own private space though.
 
@MooingRawr Depends on why you want to switch to those desks in the first place and what kind of environment makes sense for the kind of work you're doing
 
I wonder if people work more efficiently in an open space vs private space... google doesn't come with a clear cut answer, but raise a few good points to each sides
 
I think having private space is important, with the option to move to open areas for when it makes sense (i.e. "why not both?")
 
@MarcusS not my call. I don't know why we are switching to open office... We are moving to a new location and they decided to swap to open style, instead of keeping the current cubical layout. We have about 50+ employee in this office, so it's going to be rather interesting to see how it turns out.... but then again I didn't see the layout of the new office. Maybe it's team based room with these desks, so each team is section off from other teams, but you are open within your own team.
Like you said, I think a mix of both would be perfect, maybe a bit on the expensive side. I wonder how much productivity will be affected based on these changes.
@MoinuddinQuadri cbg \o :D
 
@MooingRawr cbg..I was going through the history before I officially cbg all. But you caught me :)
I hope that open office will be a fun for you ;)
 
RDK
9:16 PM
what is the idiomatic way to initialize python list?

`a = []`

or

a = list()`
I meant a = list()
 
Are you going to fill the list right after it? If so how? It all depends on what you are doing. If you are just creating a list and then filling it, perhaps you would want to use a list comprehension. If you are creating a list, to fill based on other factors like thread returns and what not, then i don't think either matters. Both are accepted and it's a opinionated answer on which is "better" Moinuddin gives a good answer
 
RDK
@Moi
 
Oh I stand corrected [] vs list() does matter.... based purely on that.
 
RDK
@MoinuddinQuadri Exactly. For list it is clear. But it is possible to confuse {} with set initialization.
 
9:19 PM
 
RDK
@MooingRawr I was asking from code clarity perspective, not necessarily performance.
 
@MarcusS Just googled that question, you Kevin'd me :\
@RDK once again it depends on what you are doing....
 
RDK
@MarcusS thanks for the link.
Point noted @MooingRawr
 
@MooingRawr Open office is fun, but sometimes when you are stuck with some bug which is hard to debug, you look for silent place around you. But that is hard to find :(
 
RDK
Thanks everyone. I'm going with list() (even though it appears to be slower), since I definitely favor dict() over {}.
 
9:22 PM
I usually move towards meeting rooms and lock the door in such scenarios :P
@RDK Why you favour dict() over {}?
 
RDK
because {} can be confused for set initialization
 
>>> a = {}
>>> type(a)
<type 'dict'>
 
but if you are purely just asking a = [] vs a = list() based on looks, I think the former is cleaner but that's opinion based
 
{} is always going to dict. Why will someone be confused? If one is confused, they don't know Python
 
RDK
9:24 PM
True but consider this:
In [98]: x = set([1,2,3,4,5])

In [99]: x
Out[99]: {1, 2, 3, 4, 5}
 
@MoinuddinQuadri well of course if someone doesn't know Python they will be confused... it depends on your target audience.
 
Yes, it is a set: {1, 2, 3}
and `{1: 2, 3: 4}` is dict
 
is your code going to be looked at by non Pythonic people or is it going to be only for devs?
 
RDK
Pythonic people (but some have more Java baggage)
but all are devs
 
I still think this question is personal opinions and there's no real "better" answer. Both has their pros and cons :\ just gotta pick one that you like...
 
RDK
9:26 PM
I know
Its just one of those things where it'd be better if it were addressed in PEP8
I get paralyzed by "personal choice" situations.
 
standards started out as personal opinion/habits :D
 
RDK
True :)
 
9:50 PM
It's been a long time since I added any post to my tech blog.
I am thinking to add some new stuff but I don't know what :(
I recently did some research and analysis on MySQL v/s MariaDB v/s PostgreSQL. I think it could be a nice topic
 
whatever you choose, don't forget to backup;)
 
^ Haha. You still remember? :P
I have a private github repo now in which all my websites are backed up currently
 
well it wasn't that long ago
 
shift Z Z :D
 
neat, hplip's hp-setup uses python3 by default
 
10:14 PM
@Withnail thanks!
 
it also wants me to authorize myself using user root, but you can't always get what you want
 
I'm still somewhat reluctant to use that innovation:P
 
Ha Ha... that comment is hilarious. {0}-{0} looks like owl's eyes which reminds me of Harry Potter :D
I will be searching for an opportunity to share this with my peers :P
 
10:36 PM
Amazingly, I balk at the thought of spending £15 on a course
 
Course of meal, or course for education?
 
The latter :-)
And the former
 
user6845426
10:53 PM
cbg o/
 
cbg
 
user6845426
How are we this fine evening :D
 
very tired, thanks
 
user6845426
same here
 
user6845426
still trying to get my head around cnn's
 
user6845426
10:55 PM
only been 3 months...
 
if only it took longer to generate a .pyc
 
For a moment I forgot that I am in a Python room. It was hilarious to me because I could relate this with the old times when I use to work in C
Specially the one time when I had to integrate the perf patch with the Linux Kernel. It use to take around an hour to run that :'( :D
 
wim
where does the name posix get imported from? github.com/python/cpython/blob/…
I mean, resolved to what?
 
11:46 PM
@AndrasDeak now it's build asset pipeline (sass compile;Google Closure Compiler->uglify; generate images of appropriate dimensions), build code, deploy everything into Docker container, upload container to repository, pull and install container
 
I hope that's all webscale
 

« first day (2336 days earlier)      last day (2602 days later) »