« first day (1286 days earlier)      last day (3656 days later) » 
01:00 - 18:0018:00 - 23:00

6:03 PM
My first answer in a while... mostly ignoring the OPs code though :p
Ignore that - didn't notice the while True bit... sighs
Actually no... they're only repeatedly asking for a num sym num input each time... so should be okay
 
I guess I should get my whiteboard and an UML reference. Somehow it seems right to use UML for modelling the OData framework.
 
That guy needs some code review! firstNu and secondNumber. what an... interesting... naming system
 
hrmph. This is odd. I take a zipfile, and then when it's done, I use shutil.copy2 to put it in a directory. However, when I do that, it doesn't let me expand it
 
Yes! Why isn't he using salad names!
 
@JonClements True, everyone must follow the Cabbage! I am going to find a way to integrate the way of the cabbage into the framework
 
6:07 PM
@Terfin the cabbage is in everything - it's already part of the framework!
 
@JonClements Is the cabbage all around us?
 
It is around us, and within us... it is omni-present
 
@JonClements So the universe is divided into 3 types of cabbage. The Cabbage, The Anti-Cabbage and The Dark Cabbage
 
Just take the dialogue of Star Wars with s/force/cabbage
 
@DSM I put in a section at the end about common antipatterns. Are those what you had in mind?
 
6:12 PM
Like what you did there... The redundant Use of Redundant input Statements - redundant use of redundant :)
 
Well then
 
Yeah, I put a little humor in there. I think the success of my second most popular answer is due to the smartass footnote I ended it with.
I think readers like a little levity :-)
 
At the risk of being shot...
for data in iter(lambda: raw_input('BE LOUD DAMN IT!'), None):
    if data.isupper(): break
 
haha, wonderful
Pretty much zero chance that the intended audience will understand it, though
I see that I messed up the capitalization in the The redundant Use of Redundant input Statements... Man, title case is hard
 
If you folk got time and you want to mock me, feel free to view my effort to implement OData. There is no codebase yet, only writing requirements and specifications, later on moving to design and modelling and only finally into the actual coding.
Seriously, if you find anything wrong, feel free to comment it on the relevant issue, or spank me here, I will be grateful.
 
6:19 PM
I don't understand the subject matter, but the formatting is nice :-)
This is usually the point where I'd upvote you, but, er... github seems to be missing that button...
 
I really want to get this thing going, the only partial implementation of OData in Python I've ever found was odata-py and it has been sitting unattended since 2011...
 
I like upvoting. It's like a secular version of "I'll pray for you". We both feel good about it, although it may or may not help solve your problem...
 
btw, the list of supported features is a very partial list, it should grow at least 3 times its current length, maybe even 10 times. OData protocol is a 300 pages long protocol.
 
@Terfin On the EDM page, you write: "Basically, this defines how should the dataset that the OData protocol works with look like." I think it would be more understandable as "Basically, this defines how the dataset that the OData protocol works with should look."
 
@Kevin Note taken. Thanks.
 
6:27 PM
@Kevin my version then:
def get_input(prompt, validator=lambda L: L, converter=lambda L: L):
    for result in iter(lambda: raw_input(prompt), None):
        if validator(result): return converter(result)
 
(might be nitpicky of me. But when I can't give technical criticism, I default to literary criticism :-) )
 
@Kevin Actually, I need that as well, since I am not a native English speaker
 
Then use as: get_input('enter name: ', str.isalpha, str.title)
 
@JonClements Needs custom validation failure messages, like mine :-D
 
OR: get_input('Number: ', str.isdigit, int)
@Kevin on come on, I wasn't here 7 hours ago :)
 
6:31 PM
:-)
Let's make the world's most bulletproof input validator, post it on Hacker News, and make a million dollars somehow.
Then we can link it on the community wiki post!
 
DSM
@Kevin: yeah, that's exactly what I had in mind, only better-written. :^)
 
@Terfin, some more stuff on the EDM page: I think 11. should say, "Support the creation of one instance...", and the MAY NOT in 13.a. ought to be bold
Or should it be MUST NOT? Is there a difference between "may not" and "must not"?
 
@Kevin I'm sure according to RFCs there's a difference :)
 
Does it say "You MUST use MUST NOT, and MUST NOT use MAY NOT"? Crystal clear, that :-)
But seriously. RFC 2119 doesn't mention "MAY NOT", so I guess it's not a keyword
 
@Kevin True, my bad, it should be converter into MAY instead
*converted
 
7:11 PM
Cabbage
 
Hi
 
@abhi cbg
 
heya @Hyper - long time no see - potato?
 
cabbage
easter week is serious business around here. Hence the absence.
 
Ooo... chocolate chip cookies... forgot I got those...
 
7:20 PM
Cabbage all
 
@IntrepidBrit cbg!
 
Greetings
 
... and salutations...
 
... and condolences
 
cbg @IntrepidBrit
 
7:22 PM
... and condolences
 
is confused now
 
@IntrepidBrit cbg
 
(well - more so than normal anyway)
 
@JonClements Don't be confused. Here have some Condoleezza Rice
 
(For being in my esteemed company :P)
 
7:23 PM
@Terfin I prefer basmati rice...
 
@JonClements Sounds reasonable.
 
Rice is good if you're hungry and feel like having a million of something.
--Mitch Hedberg
 
I just had burned rice. Not so tasty
 
I've burnt spaghetti before
 
rice with potatoes and butter.
 
7:25 PM
burnt potatoes?
 
only some of them
 
that's discriminating
 
I've also cremated a chicken
 
I know, I am feeling rather ricist
 
"Pollo Cremado", a local dish.
 
7:26 PM
Put it on at 12 for sunday roast, then went out and stayed at a mates overnight....
(quite surprised I still had a house actually)
 
Thou shalt not leave your house while cooking
 
@Hyper what a silly rule... what's the worse that could happen! :)
 
@JonClements There's a brand of ovens that turn off when the timer goes off. Perfect for drunk puppies :P
 
A truck could run you over
 
You made me hungry... I want pizza now.
 
7:28 PM
My oven doesn't even have a timer...
 
@Hyperboreus Pretty hardcore
 
@Hyperboreus Do you cook things on a car engine?
 
On a tin roof
preferably cats
 
@Hyperboreus Mind you, if you do that then the sun is its own auto timer?
 
It is indeed, but I don't know how to set it.
 
7:30 PM
It reminds me of a special day of the year, Fry an Egg on The Sidewalk day,
 
(anyone vaguely familiar with psutils?)
 
Around here, the egg would get stolen, before it is fried.
@IntrepidBrit Sorry, not me.
 
psutils... sound familiar for some reason, lemme look it up
 
(Just wondering how I retrieve the "keys" from the custom namedtuples. I'm starting to look through the source code)
 
can you put multiple configs on an app, if they all contain different keys?
 
7:32 PM
Ah yeah, I thought of using it when I had to develop a monitoring system for a cluster. But the project was abandoned in the middle.
 
My favourite faux pas was reporting my car stolen
 
Now seriously, sometimes I dream about a python with argument pattern-matching. Why do only functional languages have this neat feature?
That's discriminating, too.
 
(I don't want to try/catch for an attribute error, but I don't see an alternative)
 
@IntrepidBrit getattr with a default value ?
 
@JonClements Cheers, I'll probably do that.
 
7:40 PM
@JonClements Tracy Johnson is a hero to benefit suckers all over the world.
 
I think the benefits system is essential to any civilised country... it's just people like that, that really arhghghghg
 
Maybe it was a geographically limited agoraphobia which applied only to her neighbourhood?
 
Yes. It should be. Unfortunately, there are people who mooch off the system all over the world.
 
I think that benefits should cover the basics - Ie actual poverty. Not relative poverty.
 
well prison cells are pretty claustrophobic, so she should be alright now.
 
7:45 PM
My uncle told me the other day, about a contestant on The Price is Right, who lives off of disability checks. But she sure wasn't handicapped when it came to spinning the big wheel!
I concluded that she must have a disability that isn't apparent, like narcolepsy. There's probably a dozen unaired takes where she spins the wheel and plop, down she goes
My uncle did not appreciate my theory.
 
@Kevin I have encountered a couple of people who park in Handicap spots, but there's nothing wrong with them.
 
@abhi they're obviously blind to not see the disabled sign? :p
(but amazingly are still able to drive!)
 
Or too stupid to read pictograms
 
Well, not all illnesses are visible, of course...
 
In Pennsylvania, the law is that you may own a handicap license plate if your relation is handicapped.
 
7:51 PM
Are those hdanicapped parking spots reserved for people with movement impairing handicaps, or for disabled people in general? It is wheel chair sign after all.
 
However you cannot park in a Handicap spot if the relation is not with you
almost everyone who has a handicap tagged license plate FLOUTS this law
and there are absolutely no repercussions, since cops are too busy with other stuff.
 
I'd be worried if the cops followed handicapped cars around the place to compensate ;)
 
That would be all over the news
 
I'd be worried if someone driving a handicap plate car pulls an armed robbery at the local store.
 
Maybe they're flouting the law, or maybe they have early-stage multiple sclerosis, and it's a good day so they don't need their crutches, but still would prefer not to walk half the length of a parking lot. Not that I'm saying that happens often, but I'd prefer to not to take the chance by scolding them because they look alright
 
7:56 PM
hmm. give them the benefit of doubt is what you're suggesting.
 
Wow, 32 people in the room today... we rule :p
 
Yaay!
 
Yep... We've even talked about Python two or three times today.
 
What??? No quick questions for anyone?
 
@JonClements Ofc we rule. One cabbage to rule them all, one cabbage to find them. One cabbage to bring them all and in the salad bind them.
 
8:00 PM
In that case, I'll ask. Is anyone using python to build mobile applications?
 
Lots from Crowz, but since I never know the answer, I don't count them
I figured Java and Objective C have the stranglehold on mobile
 
@abhi Are you relating to server side development, in regards of mobile apps?
 
I have heard that this is possible now with the advent of SL4A?
 
Server side: yes. Wsgi backend for android apps
 
No. I am talking about SL4A
 
8:02 PM
oh
 
Scripting Layer for Android (SL4A)
 
Ahhh yeah I heard of that
Never had the chance tbh
 
I heard of that too (four seconds ago)
 
SL4A -- supports Python, Perl, JRuby, Lua, BeanShell, JavaScript and Tcl
I have just heard of it.
Would be curious to know if anyone's actually done that.
 
And I just googled it. It would be great to get rid of Java on the client side
Having to program in Java is like a hammering with a saw.
 
8:04 PM
java has its uses. the most relevant use of java is to help students understand C++ better.
 
I am not that much of a client sider tbh, so never put the effort into researching that. I only do HTML5 apps with Phonegap when it comes to mobile and I have to do client side, and usually not for apps with extreme visual effects
 
@abhi So true and so sad
 
haha.... true. same with C# I guess.
 
No. C# was created to stem the flow of programmers to java from visual basic.
 
We have various mobile apps for android and the client dev takes ages compared to the server side. And since the advent of fragments in the API, things got... bizzare
 
8:06 PM
If we mentioned C++, what do you think of QT for mobile, in Ubuntu Phone?
 
"The cyclops's guide to stereovision"?
 
Still retailing for $35.99
Cannot believe this. I wouldn't spend the time to read it, if it were free.
Programmers who already know C++ may be able to pick up Java speedily, since the two languages share many features. But for those weaned on other popular languages, particularly BASIC and Visual Basic, the transition to Java can be a lot more difficult.
The Visual Basic Programmer's Guide to Java teaches Java from the perspective of an experienced VB programmer, noting important differences in syntax between the two languages, introducing the principles of object-oriented programming, and explaining Java's AWT (abstract windowing toolkit) components.
 
We got a MS SQL Server 2000 user guide book sitting somewhere around the office.
 
Me neither, mostly because I don't know visual basic.
 
8:08 PM
I started with Visual BAsic a long time ago. 1998
Then I transitioned over to classic asp. then databases - sql server and later oracle.
 
I started with Borland Pascal. Those were the times...
 
now I am doing sql-server and c#.
 
My office has a Windows 95 user's guide. In Japanese.
Better hold on to that, might need it...
 
Borland Turbo C was the greatest.
 
This was what I did immediately after Borland Pascal
On my Atari...
Atari STE. You could actually expand the RAM from 512 k to 1 M with a soldering iron, some ICs and some RAS/CAS logic.
 
8:10 PM
@Hyperboreus screams as he has high school flashbacks of Pascal
 
@IntrepidBrit Sorry about that.
 
I wish I found a job in Python. Sadly in here, Python is not as popular... companies actually still use Perl for system tasks and devops, not to mention products... Python barely sees light as a product development language in here. Only in a very few startups... everything is MS oriented around here.
 
@Terfin Where is here?
 
Israel
 
Strange, our HR never find (able) python developpers around here (GT, LA).
And then you get people who say they have 100% skill in python, and hearing that you don't even want to interview them anymore.
 
8:13 PM
I work for a consulting company, 90% of the developers work with C#.NET, a few work with Java. One or two work with Ruby and I am trying with all my might to get Python into the toolbox, but the market isn't ready for that.
 
@Hyperboreus where is GT, LA?
 
Guatemala, Latin America
 
Oops, I was thinking Los Angeles or Louisiana.
 
What does 100% Python even entail, really? Do you need to know Django to qualify? Do you need to name every builtin module?
 
8:14 PM
@Hyperboreus Ah it's fine ;).
 
The ability to produce fairly working website I suppose.
 
What does 100% in any language or technology even mean?
 
that's the test we give here to developers.
2 hours and build a website.
 
@Kevin They know how to from future import john.connor
 
no validations required.
 
8:15 PM
practical.
 
just a basic 2 pages.
 
@Terfin It means the applicant overestimates its own capabilities and nothing more. I would never be so proud as to say that I am at 100% at anything. Not even breathing or sitting.
 
what we are interested in knowing is if the person is able to configure stuff.
 
Step 1. Go on SO and make a post, "how do I make a basic 2 page web site?"
 
programming can be learned on the job.
but most of our time is spent on configurations / permissions / crap like that.
 
8:16 PM
@abhi My words exactely. Our last developper we recruit right out of college (age 17). He is motivated and not full of BS.
*recruited
 
"programming can be learned on the job" seems optimistic to me... I've been learning to program for 15 years, and I'm still not satisfied
 
Yeah, one of our latest recruits is a 21 YO guy, he went to develop for some startup... they make him work from 8 AM to 2 AM.
 
@Kevin I would even say: "Programming can not be learned but on the job"
 
guys I'm failing hard.
 
DSM
I would tend to put it the other way: a list of things to remember to check regarding permissions can be learned. The sort of programming skills that I can't teach -- at least not in the available time -- are the types of things I review candidates for.
 
8:19 PM
We all are, Crow, we all are.
 
@Crow This too shall pass
 
Failing is the only way to learn. If you did everything right, you would gain nothing!
(Except for money, job security, etc)
 
@Terfin Or learn from other people's failures. But humanity never does that for sure.
 
@Kevin This is completely true. most people I've had the pleasure of recommending to hire turned out to be useful programmers.
I use the term usefuL in the sense the business was able to move forward with the programs that these guys churned out.
 
@abhi Well, this is about as good as it can possibly get...
 
8:22 PM
We're just tools to solve problems or reduce pains faced by others, notably the business.
 
wtforms is weird.
 
We are just a machine to convert coffee into code xD
 
Sometimes we reduce our own pain, by writing clever tools that will allow us to turn out code faster.
 
Compilers?
 
@Terfin I have given up coffee for a month in favor of coconut juice
I am going to load myself on coconut juice this month.
 
8:23 PM
wtf is "coconut juice"? You put a whole coconut in the juice extractor?
 
@abhi Do you produce coconut flavored code?
 
Its a toxins cleaner diet.
 
that is all gluten to me
 
Coconut water is what I meant.
 
ahhh
 
8:24 PM
there's no such thing as coconut juice, to be honest.
There's coconut milk and there's coconut water.
and there
 
I am just imaging your office: A pile of coconuts, a machete and you drinking your coconut water.
 
and there's coconut oil.
 
Ah, in cans...
 
Which I love to have by the tea-spoon.
2 teaspoons of coconut oil every day.
 
Around here the coconut milk comes in coconuts and not in cans
 
8:25 PM
This is the brand I am drinking currently.
 
In my live, I haven't seen packaged coconut water. lol. Everday you learn something new.
 
With which you oil your coconuts.
 
I hadn't seen packaged coconut water either, till a company called Dabur introduced it in Mumbai.
just your nuts not coconuts. :)
 
i see
 
8:28 PM
This toxin cleansing is serious business.
 
We should produce cabbage juice.
 
A lot of spas charge a lot of money to do that.
I am doing it on my own.
So no coffee for a month.
and no animal fats other than fish.
but I haven't had any fish this month.
 
They say that bananas have been cultivated from their wild forms to be more palatable for humans to eat. I wonder if we'll ever do the same with coconuts. A thousand years from now we'll have a coconut that fits in your hand, whose shell you can peel off without a tool.
 
and no pain killers
 
8:29 PM
And they'll look back at today and say we're barbarians. They couldn't even get a coconut open! Haha!
 
Opening a coconut even today is a martial art...
 
That's the blade you need
 
Let's please get back on topic. Drop coconuts, talk about cabbage
Some cabbage with python:
 
So, how was your cabbage today?
 
Drop coconuts... But be careful where you do so, they can hurt!
 
8:35 PM
You know, for a room that is specializing in Cabbage, we should have a package named PyCabbage.
 
from PyCabbage import CoconutJuice
 
@Hyperboreus You must not! It is blasphemy!
 
i often wondered why blasphemy was pronounced without the ph sound in there.
 
I just downloaded the sources of PyCabbage, but I get a build error: Unresolved dependency libcabbage (>=42.1.0)
 
I promise I will leave a tribute to SOPython on the Python3.4 OData implementation.
Did you do sudo apt-get install libcabbage-dev?
 
8:45 PM
@Hyperboreus you recruited a 17 year old?
Wait, out of college?
like a dropout or did he already have a degree?
 
Seconday education ends here at age 17. Maybe college is the wrong word? High-school maybe?
 
@Ahmad He may have finished early.
 
*secondary
He just got his school degree which let's him enter university.
 
So he's in junior college.
Things are not the same all over the world.
 
So out of high school?
And you gave him a dev job?
 
8:48 PM
You may call it high school, but the term used in some countries is college.
 
Out of "Bachillerato" whatever that is somewhere else
 
junior college or Bachillerato in Guatemala
 
He is "Bachiller en Computación"...
 
That translates to high school diploma
 
@Ahmad Yes, I gave him a dev job, why not?
 
8:49 PM
What is the pay in Guatemala ?
 
I'm just surprised someone would hire a 17 year old
 
Righto chaps. That's me done. Enough Python for one night
 
@Ahmad A highly motivated 17 yo, who is interesting in learning and doing a good job. I would re-hire him every day
 
G'night!
 
@IntrepidBrit kbythx
 
8:50 PM
Night!
@Ahmad What is your geographical location?
 
I'm from Germany abhi
@Hyperboreus nice
 
@abhi The 17 yo is on 4000 Q / month, and senior programmers around 8000 to 15000 Q.
1 GTQ = 0.128991 USD
(for comparison minimum wages are 1,900 Q)
 
That's about 2000 us dollars?
 
(but are never paid, lol)
@abhi About 500 USD
4000 Q = 500 USD
 
15000 Q = 2000 USD?
that's what I meant./
Not your minimum wages.
 
8:54 PM
roundabout yea
But remember that we don't pay social security and other stuff.
or health care
 
Gotcha.
 
And you get a full lunch for 2 USD with beverage and dessert
 
In your country, the standard of living is probably not very expensive.
So people can afford to stay on that kind of money.
Very similar to what India was 10 years ago. Now India has hyper-inflation
 
Exactly, it doesn't matter how much it is in USD, but how much money is left at the end of the month.
 
nearly impossible to survive on US $500 a month
 
8:57 PM
Really? I thought the indian currency is kinda-stable
 
See you all, I have some cabbage to cook.
 
omg that's cheap... in here a standard lunch would cost around 15-30 USD, while the minimal wage is around 1.2k USD. Also, we pay tons of taxes, of any kind you could possibly imagine. I wonder how comes they don't tax us for breathing, or for metabolism.
 
Cya Hyperboreus
 
is it allowed to do this with a csv reader?
 
The currency may be stable, but the prices in the country are soaring.
 
8:59 PM
read = csv.reader(csvdata)
for row in read[1:]: # exclude headers
  # do things
 
@Crow Actually no, I tried it today :P
Use read.next() and then do for row in read: yadda yadda yadda
 
what was your solution?
 
Look at this page
The petrol price was around 35 per litre. Now it has jumped to 81 Rs in 10 years.
 
9:11 PM
@abhi Oh, I see :/
 
DSM
Better to use next(read); more forward-compatible. Although I often prefer to use csv.DictReader anyway.
 
@DSM although Martijn takes that approach, I still prefer, for row in islice(read, 1, None) then it's easier to adjust for > 1
(or to limit)
having said that, next(read, '') is generally more robust
 
DSM
@JonClements: YAGNI for most csv use cases, though, and if you are going to need it you might as well use a dedicated consume.
 
gist.github.com/ThiefMaster/11269741 - being able to do stuff like this in about half an hour is why I love python :D
 
why is my zipfile nesting every directory from root to the files I am zipping?
 
9:23 PM
probably because you are adding it with the full path
you need to use the second argument of ZipFile.write() to specify the path/name inside the archive
 
ahhhh that worked, thank you
 
@DSM indeed... but, I'd prefer to have an islice there and adjust, then remove a next and add a slice later... :)
 
cabbage
You are all still here? Seriously, get a life.
 
hrm, I'm having a problem with something... streaming data to a front end component
 
@Hyper cabbage is always here :)
 
DSM
9:40 PM
I misread that as "hypercabbage is always here".
 
The one that's been fed loads of energy drinks and bounces around the room annoyingly? That cabbage?
 
We all love the cabbage. Even this guy:
http://static.tumblr.com/viwpwkc/saUm4w1hd/cabbage-guy.jpg
 
@DSM I spotted another the other week (seems I'm not the first... plenty of people have noticed)... Anyway, I've been listening to some Lily Allen stuff...
 
DSM
Spotted another what?
 
And you know I said that Selena Gomez one reminded me of Supertramp's "The Logical Song" - what's this one remind you of ?
It's right at the start... so don't need to go wait for 2 mins in :)
One of her better songs... not really enjoying her later work
 
DSM
9:47 PM
Nope, nothing spiking. The last time I knew I'd heard something similar and couldn't place it, but nothing this time.
 
@DSM nothing clicks right at the start?
hello @CCJ... What's this room done to warrant a County Court Judgement? :p
 
DSM
@JonClements: still nope. What should I be paying attention to?
 
@DSM try this one
(I prefer Cat Steven's version)
 
DSM
...
Not sure I'm seeing it.
 
how does one iterate over a csv.DictReader? Iteritems doesn't work
 
9:54 PM
you just for row in your_reader - it's not an actual dict
 
DSM
for rowdict in reader:
    print(rowdict)
 
my code seems very finicky :\
 
10:09 PM
it knows you're the author ?
wb @ionelmc
 
DSM
@JonClements: okay, if I suppress all but one note in every short phrase I can hear the similarity.
 
it goes "down" rather than "up"... but yeah
Finally got around to updating my github profile pic from spiderpig
 
10:44 PM
How to deal with this question
 
DSM
I think I'm just going to ignore questions like that and leave them to other people. It's half-selfish, half-generous..
 
I thought my answer was reasonably okay on that one... but obviously didn't hit the FGITW 10 min period or something
I'm tempted by:
import mmap
from collections import Counter

with open('somefile') as fin:
    mf = mmap.mmap(fin.fileno(), 0, access=mmap.ACCESS_READ)
    word_counts = Counter(re.finditer('\w+'), mf)
sadly I think that'd be lost on the OP though
 
01:00 - 18:0018:00 - 23:00

« first day (1286 days earlier)      last day (3656 days later) »