« first day (1559 days earlier)      last day (3380 days later) » 

1:00 PM
installs RabbitMQ
Solved!
 
user559633
lol
 
user559633
just code it and worry about it later
 
Yeah :)
 
user559633
when you're all in on a single system, local threads are so ridiculously fast that you don't even really have to worry about this
 
But possibly sending events over a bus would be a way to do some of it. But yeah, which node runs the code that should react to the event. Good point.
Yeah well I wonder if actually making it all distributed is a good idea. I actually was more thinking of that for availability than processing reasons.
 
user559633
1:02 PM
fwiw: the last time i rolled my own consensus algorithm, i had the server respond with a "last heartbeat check-in with master" field and, because i controlled the client, i had the client say "i don't trust you for updates anymore" if it was above 3 seconds (which is to say, i went with a CA setup and if there was a partition, i preferred to refuse updates)
 
Cbg
 
user559633
cbg @vaultah
 
Yeah, that sounds good
Interesting to think about
I'm starting to realise that the way the tools I use fit together is quite good for this job :)
 
@KastriotDreshaj I normally use kate, but when I'm in Puppy Linux I use geany.
 
Didn't pass my Informatics exam sad laugh
 
1:06 PM
Sorry :(
 
Should I make __repr__ return __str__ or __str__ return __repr__ (if both return the same) and why?
 
user559633
Oof, how far were you from passing @vaultah
 
@PM2Ring @tristan ty
 
@tristan pretty far, they are teaching stuff I couldn't google
 
1:10 PM
@ReutSharabani If the interpreter can't find str it uses repr. But it's probably a good idea to supply a str so the interpreter doesn't have to trawl through the inheritance chain looking for a non-existent str
 
user559633
@vaultah link to any course material? i'm interested.
 
@vaultah +1 for materials :)
 
PyCharm users: please upvote
 
However, there's no need to code a __str__ method that calls __repr__. Just define __repr__() and then set __str__ as a class attribute equal to __repr__.
 
post count just dropped below 1000. Progress!
This one still needs closing:
 
1:16 PM
@inspector done.
Also may I suggest posting a photo of what it looks like at the moment and what, ideally, you want it to look like?
 
@tristan sure, I'll link it when I get home
 
user559633
Cheers @vaultah, appreciated
 
@MartijnPieters closed
 
user559633
~~*gongggg*~~
 
user559633
8 points for "where a thing is on a website." i should have started stackoverflowing earlier
 
1:19 PM
@tristan Next up: deleting it.
 
user559633
:D
 
We'll have to wait a few days before we can do that.
Unless we can vote it down to -3, at which point 20k+ users can delete it now.
 
class Point:
    def __init__(self, x, y):
        self.x, self.y = x, y

    def __repr__(self):
        return "Point(%s, %s)" % (self.x, self.y)

    __str__ = __repr__

def main():
    p = Point(3, 4)
    print p, repr(p), str(p)
    print p.__repr__, p.__str__

if __name__ == '__main__':
    main()
 
These three posts are all up for the chop: stackoverflow.com/questions/tagged/programming-contest
 
Output:
 
user559633
1:20 PM
I'm onboard for the down-vote parade.
 
Point(3, 4) Point(3, 4) Point(3, 4)
<bound method Point.__repr__ of Point(3, 4)> <bound method Point.__repr__ of Point(3, 4)>
 
@PM2Ring thanks
 
Oh, the top-coders post was a room close: Goooooonnggggg
 
@ReutSharabani No worries. I'm sure I answered that question recently somewhere around here... :)
 
1:42 PM
So, it turns out python has __eq__ and __ne__, who knew? :( :(
 
what is non-community wiki answers ?
when i will get gold badge ?
 
Cabbage, all!
@MartijnPieters are we editing the tags out or closing all these things?
@Raja they are answers that you have not marked "community wiki". If you don't know what that is, you're not using it so you don't have to think about it. You'll get gold after >=200 answers gather >=1000 upvotes in a tag.
 
@davidism editing the tags out if possible.
that may mean replacing the tag.
 
1:57 PM
@davidism I have 68 upvotes in
 
Just 932 to go then!
 
@davidism oh great lot to go then ...
 
@Raja every journey begins with a single step and all that :)
 
user559633
argh. i hate when you're hacking on something and then all of a sudden it's 9am and time to switch to a different job
 
2:04 PM
@davidism they still haven't clarified though..
 
user559633
does anyone know a good graphic artist that wants to do a commissioned work?
 
@tristan Peter's pretty darn good at stuff...
 
user559633
Good point.
 
re-cbg
 
rhubarb
 
2:15 PM
cbg @Ffisegydd - rbrb @PM2Ring
 
2:44 PM
blergh.
 
I'm arguing about guns and the second amendment on Quora. Fun times.
 
I'm trying to find a citation for the bulk modulus of null-scattering Ti-Zr alloy.
 
Dupe of the Tkinter Photoimage garbage collection bug. Uh, I think.
 
Well I've blinded trusted you so if you're wrong we'll both have egg on our face.
 
user559633
@RobertGrant just stop and walk away
 
2:46 PM
@tristan I can't, I'm afraid I'll get shot.
 
Well, it looked okay, but I'm mostly trusting @Kevin as well - I'll end up with more egg on my face :(
 
But we've had some interesting points raised. It's actually about the efficacy of the phrase "guns don't kill people, people kill people", which is much easier to dispute
 
It may be a mix of 70% Photoimage bug, 30% "ok, now I have this other problem..."
 
Guns don't kill people, bullets travelling very fast and stopping suddenly kill people.
 
user559633
@RobertGrant but...you don't even live in america and i doubt you've lived in a shitty part of the US
 
2:48 PM
@tristan but I can't stand fallacies :)
I actually hadn't thought about the phrase before, and wanted to chat about it. Chap I'm talking to is pretty polite.
 
user559633
How is it a fallacy?
 
My elementary school biology teacher insisted that bullets didn't kill people, and neither did car accidents or high cholesterol or axe murderers. The only thing that really kills people, he said, was a lack of oxygenated blood moving through the brain.
 
Hey I have a small requirement. My project output is in text format, but my guide has asked me to get the output in PDF format. Any module that will directly do that?
 
2:50 PM
If a car accident causes blood to stop flowing to your brain, it's not really the "cause" any more than deciding to get out of bed in the morning was the cause.
 
user559633
but guns and bullets don't kill people. and saturated fats don't make you fat. they just make it much easier to get the related state
 
Guns don't kill people. Every observable event in a person's past light cone, stretching back to the origin of the Universe, kills people.
 
@JonClements then cv unclear?
 
I love the idea of lightcones.
 
Remember to turn on your light cones when driving in the rain.
 
2:54 PM
@tristan because - as far as I can tell - it doesn't address anything useful. People focus on guns as opposed to knives because guns make it much easier to kill others or oneself, both physically and psychologically. So if you take a group of people (say the population of the US) and you give them guns, then many more people die than if they didn't have guns.
 
@BhargavRao Not in the standard library, I don't think so
 
user559633
@RobertGrant sure, but in very high crime areas, i'd prefer the person attacking me or my loved ones to do the dying (meaning the person attacking).
 
In other words, in the formulation "given a group of people, some of whom will kill with guns when they wouldn't had there not been a gun, if there are guns around then more people will die", it doesn't matter whether guns, bullets or a lack of oxygenated blood kills people. The precondition is satisfied, so all that matters is that if there are guns around then more people will die.
@tristan you want your loved ones to do the dying?
 
user559633
can't english today
 
I'm just kidding :)
But that is how I first read it
 
user559633
2:57 PM
I'm aware, still amusing
 
user559633
Yeah, me too when I read it again
 
Thanks @Kevin I don't necessarily need it to be in the library. I've used pyPDF which does the job the other way round
 
This morning I shot an elephant in my pajamas. How he got into my pajamas, I'll never know.
 
But when guns are around, attackers become much more powerful
 
user559633
sure, and because we can't put the turd back in the cat, if you don't have a gun, you're at a disadvantage in that scenario
 
2:58 PM
And I know that leads to the thing of only criminals have guns, but we were talking about the logic (or lack thereof) of guns don't kill people, people kill people
 
user559633
(to be sure, i'm strongly apposed to handguns becoming legal in nyc)
 
Or just introduce a 10000% levy on bullets
 
user559633
But guns don't kill people. The high availability of guns, their relative cheapness, and lack of controls is what puts people at risk.
 
But those things don't matter if guns don't kill people
 
I wish I could remember where I read this, but I saw a chart of "injuries sustained during mugging" vs "weapon held by victim" and there's a smooth upward trend, with "unarmed" being the least injured, "knife" being in the middle, and "gun" being most likely to be injured.
 
user559633
3:00 PM
Guns don't kill people. People using guns easily kill other people.
 
@RobertGrant @tristan I'm reminded of: youtube.com/watch?v=OuX-nFmL0II
 
Guys, can you pause this conversation while I go make some popcorn?
 
user559633
The problem here is that the stupid "guns don't kill people BLAH DE HURR HURF vomits on lap" keeps reducing the argument
 
@Kevin please find it and let me show it to a Quora person :)
 
user559633
If you make bullets extremely expensive, you'll just create a black market for homemade bullets.
 
user559633
3:01 PM
Because outlawing alcohol worked so well for the states.
 
user559633
Because taxing ready-to-eat food lead to people choking down more fast food.
 
@tristan I'd take that chance :)
 
To be fair, they outlawed handguns in UK and it worked*
 
user559633
Yes, it worked in your medium-sized-US-state country.
 
[* = We still get the occasional shooting, but not on the level that US gets (taking into account population differences etc)]
 
3:03 PM
Given the option, I'd definitely rather someone had bullets in their gun they cobbled together in their basement than many cheap, highly precise, machined ones
 
user559633
With a different culture, different demographics, hugely different population
 
Yeah it's more the culture than anything I think. Population is one fifth of the US's, so it's not so very different.
 
user559633
Also, maybe highly educated, wealthy people living in the UK maybe don't have the experience or the context to talk about gun crime in predominantly poor areas of the United States?
 
My ideal would be someone with a 3D-printed gun firing homemade bullets.
 
Hahaha
 
3:05 PM
Hmm, maybe it was this chart? But gun-related injury is lower than unarmed, which is the opposite of what I remember... I guess my bias is showing.
 
@tristan it's all about the stats
 
Your ideal?
 
@RobertGrant don't start giving @IntrepidBrit any ideas please...
 
user559633
@RobertGrant what stats?
 
Any stats
Stats I make up
 
user559633
3:05 PM
...
 
user559633
Ah, yes.
 
I am 85% likely to misremember a statistic so that it supports my pre-decided viewpoints.
 
goes and finds the thing he was thinking of
 
@Kevin I found a code in djangosnippets.org/snippets/1778 ... Can I just copy it and paste it into my project?
 
> This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
I guess so.
 
3:09 PM
Coz, I'll be publishing it, will it get any issues in future?
 
I don't know how GPL works exactly. I bet you have to include a copy of the license or something.
 
If your application depends on it, your application becomes GPL software (right people?)
 
Should I contact the author or so?
 
No, you should google "GNU General Public License" and see what it says
 
It would have been so better if there was somethin like pyPDF ...
 
user559633
3:12 PM
you should email rms@gnu.org and ask him to review your software and explain the license to you
 
@tristan HAhahaha
I like that.
 
I better search for some module on converting text to PDF before going into this license stuff
 
BTW, I don't think it's generally true that "if you use this licensed library, you must license your own code with the same license". In my experience, most licenses are not like that. I can't speak specifically for this license, though.
@BhargavRao Even if you find such a module, that too will have a license. Pretty much everything does.
 
@tristan I don't think I have a plain text program of the course, I can only link djvu file with exam questions, but it's in Russian...
 
@Kevin You're right about most licenses. I think the GPL is not one of those though. You can't include GPL'd (at least version 3) libraries in with non-GPL compatible stuff.
 
3:15 PM
There is a bash command pdftotext but no texttopdf ...
 
@tristan this wasn't the exact thing I was looking for, but it's close - suicide stats: slate.com/articles/news_and_politics/crime/2013/12/…
 
user559633
@vaultah i can read russian, it will be good for me. my girlfriend will come home and say "oh sure, you can't work on your polite conversation, but you can learn this..."
 
I know that that's true of actually linking libraries -- you can't link with GPL libraries without your code being infected -- but I'm not sure if it's true if you just use a standalone GPL application from your application. I'm not sure what constitutes "linking".
 
@Jon was tempted to add that but couldn't be bothered with the regex :P
 
nor could I really, but thought I'd throw it in there
 
3:17 PM
It's a perfectly valid solution (I get lazy using dateutil :P)
 
Wikipedia has a million paragraphs on the matter so I think I'll just say "I am not your lawyer" and escape from this conversation.
 
Policy of Escapism?
 
user559633
@RobertGrant because 0.5-0.9 fewer people of the already tiny population with diagnosed, existing mental issues and who were already handgun owners would maybe not shoot themselves, that means?
 
@Kevin good call. I think I'll do the same. The GPL scares me.
 
If the bash guys had made a utility as texttoPDF it would have been so nice, but they won't .... Racist people
 
user559633
3:19 PM
if you plan on selling your code and you don't want to provide/host the source of the GPL code you used, then don't use GPL
 
user559633
cheers vaultah :)
 
@tristan Naw... It is for a conference publication
 
Alternatively, use GPL code in violation of their terms, and hope nobody ever notices. (don't actually do this)
 
user559633
If you plan on open sourcing or otherwise making your content free, then you're fine
 
3:20 PM
It will be up on net until the conference accepts it
 
If you plan on never ever showing your source to anybody, and you know no one will ever decompile your binary, then you're fine. (keep not actually doing this)
 
Heh just had my first "answered editing question to contain nothing random chars when deleting his content"
 
We have to provide the source code in the source language
 
user559633
just right it in haskell and immediately no one will care
 
@BhargavRao Here's an MIT-licensed pdf libraray that looks not terrible to use (you can use MIT-licensed code in commercial software): code.google.com/p/pdfrw
 
3:22 PM
Thanks bro, If it works, you are the hero of my day
 
>>> from pdfrw import PdfWriter
>>> y = PdfWriter()
>>> y.addpage(x.pages[0])
>>> y.write('result.pdf')
 
@JonClements Wouldn't want to risk my arm firing a 3D printed gun. You need a crazily expensive machine to have more than one shot before catastrophic failure ;)
 
^ I guess that will write a pdf that has 'result.pdf' written on it.
 
Oh Thanks ... I'll start working on it
 
3:23 PM
I wonder what that x variable is.
 
Hahahha
Me too.... I copied and pasted that from their website.
 
@Kevin I reckon it's fanfiction.
 
@CodyPiersall Will add your name in acknowledgements bro (Only if it works)... Thanks like hell
 
@tristan I think that's pretty significant in real terms, but even if not, the next page where IDF suicides went down by 40% when they stopped soldiers taking guns home shows that people often won't use something else if a gun isn't around.
 
user559633
Yeah, I'm really concerned about all the IDF suicides happening on american soil.
 
3:25 PM
@BhargavRao No problem! Let me know if it works... I think it's going to be harder than I was thinking. Looks like x is a PdfReader object. Hope that's not important.
 
Yeah... Downloading the package
 
Say I were to bounty a question with the intention of giving it to someone for a good answer, how long do I have to wait before being able to award? 2 days?
 
@tristan wasn't really what I was getting at
Anyway, never mind
Rbrb rbrb
 
user559633
Context heavily matters.
 
user559633
Yeah, anyway.
 
3:29 PM
I am patiently awaiting a sci-fi future where no weapons exist because the nanobots that are omnipresent in the Earth's atmosphere will disassemble anything threatening.
Ideally, guns will still exist for sport, but bullets will get vaporized mid-flight if they would hit anything sentient or otherwise important.
 
user559633
I think we'll use flowers for money in the future!
 
@Ffisegydd Yes - it's still 2 days
 
Flowers are too easy to replicate! We'll used gold-pressed latinum.
 
user559633
We'll just use hugs!!!
 
I don't think you're taking my scifi dreams seriously ;_;
 
3:31 PM
There's been debates on meta that if you're awarding an existing answer you should be able to do it immediately, but it's been declined, but the purpose of the bounty is to also attract attention, and you may well end up with more answers
 
user559633
In the future, we'll have no need for programming languages as everyone will be writing in Ruby
 
@BhargavRao I'm playing around with pdfrw and I'm starting to think it's not as simple as I thought.
 
@Ffisegydd if you wanted to bounty something, let me know, I've got spare rep... don't want you going below 10k anytime soon :) (plus I think 50 bounties are rubbish, gotta be at least 200)
 
It was a fleeting thought. And it wouldn't be rewarding a particular answer, but rather a user.
 
@CodyPiersall Still readin the docs
 
3:35 PM
My stance on a lot of social issues is "just wait until the glorious future, and it won't be a problem any more"
 
user559633
 
Historically, this has worked pretty well. Horses poop in the street too much! Women keep complaining that they can't vote! It's a lot of work accommodating the needs of all these polio sufferers!
 
@tristan good ol' Mitchell and Webb :p
 
user559633
@JonClements haha, yes. "the computer isn't going to be offended"
 
hmhm :D
was reading the docs for module io and... the older python gets the more it resembles java really :D
 
3:38 PM
I love io.StringIO. (I have said this before, possibly yesterday).
 
user559633
and then burninate?
 
nah, I think is a reasonable tag
 
Oi! Fellow Brits. If you don't hate Amazon, and want a waterproof 360 degree bluetooth speaker for £22 (down from £99) - I can fire you a link
 
question comes up at the right time
 
3:43 PM
@Intrepid Sure?
I buy pretty much everything apart from food and clothing from Amazon.
 
@BhargavRao I'm thinking my recommendation was pretty bad. Looks like you have to already have a PdfReader in order to use the PdfWriter.
 
But does it have social media integration?
 
I should have typed £26 instead of £22. I hope that's not a deal breaker
 
Looks like file-download is already a suggested synonym, go vote if you can. Still need to suggest downloading. I don't have points in the tag though.
 
3:44 PM
@Intrepid not only is the £4 a deal breaker but it has ruined my trust in you. Friendship over.
 
@IntrepidBrit Truth in advertising laws now obligate you to pay each of us £4.
 
@CodyPiersall Working on it. Reading lines from text using open . ... Then complicating stuff up ... and finally writing using PdfReader
 
hmmm close enough
 
Not if I'm operating from ... a country that doesn't observe those laws...
Yeah. I'm safe
 
user559633
I only buy electronics that have facebook accounts
 
3:45 PM
My uncle works at the laws factory and he says they apply everywhere forever times infinity!
 
Oh gosh darn it
 
user559633
4 pounds of money is quite a bit, even if they're singles
 
@CodyPiersall Nope .... That module reads PDF and converts it into another PDF of a different type
 
Can he also explain why this law was minted: "In Chester, a person is permitted to shoot a Welshman with a bow and arrow, as long as he is inside the city walls after midnight."
 
As a loophole, you could grab some crayons and draw up some "InterpidBrit brand fun money", worth 4 pounds at all participating locations (which is nowhere)
 
3:48 PM
I went to school in Chester and my friends had much fun telling me this when we were out at night drinking.
 
If they were good friends, they should have given you some armour
 
user559633
I accept intrepidbrit fun money in exchange for internet points
 
700/1000 upvotes in the Python tag. I can almost smell the gold badge.
 
At Stack Overflow headquarters, the badge vault is next to the cafeteria, so I assume you can smell the cooking oil.
 
I've got some platinum down in my lab if we want to make some platinum badges for room regulars.
 
3:56 PM
"Why do you know the physical location of the vault?" you ask. Well, it's certainly not because I'm planning an elaborate heist in the vein of Ocean's Eleven.
;;>_>
Incidentally, does anybody know any five foot gymnast/contortionists with demolition experience?
 
I've got a furnace we can melt it in and cast it, just need some kind of mould.
 
@Ffisegydd it should be in the shape of the sopython logo
 
plat for the grey, and some gold for the orange
 
There's the draft for a single unit of IntrepidBrit fun money
 
3:59 PM
@IntrepidBrit needs an Actual Size! sticker on it
 
We can make medallions out of them, and use them as a recognition of our cult group
 
Brb, going to print out millions of IntrepidBrit dollars
 
@IntrepidBrit and what exactly do I spend it on? "Intrepidbrit fun"? That sounds disturbing.
 
It's kind of like a lootcrate
 
4:00 PM
@Ffisegydd next up is the "@IntrepidBrit loyalty card" :p
 
"Good for one roll in the hay with a Scotsman."
 
As long as we're here, we can make platinum badges with that design for a mold
 
Have you given them to those women?
 
Why do you think at least 2% of the population have ginger hair?
Tbh, I'm quite chuffed at how the bump mapping came out
 
tbh, I'm quite terrified how you've actually spent time thinking about it ;)
 
4:05 PM
I've only spent time on it because I need a better kettle and the boil time is clearly too long...
 
and it wouldn't just be more productive to err, just putting a wild idea out here, just buy a new kettle?
 
user559633
use intrepidbux on it
 
I suggest upgrading your stove from electric to lasers.
Boil your water in an instant, and it only takes enough energy to power all of California for one second
 
@JonClements Obviously not! This earns money. The other costs money. It's like you don't know Reflected-sound-of-underground-spirits
 
The cost of me spending time to avoid spending money outweighs the cost of doing some work and just bloody well buying another kettle... :)
 
4:09 PM
It's never too early for Christmas music, right? I'm a Christmas Unicorn
It's a weird and perfect song. 12 minutes long.
 
@Ffisegydd still got that link to the cancel stars userscript?
 
Cbg!
 
We could write a joint answer :o
 
4:23 PM
I don't know if we could beat that blog post of an answer that's already there.
 
Pretty sure that problem can be solved with no "conversion" whatsoever.
 
@Kevin yeah, the only thing that sentence tells you is that the integers are constrained in size and always positive.
e.g. don't worry about what datatype to use if you are going to code this in a language where this matters.
for Python, just read the damn numbers and get on with it.
 
I ll be damned... I thought that I am optimizing the program... But it performs twice as slow as the original version :'(
 
4:29 PM
I think "".format is the culprit...
 
Just like you attempted your baby freeze you should also give it a try for this question too. — Tanveer Alam Jan 15 at 7:08
Baby freeze? Is that some kind of idiom?
 
This question on hackerrank: hackerrank.com/challenges/flipping-bits
the question for python then is how to do an XOR that uses 32 bits. orig ^ (1 << 32) - 1 is the answer.
 
I'm glad it's a language agnostic challenge. If this was specifically for Python, I would have words for the problem's author.
 
mask = (1 << 32) - 1
count = int(next(sys.stdin))
for line in islice(sys.stdin, count):
    print(int(line) ^ mask)
 
Martijn, can you pass me the link as to why eval is actually evil
 
4:34 PM
with a from __future__ import print_function, import sys and from itertools import islice for good measure.
@BhargavRao google Ned Batchelder eval
 
Hey, I was just about to link that :-) nedbatchelder.com/blog/201206/eval_really_is_dangerous.html
 
Thanks both of you ...
Melons to both of you
Hey why was this ques removed stackoverflow.com/questions/28093867/…
 
Also in my eval bookmark folder is Exploiting Python's Eval and escaping a Python sandbox
"deleted by Community♦"
 
I had them in my bookmarks ... But lost everything when I reset my browser
 
I want to learn GIS but I like to learn by doing real project. What kind of project would be interesting? I have no idea
Please share your ideas :) Thanks
 
4:40 PM
Google Image Search? Ok, uh, write an application that takes a word, like "ball", and downloads the first ten google image search results for that word.
 
Geographic Information System I assume.
Or Gigantic Iridium Sponge.
 
Geographic Information System :)
 
That user has not been asking good questions in .
 
Geographic information, huh. Ok, write an application that solves the Traveling Salesman problem in log(n) time
 
Thanks :)
 
4:46 PM
@BhargavRao Account deleted, question went with it.
 
(that's mostly a joke - if you can do this, don't forget to pick up your million dollar millennium prize for cracking the P vs NP problem)
 
user2555451
@MartijnPieters - 500 tags destroyed! Only 849 more. :)
 
@MartijnPieters My answer also went with it
 
@iCodez How are you retagging those? Are you reading through each one to figure out what language it is?
 
user2555451
If the only tag on the question is , then yes. Otherwise, we just rip off the junk tag.
 
user559633
4:50 PM
 
user559633
in your face, dead nerd
 
user2555451
And cv/delv any especially bad posts.
 

« first day (1559 days earlier)      last day (3380 days later) »