« first day (1718 days earlier)      last day (3225 days later) » 

1:00 PM
Cartoons have given me a very false perspective on soufflés. Apparently they don't collapse if you clap your hands next to them.
 
I've seen the great british bakeoff. My impression is that they are similar to soup, is that correct?
 
I love GBBO.
I'm watching Celebrity Masterchef at the moment.
 
Today I am trying to password-protect a directory in my flash drive. Apparently I can just copy over the desktop version of TrueCrypt I already have, but this is somewhat unwieldy because apparently it needs administrator permission to run on systems it wasn't formally installed in.
Not a huge deal, since I have admin access on the computers where I want to use the drive, but it's six more seconds of clicking permission approval dialog boxes than I would prefer
I like how the suffle guy edits in a passive aggressive message instead of improving his question
Doesn't he know that we are a fickle and proud people? He's the one asking for a favor here.
 
@JRichardSnape you're making my and @tristan's star hegemony start to crack
 
It is quite impressive. "I'll just put a few bits in capitals, that'll throw them off" I imagine her thinking.
 
user559633
1:06 PM
I like to imagine he's an increasingly agitated natural language bot. Am I failing the turing test? Repeat message with capitals slowly and more frequently.
 
@RobertGrant don't worry - it'll wear off.
I found a bot with 1000+ rep today. Quite impressive, I thought. Kept dumping IRC commands in chat, though, which is a bit of a giveaway
 
user559633
I'd be interested in seeing the source for a bot like that
 
@holdenweb Did it use TeX or perhaps Troff?
 
By the way: Batman Arkham Knight is awesome so far.
Once the power came back on.
 
@Bob yeah I've heard fantastic things.
 
1:12 PM
Before that it was more Batman in the dark with no sound
 
Thanks for the update!
 
The only downside is the batmobile fights are a little lame compared to other stuff, but they're still reasonably cool
 
@tristan TBH - I think the rep was probably gained by a human operator.
 
I’m in one of these situations where I just stare at my code for half an hour…
 
user559633
@poke in confusion, awe, anger?
 
1:14 PM
Maybe it will fix itself.
 
It surely will.
 
Cosmic rays could flip those bits at any moment.
 
A butterfly could flap it's wings then fly over to your keyboard and debug it for you.
 
I didn't even type that last message - cosmic rays just happened to activate the circuits in my keyboard in the exact right order. See? Easy.
I didn't type that last one either...
 
@Ffisegydd Unfortunately, the windows are closed.
 
1:16 PM
Oh boy, this is getting out of hand.
 
@Kevin do you even exist?
 
@Kevin You mean out of cosmic rays?
 
Yes to both, probably.
 
cabbage
 
Hey up PM2
 
1:20 PM
Why when printing unicode character it shows codec cannot encode character
But not when tying just the argument
 
Python 2 or 3?
 
i.e)print (a) produces error
python 2
a dosent produce error
 
Can you put together a MCVE?
 
(Are you doing from __future__ import print_function?)
 
No normal print
0
Q: "UnicodeEncodeError: 'charmap' codec can't encode characters" when trying to parse .xlsx by openpyxl

Vadim Tikanov--- update --- I think this console log nails the issue, however it's still not clear how to fix it: >>> workbook = openpyxl.load_workbook('data.xlsx') >>> worksheet = workbook.active >>> worksheet['A2'].value u'\u041c\u0435\u0448\u043e\u043a \u0434\u0435\u043d\u0435\u0433' >>> print worksheet[...

 
1:22 PM
Hi @PM2Ring
 
I get errors when I try to print unicode because my console doesn't support unicode. Maybe you have the same problem. Try using a different console.
 
@JRichardSnape :) Hi Richard. I wonder if suffle guy will get my hint...
 
It was from this question but I too faced this problem back a while ago
But used .encode("utf-8") to evade from it
 
@PM2Ring I hope so. Really trying to help her help herself, but maybe difficult. If my suspicion is right - probably 14 year old just wants to get GCSE coursework done...
 
1:25 PM
Incidentally print a and a produce different output because they execute different methods to determine what data to display. The first calls a.__str__(), the second calls a.__repr__().
Or, wait, does it? Sigh.
 
@Kevin ha ha
 
Pretty sure print uses __str__ and just a uses __repr__
 
Yeah, forgot those 'scores.
 
@JRichardSnape Maybe GCSE. But I suspect English is not Bethan's 1st language. OTOH, I guess the spelling problems could be due to dyslexia.
 
"my console doesn't support unicode" - are you using a PDP-11 or something ;)
 
1:27 PM
What is it with python 2 and unicode sighs
 
@Ffisegydd Yep.
 
@JRS he actually wrote his own console using KevinScript and well...
 
:D
yammety yammety yam. I should be writing me some PhD. Less interesting on here, please.
 
Listen, all I know is it tells me "see python.org/dev/peps/pep-0263 for details", and when I go to that page for details, it doesn't actually tell me how to fix it.
 
@VigneshKalai Python 2 strings are byte strings, Python 3 strings are Unicode strings. So if you want to do Unicode stuff in Python 2 be prepared to get your hands dirty. :)
 
1:30 PM
yeah as of now not dealing with unicode
 
Googles sqlalchemy.orm.exc.DetachedInstanceError. Finds sqla docs on it that say "An attempt to access unloaded attributes on a mapped instance that is detached." Cries.
 
#!/usr/bin/python
# -*- coding: utf-8 -*-
message = "all rights reserved © Kevin Kevinson"
print(message)
#result: all rights reserved ¬ Kevin Kevinson
This is why I don't Unicode.
 
This is why I don't Unicode Python 2 :P
 
Ok, let's try it in 3... SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa9 in position 0: invalid start byte. Much better.
 
In [3]: message = "all rights reserved © Kevin Kevinson"

In [4]: print(message)
all rights reserved © Kevin Kevinson
 
1:37 PM
Wow, I can't even paste that © into command prompt
 
Now this is the most debatable thing python
 
PowerShell?
 
Oh, here's the problem. Notepad++ wasn't in UTF-8 mode. I'll just switch over, and... UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in position 20: character maps to <undefined>
I think after three cryptic errors I'm justified in sticking with just ANSI forever, yeah?
 
Of course, unless you want to eat soufflé.
 
@Kevin count me in
 
1:39 PM
é is actually in ANSI (on my machine at least). ordinal value 130.
 
Curses!
Wait isn't ANSI 128 chars? Or is that ASCII?
 
ASCII is the littler one, yeah
 
@Ffisegydd doesn't help, and neither does changing the codepage it seems
 
Weird. I was just using ipython in PowerShell. Win7.
Py3.
 
Maybe ipython does magic
 
1:43 PM
Bother -_-
 
Ok apparently I'm using "code page 437".
 
No I can type it into PowerShell too. Clearly I'm just a better human being than you Bob.
 
It's got it all. Sideways T shapes. playing card suits. two smiley faces.
Everything you need.
 
Yeah the paste doesn't work into the command prompt
 
Kevin, does this work:
 
1:44 PM
Well I pasted it too.
 
message = u"all rights reserved \xa9 Kevin Kevinson"
print(message)
 
Nah, same UnicodeEncodeError as last time.
I'm beginning to suspect that I installed Python wrong...
 
FWIW, your original code works for me in the KDE editor kate, if the file's saved with the encoding set to utf-8.
 
For me it is working in canopy
 
44
Q: Python, Unicode, and the Windows console

James SulakWhen I try to print a Unicode string in a Windows console, I get a UnicodeEncodeError: 'charmap' codec can't encode character .... error. I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python auto...

 
1:46 PM
How about
message = u"all rights reserved \xa9 Kevin Kevinson"
print(message.encode('utf-8'))
 
Hey, it didn't crash! b'all rights reserved \xc2\xa9 Kevin Kevinson'
 
ooh, I got past 5000. That gives me the somewhat dubious "privilege" of doing more reviewing, apparently.
 
I guess I should mention that you have to set the encoding of your console to utf-8 as well...
 
Is... Is that a thing
 
Congrats, Richard!
@Kevin 'Fraid so.
 
1:49 PM
@Kevin chcp 65001 magic
 
Yeah I tried that; nothing.
>>> message = u"all rights reserved \xa9 Kevin Kevinson"
>>> print(message.encode('utf-8'))
b'all rights reserved \xc2\xa9 Kevin Kevinson'
Sweet
 
Same output as last time
Do I still need this # -*- coding: utf-8 -*- line that I don't know what it does
 
Oh, but this worked!
>>> message = "all rights reserved \xa9 Kevin Kevinson"
>>> print(message)
all rights reserved © Kevin Kevinson
 
>>> message = u"all rights reserved \xa9 Kevin Kevinson"
>>> print(message)
all rights reserved © Kevin Kevinson
 
You also need a truetype font - e.g. Lucida console. You obviously have that bob
 
1:51 PM
Yeah I also switched to Lucida console for this
@Kevin did you do chcp 65001?
 
Interestingly, that A-circumflex copyright that I just pasted in appears like a lopsided table on my actual console.
 
Note - chcp 65001 is pure necromancy - do not let it go beyond this room ;)
 
@RobertGrant Yes.
 
@Kevin That magic line tells the Python interpreter that your source is encoded with utf-8. You need it if you've told the editor to use utf-8 encoding. You don't need it if your editor's using ASCII encoding & you're doing unicode stuff using escape sequences.
 
Let me also switch to Lucida...
Woooooooaaaaaah all rights reserved © Kevin Kevinson
 
1:54 PM
Weird that your font has that character, and still breaks
 
I think you left the \xc2 in somehow (i.e. output of encode()) - that's A circumflex
 
Finally Kevin gets the copyright he deserves.
 
Ok, so to use Unicode I merely need to 1) use the magic chcp 65001 command 2) switch to this ugly font 3) only use Python 3 because forget this noise in 2, 4) switch the encoding in Notepad++ if I want to actually have unicode chars in my source 5) use the magic # -*- coding: utf-8 -*- line. So easy.
 
I guess we should all use a Mac really. Have I ever mentioned the pdf layer... ;)
I'm expecting someone to say "use Linux" soon, too. Works right off the bat on a humble Raspberry Pi, Python 2.7, raspbian console
 
Aaand cmd has crashed for the second time in my life.
 
1:58 PM
Woo hoo OS X!
 
Whoever did that, starred in the correct order. Well done!
 
def put(s):
    print type(s), repr(s)
    print s
    print s.encode('utf-8')
    print

put(u"all rights reserved © Kevin Kevinson")
put("all rights reserved © Kevin Kevinson")
<type 'unicode'> u'all rights reserved \xa9 Kevin Kevinson'
all rights reserved © Kevin Kevinson
all rights reserved © Kevin Kevinson

<type 'str'> 'all rights reserved \xc2\xa9 Kevin Kevinson'
all rights reserved © Kevin Kevinson
Traceback (most recent call last):
...
print s.encode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 20: ordinal not in range(128)
 
Filipino Longaniza and fried eggs at the breakfast club today, folks.
 
Everyone on this conference call sounds like a robot.
all tinny echoes and whatnot
 
2:13 PM
Modulate the parameters.
 
Are you using cans and string?
 
user559633
Are you speaking to robots?
 
looks for "parameters" dial on phone
If the other participants are robots, that's not the cause of the voices, because one of them is two rooms away from me and they sound normal over the air but weird on the phone.
 
Maybe they don't use their synthetic voicebox for phone calls
 
So you can actually compare the voices simultaneously, eh?
 
2:16 PM
Yeah, it's actually a little disconcerting because the phone lags behind reality by a tenth of a second
 
Maybe they're jacked in, and all the manufacturer could afford was a $1 voice chip for that
 
Maybe your phone is the Beats brand?
 
My coworker suggests that it's my boss' fault. I accept this theory.
 
Your boss approved the voice chip budget?
 
But you didn't fail to reject the simpler hypothesis that your coworkers are androids.
 
2:21 PM
So...he did reject it?
 
modulates his own parameters yeah, he leapt to that conclusion...
 
I rejected "my coworkers are androids" because they sound normal IRL. I have not rejected "my coworkers are androids that connect directly to the phone network but their speech synthesis software doesn't work perfectly in that specific context even though it's fine when used on their default speaker" but I don't consider that simpler
 
A fine example of Kevin's Razor.
 
What about "my colleagues' phones are androids"?
 
I have an Android phone. Is colleagueness reflexive?
 
2:25 PM
No :)
Related thought: either you or your phone is an android
 
Is it eether or eye-ther?
 
Maybe they're all on Apple and are using iSpeak, the new amazing voice protocol that only Apple users can fully make use of
 
@Dracunos either is fine with me
 
@Dracunos I say eever.
 
Same, mostly
 
2:26 PM
@Kevin Recursion limit reached
I broke my application, and I'm not sure how yet. Bleh.
Rbrb :)
 
Speaking of recursion, why do so many newbs try to use recursion in their input routines? Here's a recent example. It seems bizarre to me. Where do they learn this crap???
 
Recursion is the solution to every problem
 
They probably googled "Learn how to program" and were directed to a SICP shrine.
 
@Dracunos Recursion is the solution to recursion.
 
I find it slightly amusing that he has no qualms about using recursion, but didn't want to use return because he thought it would "completely break the function"...
 
2:32 PM
(…is the solution to recursion is the solution to recursion is the solution to recursion is the solution to recursion…)
 
There's a reason I specifically added a section on why recursion is a bad idea in my "asking user for input" megaquestion
 
I don't think I've ever actually used recursion in a real problem.
 
@QuestionC Ah. Good call. FWIW, I'm not anti-recursion. But I certainly try to avoid it (especially in Python) except where it's appropriate to the data structures you're handling.
 
Make a recursive binary search
 
@MorganThrapp it's useful in some cases, see this: stackoverflow.com/a/30316760/541136
 
2:36 PM
I think your hint helped the suffler, @PM2Ring - they've managed to find the answer themselves and "hope to get better at asking questions on this site"
 
Define 'real'. You can't write anything that parses (like an infix calculator) without some kind of recursion.
 
FWIW, I actually used recursion today, in a program that finds loops in a connected graph. It took me a little while to get it right - the recursive function is a generator, which makes things a little bit hairier than normal. :)
 
I'm sure it has uses, I've just never had one apply. :P
 
@JRichardSnape Excellent
 
2:49 PM
FWIW, here's the function. `neighbours` is a dict of sets. If node `a` is connected to node`b` then `b` is in `neighbours[a]` and `a` is in `neighbours[b]`.
def find_loops(neighbours, looplen, a, chain):
    tail_len = looplen - len(chain)
    if tail_len == 1:
        for b in neighbours[a]:
            if b == chain[0]:
                yield chain + [b]
    elif tail_len > 1:
        for b in neighbours[a]:
            if b not in chain:
                for loop in find_loops(neighbours, looplen, b, chain + [b]):
                    yield loop
 
I shouldn't have eaten that pastry
Does a honey/cinnamon bun count as a pastry?
 
Hah. The Met Office has declared a Level 2 Heatwave Warning for the UK, saying that temperatures could reach 32C (89.6F).
 
I actually laughed at that.
 
@Dracunos Yes.
 
That's funny
 
2:56 PM
To be fair, that is really, really hot :P
 
Fizzy, will people die?
 
If it's 80% humidity
 
@Aaron joking about UKs temp vs other countries aside, yes some will probably die. Elderly and such.
Gotta remember what while it may seem not very "hot" to you, we don't have houses built to withstand heat regularly, I don't know anyone that has AC or anything.
 
It was in the 100's regularly in Florida, but we had AC everywhere.
 
It'll probably be over a hundred indoors, especially if you have a lot of electronics
 
2:58 PM
Plus people just aren't used to it.
 
You guys will be the first to go when the giant solar flare hits
 
(Some) shops may have some AC.
Hey up DSM
 
DSM
Cabbage, all.
I could click and find out what "find a 4th" means but I like the mystery.
 
Did Christopher Lee die?
 
Yeah a few weeks ago.
 
3:01 PM
I'll admit that 30°C is rather warm, but we had a few summer days this year that got to 40°C. It's now getting into winter here, and people are complaining when it's under 20°C.
 
@DSM I assume our barbershop triplet is looking for one more member.
Just can't quite get that harmony otherwise
 
We're quite lucky in UK, we don't tend to get horrendous summers (a few days of the year it may reach 30C) and we don't tend to get horrendous winters (a few weeks it'll be below -3C)
 
OMG, he was 93, astonishing.
 
DSM
We need a name for a Python-related band which is slightly corny-funny when you first hear it but then becomes less amusing with repetition. (#simpsons). Maybe "Zen Scales"?
 
He didn't look it.
 
3:04 PM
I can cope with 30°C, but I don't do well when it's colder than 15°, especially if it's windy.
 
DSM
14-15° and windy is my preferred arrangement!
 
Oh hey, here's my function to determine the size of a Python object (with its contents). Help me improve it and I'll credit you:
 
@Aaron would you mind throwing that in a dpaste.com link instead? We generally ask that code greater than 12 lines is linked.
(Or pastebin or Gist or your-text-host-of-choice)
 
I'm blocked at work, maybe gist
 
Or, you know, leave it in the answer of yours that you already linked
 
3:06 PM
@DSM I have a friend who lives in Melbourne who likes 15°C and colder. She had to live in Brisbane for a couple of years for university - she hated it. She called it Brisbain-marie.
 
went with davidism's suggestion.
 
Hi, Davidism.
 
@Ffisegydd Got a friend here who researches exactly that (building design vis-a-vis deaths due to heatwave). Surprisingly many at surprisingly low temperatures.
 
DSM
@JRichardSnape: do you mean surprisingly many at low-but-still-hot temperatures?
 
@JRS British buildings just aren't designed for it, you struggle to get a through draft, it's hard to avoid the sun heating a room through window exposure.
 
3:09 PM
yes - i.e. in low 30s. Not nearing absolute zero or anything ;)
 
DSM
When I was in London I spent more time in the office than I would have if it weren't air-conditioned and my flat not..
 
that's right. Not to mention the urban heat island (c.f. London), relatively high thermal mass buildings (once they're hot, they stay hot) and a few other things. It's a potential real problem
 
Some of the older houses here in Australia were not designed well for the climate - I suspect that they were designed in the UK & built here without modification.
 
I didn't care for that part of European life.
Of course there's a lot of places in NYC without cooling in the summer.
 
Having perfected my virtual-card gambling scheme from yesterday, I now possess in MTG Forge at least one copy of each member of the "Power Nine", the most potent and valuable Magic cards. And yet, despite my impressive virtual fake collectible card collection, I feel empty inside.
 
3:11 PM
and, somewhat counter-productively, the energy efficiency measures we implement which are in general good (more insulation, solar heating etc) can make things worse in the heat.
 
I know - I need four of each card. A Power Thirty-Six, if you will.
 
@Kevin The 4 black lotus should only run you ~6k or so.
 
Then, finally, I will be personally fulfilled. And this time I mean it.
@MorganThrapp The Forge economy is rather flat. Black Lotus is worth a buck twenty because it's a rare.
 
@Kevin Oh, I missed the Forge part. What is Forge?
 
A fan-maintained computer game that seeks to emulate actual Magic.
 
3:13 PM
@JRichardSnape Yeah. Insulation can keep the heat out to a degree in the early part of the hot season, but eventually the building heats up & takes ages to cool down.
 
@Kevin Oh, nice. I used xmage for a bit, but I'll have to give forge a shot.
 
I've been quite addicted to it, but I may be free soon because I've been gaming the system as hard as I can for the last three days. Once I transcend the rules of a game, I get bored with it.
 
@Kevin I just miss my infinite squirrel deck.
I haven't played in years, but I've been wanting to get back in to it.
 
Once I get the pieces for my 0-land Charbelcher deck, I should be able to consistently win on turn 1, and thus lose all interest in continuing.
 
@Kevin Holy power creep. :P
 
3:17 PM
@Kevin what is "actual Magic"
 
Well, the deck will be 95% cards from Alpha Edition, so it's kind of the opposite of power creep
 
Huh. That deck is really interesting. It seems like if you don't pull the exact opening hand you need, you lose.
 
Holy "stage where the game devs had a poor grasp of power balance"
 
cbg all
 
@MorganThrapp My friend actually has the deck IRL. Your perception is mostly accurate.
 
He can stall for five or so turns before his opponent can kill him, but if he doesn't get the pieces by that point, he just scoops
 
Is that roughly it?
Serum powder is really weird.
 
Yeah, minus the Spellbooks and plus Tinder wall, land grant, and one taiga
I guess it's technically 1-land belcher
 
Yeah, the spellbooks seemed weird to me.
 
rhubarb
 
3:21 PM
Why not run more cycle cantrips?
 
Street Wraith is the only cycling card that costs no mana. And since so much of the mana base of the deck is one-use-only, you don't want to permanently spend your most valuable resource to draw an unknown card
 
Ahh, gotcha. That makes sense.
 
It might be worth it if it was an especially potent draw spell, like ancestral recall
Which is what my belcher variant will be playing.
 
Though, by the time you can run alpha cards, why not just run timewalk. ;)
 
My decklist is like: every artifact ever made that produces more mana than it costs, ancestral recall, timetwister, demonic tutor, 1 charbelcher
 
3:24 PM
Fourth generation was where it was at.. Ever since then it has gone downhill, adding new stuff just to make people buy newer more powerful cards.. psh
Back when channel fireball was still legal
 
I don't want to run time walk because you get a ten dollar bonus for winning on turn 1, and taking an extra turn technically puts you in turn 2
 
I have finally hit upon a single, nominally necessary use-case for pass
 
@Kevin Wait, you can actually win money with Forge? Alright, I really need to give it a shot.
Can you give me the link?
 
It's fake money. "credits".
 
Ahhhh, okay.
 
3:26 PM
@AaronHall Which is?
Empty exception handling?
 
@Dracunos Heh, from a certain perspective you're not wrong
 
nah, just use a docstring for that, it's way better, ok, that might be another...
 
DSM
Ehh, ick.
 
user559633
@AaronHall Gandalf talking to things that aren't balrogs?
 
@MorganThrapp www.slightlymagic.net/wiki/Forge, last I checked
 
3:28 PM
@Kevin Cool, thanks.
 
I was thinking you meant: class MyException(Exception): pass vs `class MyException(Exception): 'useful documentation...'
 
When I played Magic, it was like 7th or 8th I think, and it felt like cards were getting weaker/slower. Stuff like shock vs lightning bolt.
 
Yeah, other than a brief reappearance in M2010, lightning bolt has been retired
Although there's no official word that it's gone forever
 
if you're following the principles of structured programming (preferring a single exit point for a function), also trying to keep it flat(ter), avoiding nested conditions, and want to bypass control flow on a condition (which semantically-ish works for except: pass too) then pass is the optimal way to go. Or so I think.
 
user559633
@AaronHall Example code?
 
3:31 PM
see my recursive function again. :D
 
There was this one pc mtg game where you actually didn't have to sink hundreds of dollars into booster packs and decks and crap, you just paid for the game itself and you would play mtg against AI and collect cards ingame as you played
 
@Dracunos Oh, the one where you walked around the map and monsters would run up to you and duel you?
 
Perhaps you're referring to Shandalar.
 
It had diablo looking graphics if I remember correctly
 
YEA, that was the bomb.
 
user559633
3:33 PM
oh, the link above. maybe later :)
 
Let's change the room name to "Python The Gathering." "The Round Table" or "Camelot" would work too, for 'tis a silly place.
 
You can play against those decks in Forge.
 
@AaronHall I suspect that it's impossible to define a noop function without pass, which would be a strictly necessary use of pass.
I had that come up during lambda shenanigans.
 
def foo(): 'doc the func...'
 
@AaronHall Ok, I'm done now ;-)
 
3:35 PM
No, do continue. Dueling monsters?
 
Let's talk about the pokemon card game now
 
DSM
When testing raw iteration speed I think for i in range(100): pass looks much better than for i in range(100): "syntactically valid but conceptually confusing".
 
It's a surprisingly robust game
 
Or Hearthstone, the new kid on the block.
 
@DSM but when would I do that?
 
3:37 PM
It is said that the GBC pokemon card game is excellent.
Yes, the video game based off the card game based off the video game.
add in a "based off the cartoon" somewhere, although I don't know the precise chain of causality
 
It's probably not even desirable.
 
gameboy color?
 
Yes
 
DSM
@AaronHall: I do it often to prove that people are worried about things which they needn't be.
 
ok, fair enough, have at you.
I'm not sure that made sense.
 
3:39 PM
Actual Python chat: I use pass as the body of an otherwise empty class definition, which is occasionally useful if you want to staple arbitrary attributes onto an object.
 
@Kevin Oh yes. The Pokèmon Trading Card Game game for GBC was amazing.
I loved it so much
 
@Kevin docstrings
 
I'll have to... acquire... A copy of the game for my upcoming vacation
 
class NameSpace(object):
    '''stick arbitrary names on me, I don't mind!'''
 
DSM
I really don't like the way that looks.
 
3:40 PM
@Kevin from types import SimpleNamespace
>>> x = SimpleNamespace()
>>> x.lets = 'put'
>>> x.some = 'attributes'
>>> x.on = 'this'
>>> x.object = '!!'
>>> x
namespace(lets='put', object='!!', on='this', some='attributes')
>>> vars(x)
{'some': 'attributes', 'lets': 'put', 'on': 'this', 'object': '!!'}
 
I love it. It's simple. It's documented. and types is hacky anyways. :P
 
I knew that functionality existed within the standard libs, but I can never remember where.
 
“and types is hacky anyways” [citation needed]
 
Empty classes have the benefit of not requiring me to remember a module name :-D
If I ever need attribute stapling for a serious project, I promise to do it the right way.
 
Empty classes for this purpose have the disadvantage that they don’t share a type, and are generally throw-away types which is bad for code maintenance.
 
3:43 PM
hackfest^^
optimal? sure, but let's see the sausage being made...
 
That is your opinion. Also, it’s not really hacking. Also, it’s Python 2.
 
Gotta go for a while, coworkers are switching out the router.
 
DSM
Nothing like some midday rhubarb as a snack.
 
which I may point out doesn't even have SimpleNamespace
 
@AaronHall That’s because you are still stuck in the past.
 
3:47 PM
2.6.8 to be precise...
 
That's odd. There's a "Kevin" making references to psychic debugging, but on C++ questions.
 
DSM
Is it pseudoKevin (the other Python Kevin, but not ours) or a different Kevin entirely?
 
cbg
 
so the moral of the story is to use docstrings instead of pass for empty class and function definitions.
 
DSM
3:50 PM
If by "moral" you mean "opinion of one Python programmer", then yes. :-)
 
you guys read the book Joel on Software?
 
@AaronHall Yeah, I've read it.
 
@AaronHall I dislike that… I would still put an explicit pass on it.
 
Well there goes my logic for superior moral authority...
 
@DSM There are too many Kevins on Kevin Overflow.
 
DSM
3:53 PM
itertools.repeat(["Kevin"])
 
I liked the Joel on Software blog, but I feel that moral superiority might be a bit much for what's essentially advice about managing time/expectations/complexity.
 
Heh.
 
@QuestionC I enjoyed the book. It's just a collection of essays he found useful/interesting.
 
My point was to argue that I had the moral high ground. Not that it was a really cool book and all.
 
Thanks for clearing your moral high ground up.
 
3:56 PM
wields Narya and Glamdring "You shall not pass!" Strikes bridge with staff.
 
http://livecoding.tv doesn't work but http://www.livecoding.tv does. This saddens me.
 
@AaronHall And what happened afterwards? The bridge collapsed. That’s why you let things pass.
 
Now if the pope/dalai lama/high priestess of Corellon wrote a book about software design, then I think you might have a case for moral superiority.
 
@poke applause
 
DSM
Okay, I have to admit using "shall not pass" in this sense is kind of cute.
 
3:58 PM
Gah. This website asks me for my "programming level" and says beginner, intermediate, or expert. But I want to say 4/5 D:
I want to be an advanced intermediate, or a mini expert :(
 
Expert it is.
 
DSM
I usually just go with "intermediate".
 
Probably should go with intermediate.
As I'm not an expert (round down and all that)
 

« first day (1718 days earlier)      last day (3225 days later) »