« first day (2104 days earlier)      last day (3068 days later) » 

01:45
it is possible to using Flask but.. not created a listener server?
user559633
02:19
@RobertGrant yeah. it's a difficult game and, even if you play it perfectly, you're still reliant on the random number generator working in your favor
03:08
@Jean-philippeEmond can you elaborate? i'm not sure i can answer but it's not too clear what you mean
ah sorry I fixed my problem.. its because I got a script and run a webserver.. I just want to ... not running the server but "print" result.
But I found.
03:48
not sure I understand the concepts enough to solve this. trying to resize an image after getting it this way image = BytesIO(urlopen(url).read())
04:05
cbg
 
1 hour later…
05:05
@clickhere you're going to need pillow (nee PIL) if you want to resize an image
05:42
Smells like SqlAlchemy is getting in the way. — Rick James 10 hours ago
mysql apologists <3
06:16
cbg
06:32
cbg @khajvah
yet again, my city is doing massive protests
which city was that
Yerevan
@khajvah read all radio yerevan jokes yet?
06:44
oh lol no some of them only
they're from other parts of SU
06:58
have you guys tried synapse application launcher on Linux?
it's holy
"have you tried the wholly new operating system" :D
amazing
Mr. Stallman is the god
07:14
No idea who this Stallman guy is but pretty sure that's JRS.
07:31
Django's ORM is annoying
if I want to use a many to many field, I can't set table names
08:10
How'd you mean? You can override the tablenames.
Cabbage!
Too warm.
Such warm. Loving it.
Not while at work
@Withnail yeah but it messes up the many-to-many table
I want a pool
08:13
so you have to specifically create that table
Yeah, but if you're overriding the table names, it feels like explicitly specifying the intermediate table is probably the way to go anyway, no?
dunno, I thought it would work automatically based on the new name
with the same format :table1name_:table2name
What does it output?
Cbg Robert.
one moment
ok I don't know what's going on now. Let me drop the db and rerun again
08:28
Cabbage. Some people are very generous in their definition of "contains code". The question linked below has input and desired output, albeit as Python data structures, but there is no code that attempts to produce that output from the supplied input.
Are we downvoting for questions that people (themselves) consider obvious these days? This question is concise, contains code (albeit minimal) and the expected result. Part of me wishes more questions were like this. Certainly we have better targets to throw our downvotes at. — jedwards 19 mins ago
lol ridiculous
I've seen a lot of questions in recent months that involve those ridiculous lists of 1 item dictionaries. Why would anybody think that is a useful data structure? You get all the extra overhead of a dictionary with almost none of the benefit, apart from a field name. You might as well just stick with the list of tuples, or if the field names are fixed (which I suspect they mostly are) you could use a namedtuple.
@PM2Ring also, they specifically ask for JSON and then the expected output is something entirely different.
Good point. I suspect that the OP doesn't really know what JSON is. I hope they just have an XY problem, because the alternative is that they're intentionally creating something horrible. :)
08:44
Exactly what I was thinking. I almost laughed at the comment:
http://stackoverflow.com/users/2934968/user2934968
`this result is not as per my requirement`
When the answer explained how to get a JSON string from a list
@tristan I'm now readdicted to FTL
@ChaoticTwist Question says something, but the desired result appears to be a list of dicts?
dicts*
:P
and yes
Oh my, a list of dics. What have I done.
@RomanLuštrik A list of dics. I'm pretty sure there's a porn with that name.
08:55
cbg(all)
Well, the OP did say they want a list of single item dicts, and the want it as JSON. But they still haven't explained why they want that stupid structure. And I suspect that now they have their answer we may never see them again.
@PM2Ring: Maybe you're right. I was just pointing to the "Expected" output they've given which isn't json.
@Withnail It said "couldn't find table xy" but I dropped the db and ran again it worked
might have been something with migrations
@ChaoticTwist Yeah, which is why I said "I suspect that the OP doesn't really know what JSON is."
True.
@PM2Ring, on that note, how slow would a list of dicts actually be? Compared to a list of Tuples?
09:11
@ChaoticTwist I don't think it'd be any slower to use, but it'd be slower to construct it, and it would use up more memory than a list of tuples, or a flat dict.
rbrb (dinner time)
Okay. That way. I was wondering how it'd be slower to use.
09:37
re-cbg. But it would certainly be slower to look up keys than a flat dict, as would a list of tuples, or list of lists.
10:04
then what would one use instead of what OP is using? Assuming that you need data in that format. i.e a list of key value pairs
cbg everyone
cbg @ChaoticTwist
quick question: with a context manager, like that

`with open("filename","w"):`

You can `w`for write or `r` for read or `a`for append. What are the other options, please?
@AndyK Did you even try to google it first?
done @ChaoticTwist google.fr/…
10:13
won't the options be same as general file IO?
@AndyK :D
I was headbutting on that one but with missing info, you cannot make it...
90% of coding is googling.
I basically google search for a living.
was contemplating a bug in a computational geometry program for an hour until I noticed that the framework I was using has a y-axis which increases from top to bottom
10:23
Truth @ChaoticTwist. I was with my GF and friends yesterday eve and we were talking about programming and almost cracked a joke that googling/breaking an issue into keywords was a real skill
@GeckStar happened with me while working with OpenCV. My very first project and I was trying to figure out why the code won't run. Took me a whole night to figure out that in OpenCV image co-ordinates are (y,x) instead of (x,y)
@GeckStar well done
@ChaoticTwist that sounds horrible. Why can't they just stick to conventions
@GeckStar apparently it is the convention. Numpy Uses the same.
Also, instead of RGB, the convention in OpenCV is BGR. That was 4 hours of my life i'm not getting back.
Jesus
we need an ISO standard for this stuff
10:26
It's because of the way they handle images. in form of matrices. Matrices use rowxcolumn convention
what is BGR @ChaoticTwist?
Blue Green Red I'd bet
Red Green Blue -> Blue Green Red (RGB - BGR)
@ChaoticTwist Since they (allegedly) want JSON, they could use a list of [key, value] lists if they really need to preserve order in their JSON output. FWIW, the encoder in the json module automatically converts tuples to lists, since JSON itself doesn't have tuples.
10:33
@PM2Ring what about without using JSON? what would be the fastest data structure then?
@GeckStar it's not about standards actually. It tells you that you shouldn't assume even the minutest stuff when it comes to using a new library
true, true
@ChaoticTwist For internal use in a Python program, I'd be using a flat dict. Or possibly an OrderedDict if I need to preserve order. OTOH, you can just use a plain dict and keep a list / tuple of the keys for when you're doing stuff that depends on the order, like output. And if the number of keys isn't huge and you just want alphabetical order it may be convenient to simply create them on the fly, using sorted(mydict.keys())
Aah, Okay. Thanks.
@PM2Ring or just sorted(mydict)? :p
@GeckStar (y, x) coordinates are matrix row, column convention. And if your data is in an array that's organized as rows of pixels (as it usually is), then you have to address it as grid[y][x]. And that also explains why y=0 is the top row of the image.
@JonClements Of course. :)
10:48
Is developing a cross-platform app generally a good practice? Or is it better to develop separately for each platform?
@JonClements I still have some old habits from the days before sorted, so I have a tendency to get the key list and then sort it using .sort...
@PM2Ring I see, thx. I don't have a CV background, I just mess around with geographical graphs. That's what the framework is used for, too. I'll keep in mind that I have to check that stuff in the future. The more you know
rbrb
@PM2Ring That's a while back :)
@ChaoticTwist Portability is generally a Good Thing. And it shouldn't be an issue if your program uses cross-platform libs. But if you need to handle the platform differenc es yourself it can be painful & messy. Just look at how painful it was to do HTML + JavaScript when there were a whole bunch of major browser differences, before jQuery.
@JonClements Old habits die hard. :)
You're right.
But I think for most complex apps, cross platform is just not feasible. There are always hidden quirks specific to that platform which won't be caught during development.
11:02
When writing in C it took me years to get used to the fact that I no longer need to be miserly with my use of RAM. My Amiga 2000 had 10MB, which was a fair bit for an Amiga. I got the chips at a very good price, the retail price when I upgraded the RAM on that machine was $100 / MB. In comparison, the rent on flat was like $70 / week, IIRC.
@ChaoticTwist Sure, but that's why I said you need to use libraries that handle those things for you. But even then, there will be things that the library just can't do. An example that came up recently on SO: Tkinter supports transparent windows on Windows, but not on Linux or Mac. It doesn't generate an error, the window just fails to be transparent.
too broad stackoverflow.com/questions/38477741/… Gimme teh codez. Dude wants to break CAPTCHA. Fat chance doing that with PIL. :)
and "alogorithms"
11:20
And "sequene". I don't expect perfect grammar from people who aren't native English speakers, but at least they could use a spell checker.
Clearly OP just learnt about something new and had a "Million Dollar Idea"
It's his first question too
and the only question, as of now.
@PM2Ring how do I quote comments/answers from SO here in chat?
@ChaoticTwist The comment link is on the timestamp of the post. If you post the link in a chat message without any other text it will one-box.
thanks.
I've been trying to figure this one out since a while now :P
It took me a little while too. And even longer to notice that if you hover over a SO timestamp (on either a comment, question, or answer) you get a tool-tip popping up with an exact time string.
Well, TIL
11:47
cabbage
@PM2Ring I wonder how long that feature's been there
cbg @AndrasDeak
@Gemtastic at least a year
@Gemtastic Probably forever. :)
@AndrasDeak Probably, but I still wonder how long. It was a TIL for me too
It's one of those small things that gives a little wow-factor. Or at least stops you from raging over the "about x minut ago" when you wanna know exactly
11:51
And now subconsciously we will expect it to be there everywhere which uses the "about x minutes ago" type timestamps.
or at least I would.
Let's make people make it a standard
I just realised, it could be a standard but we wouldn't know about it just like we didn't know it was there on SO! :O
Stuff that gets activated on hovering isn't much fun on touchscreens.
That's true. But PCMasterRace?
I just verified Reddit also has this.
also, accessibility might be an issue
12:00
how so?
it's hard to hover over a timestamp if you're blind
Oh you meant in that sense. I totally did not even think in that direction :\
Although, wouldn't almost all UI features be redundant if you're blind?
redundant yes, but a screen reader can handle most things
Is IMG the only one with an alt attribute?
You can design smart for screenreaders though
(I'm only guessing, I don't know anyone with impaired vision)
12:03
Like not hiding elements that show on hover; the screen readers ignore those
I remember participating in a hackathon/appathon and designing an app for blind people. It used to speak out everything, when you touched a button, it used to speak what it does. I remember my Idea getting DQ'd because it didnt have a good UI.
good as in aesthetically beautiful
okay?
if DQ means disqualified, then this sounds a bit odd
yeah disqualified
basically I'm ranting about the fact
That's odd
Indeed
12:06
accessibility oriented UI-design should be more important than an aesthetically-oriented one
maybe it was organized by professionally outraged people who believe that blind people deserve pretty apps too, you horrible person you:P
I don't know why I'm still talking to the likes of you
(but seriously, I can understand if visual appeal matters in points, but disqualification?)
could be. The winner was a beautiful looking video-player.
wat:D
OK, I'll not make a comment
Or maybe the organizers hated blind people?
cbg-noon
12:08
cbg
cabbage, Andy
Maybe they were pretentious wanna look gooder:ers?
it's 5AM here in Vancouver
@AndyK noon? What time zone are you on?
5:30 PM here :D
12:08
CET
Was the acessability tested by blind people or seeing people with no clue?
my body thinks it's 7AM, though
@ChaoticTwist are you in India?
2:08Pm here
12:08
ah OK:P
@Gemtastic what makes you think that accessibility was an aspect for testing?
@WayneWerner maybe it is actually 7am ... :p
I do however give that it is important that websites are both good-looking, userfriendly and accessible, but I also agree on that accessibility is more important.
@Gemtastic: there was no visually impaired judge. but i got my friend to demo the app blindfolded to show the accessibility
@AndrasDeak In this case I suppose I meant judged by
@AndrasDeak @WayneWerner o/
12:10
@Gemtastic same question applies:D
@AndyK lies
@AndrasDeak You lost me
@WayneWerner I miss your answer bit earlier
@Gemtastic I was suggesting that accessibility had nothing to do with the event, beyond naming
@AndrasDeak I was kinda asking to verify that thought
12:11
That's certainly what it sounds like. I think we'll be outraged along with you, Chaotic ;)
@Gemtastic well you seemed to have assumed that at least they tried
There's plenty of asshats who chase the illusion of being good people when they only care about looking good
I made no such assumptions:D
@AndrasDeak I attributed it to poor organization. They named the hackathon "Code for a cause" afterall
@AndrasDeak I had to ask to give them the benefit of the doubt
12:12
@Gemtastic meh, screw them:P
Maybe they had a visually impaired person judging.
@WayneWerner Let's all hold a outrage party.
@Gemtastic if there was no visually impaired judge, how would they know if it worked well for blind people? Alternatively, at least wearing a blindfold and using the app
But yeah, does sound like "Hey, accessibility is important, let's pretend we give a damn!"
@WayneWerner That's why I was asking
shakes fist at nothing in particular
Us seeing people can listen to the visually impaired and takes notes, but when it comes down to it, noone but them really knows what's good and what's bad
@WayneWerner I totally missed that answer.
Thanks
sorry:P
Code for a cause indeed.
Rbrb, guys.
12:16
@ChaoticTwist rhubarb
Back in the days of Fidonet I used to know a blind programmer. He was not fond of GUIs, although accessibility was rather primitive back then.
He started coding back in the days of punch cards, when he had an advantage over sighted coders, since he could rapidly read cards by touch. Some cards had the text printed along the top of the card, but many didn't. He said it was like reading kiddy Braille. His colleagues would often give him "stray" cards to decode, since it was faster (and cheaper) than running a small deck of cards through a machine to print them.
What an awesome guy
Wants to treat him to a beer for being so cool
12:22
He exceptionally decoded stray cards apart from his own? So was he....the first exception handler?
AAAAAAW YEAH
That is pretty awesome. But not you, Andras -_-
Mind you, when you're using unprinted cards all the time you do get pretty fast at being able to decode them manually. But I'm sure Rick was heaps faster than I ever was. :)
who am I kidding, I love terrible jokes as much more than the next guy
\o/
12:24
:)
Jokes? I just insult people and hope they take it as sarcastic jokes. Works much better than complimenting people. Somehow all my compliments offend/hurt people
If anyone likes electronic music, amazon.com/dp/B01I7AJ4XS/ref=dm_ty_trk%3C/a%3E was free for me through dealnews.com - I'm assuming that it's also free by just clicking on it
@Gemtastic "Good job, Joe, I thought you'd screw this one up as much as you did the previous tasks.", "Hey Julie, looking not like shit for a change."
@WayneWerner there's a big "get album free" button, and I'm not even logged in
oops, I am:D
but I have a vanilla amazon account
@AndrasDeak Apparently "How many A:s did you get on your final grades?" is very upsetting
well, but how is that a compliment?:P
12:31
I just assumed they'd get at least one
@AndrasDeak Yeah, me too
@Gemtastic And therein lies the problem ;)
yeah, that's in no way a compliment
I can't remember anything closer to a real compliment atm but it's wonky stuff
One problem with punch cards is that it wasn't much fun if you accidentally dropped a deck of cards. Trying to get a program of several hundred lines back into order was a tedious process, even in high level languages; if it was assembler, you might as well just chuck them in the bin and start over.
Back then, some languages (eg BASIC) required a line number at the start of each statement. And it was a convention that the last 8 columns of the 80 column card was an automatic comment field that could be used for card sequence numbers, although plenty of people didn't bother taking advantage of that. Some people wrote line numbers on the cards in pen.
Not as bad as when I try to comfort someone. "You're not THAT ugly. You're kinda normal!"
@PM2Ring Oh wow. Back when version control was the box they were stored in?
12:36
@PM2Ring My CS prof told me about her VCS - they drew a diagonal line down one side of their cards with a marker
then ---if---when you dropped your cards you could sort them
with all those holes, you could just thread all those cards on a keyring
(is threading the right word?)
stackoverflow.com/q/38477908/344286 that's an interesting problem. And a very small number
@WayneWerner that's eps(0)
the next number after 0 in double precision
@AndrasDeak Sure, why not? But I don't think it would work the way you think it would...
@WayneWerner that's possible:P
12:40
since you'd have to take them off the keyring to run it through the computer
yeah I know:P
@WayneWerner Yeah, that was pretty common. It wasn't a perfect method. It certainly helped to get the order almost correct, but it generally required some additional fine tuning.
@AndrasDeak nevermind I didn't read the question, it's not eps(0)
> Feynman immediately discovered that because of the obsession with secrecy at Los Alamos, the team members had no idea of the significance of their calculations or why they were important for the war effort. He went straight to Oppenheimer and asked for permission to brief the team about the importance of their implosion calculations. He also discovered a way to speed up the calculations. By assigning each problem to a different colored deck of cards, the team could work on more than one problem at once. While one deck was using one of the machines for one stage of the calculation, another
that's what you get for being efficient
ask Scotty
12:44
I'm pretty sure that in his "Surely you're joking, Mr. Feynman" autobiography he says that it was actually his team who discovered that, but, sure
@Gemtastic Version control was the version number written on the side of the deck, and on the box. And of course in a code comment. Programs were stored on tape, or disk, but cards were the ultimate backup in case of hardware failure. Disk drives back then had tiny capacity compared to today, but were adequate for the demands of the time. But they were about as big as a washing machine, and noisier.
when swapping actually meant swapping?
my programming teacher in high school had a "port-a-punch" and had me do a punch card program just so I could suff...er...learn :)
That'd be fun
12:50
@JGreenwell I read that as "just so I could stuff...er...learn" thrice, and started to have very naughty misconceptions
yeah, he still had punch cards from working as a researcher at a Chicago University and, as far as I know, he will continue to do that until he runs out of cards
@AndrasDeak mind in the gutter, eh?
@WayneWerner I think that one is a drum storage unit. Disks came a little bit later. I never used a machine with drums, but I did see one in 1970 on a Honeywell system. It was really noisy; you wouldn't want to spend much time in the same room with one if you could avoid it.
@PM2Ring Thank you for your hard work
I can't do anything but appreciate everyone working on getting to where we're at now
Hey, it's fun talking about the good old bad old days. :)
12:59
Is it just me, or is os.kill() probably the most misleading python function name ever?
wadup wadup
well, this is the first conversation in a while that made me feel young (being that all my recent conversations have been with freshman who freak-out about a time before cellphones when Unix and dummy terminals were the norm)
@IntrepidBrit Do you use Linux or Windows? because on the latter, sure
but it's very similar to the kill command on *nix
Ah, good old windows and it's "Killing is such a strong tool... let's just hush it"
@IntrepidBrit You apparently haven’t tried os.replace('Windows') on Linux yet!
13:01
@IntrepidBrit does it do "sudo rm -rf /"?
@WayneWerner I use both. If it was an Linux only command, I think that it would be okay. But since it does both they should probably rename it?
I don't know
@poke :P
@khajvah Hey! I wonder what sudo rm -rf / does. I'll just run it in my termi........
:IntrepidBrit has disconnected from chat:
consenting adults
os.suicide()
I wish we had one of those cool persons in the team that organizes cool events so we can become a cool startup
13:09
Be the change you want to see in the world.
@Kevin brings gasoline
i am an uncool coworker who nitpicks others' code while reviewing
Put that gas away. This is Introductory Enlightenment Teachings. Self-immolation is for the advanced class.
It's liquid.
Rhubarb, be back later
It's liquid today, but what about tomorrow? For is it not written, (hastily rifles through fortune cookie slips in pocket), uh, "all things are transient"?
13:13
rbrb. Meetings all day, hooray!
That's a rhetorical question because it's written right here.
philosophy was actually a fun class. Had a good professor who let me write my final report on Artificial Intelligence
so does one for loop always mean O(n)?
Not necessarily no
Consider the code:
N = 100
for i in range(N):
    some_function_call(N) #this calls a function which is O(N)
This is O(N^2).
And if you're looping over the digits of numbers < n, then that's O(log n)
13:23
"Yeah, yeah, but what if we don't do any function calls?" you ask? Ok, consider the code:
s = "X"
N = 100
for i in range(N):
    s = s+s
I'm not 100% sure how string memory allocation works, but this is something like O(2^N)
"Ok, but does one for loop always mean at least O(N)?" you ask? Yes, provided the thing you're iterating over is proportional to N. Consider the code:
N = 100
M = 10
for i in range(M):
    print "Hello, World!"
This isn't O(N), but it's O(M).
That clears it up
(unless you have more, go ahead)
I think I'm done.
Unless I'm struck by inspiration right now!!!
Nope, no. I'm done.
But that's O(M) = O(.1*n) = O(n)?
13:26
@Kevin In modern CPython, for strings s and a, s = s + a, s += a, and s = a + s are optimised for len(s) up to a thousand or so chars. But for big strings, they're abysmal.
@JossieCalderon Arguably yes. A better example I could have used was:
def f(m,n):
    for i in range(m):
        print "Hello, World!"
Now you can't say anything about the relationship between m and n. Total unknown. But you can still say that f is O(M)
This is both the most useless and yet most fun project I've created obscurefjord.com/powerpoint :D
@clickhere from wikipedia?
it's nice
@PM2Ring Ok, so my example works pretty well since s will blow past a thousand chars in about seven iterations.
er, ten. logarithms are hard.
13:36
cabbage all
Hmm, did the unanswered stats change? I seem to remember looking a lot worse a few days ago. stackoverflow.com/tags/flask/topusers
@clickhere Cool project, but saying "please don't press the button twice" seems like a surefire way to get chaotic evil users to press the button as many times as they can ;-)
> 12,708 All Time 28.7% unanswered
I remember that percentage being higher.
@Kevin, yeah, well, it's far from complete. some topics bug out. The complete version will have captcha and I'll also disable double submission.
13:39
@davidism I'm not certain but it's possible the roomba has come along recently...
Maybe, but the number of questions didn't change drastically.
I wish there were better stats.
@davidism I'm sure there's an SEDE query out there :)
Or I could finally unpack the data download that's sitting on my drive. :-)
13:51
I'm slowly working on adding the data dump to a graph database.
I'm struggling with the sheer size of the data though.
I think I need to split the files up so I'm not trying to read a 20GB file with my 16GB of RAM :/
@Ffisegydd parse it iteratively...
Yes I am aware of this, but the Neo4j CYPHER command I was hoping to use doesn't allow you to :P
Instead, I suspect it's trying to read it all in one go.
That reminds me. A while back I got some GH notifications about rabbit. Do we have any plans regarding its design? I'm interested in contributing but don't want to go in a totally new direction if we've already established a tech stack or whatever.
I don't think there's any plan just yet, I think davidism was just putting together ideas.
Me and Intrepid are working on some analysis pipelines at the moment, but that won't necessarily have much to do with rabbit (for now, might be eventually that rabbit would log results of analysis to chat)
'Kay.
13:57
So, go at it I suppose.
I am paralyzed by the freedom of choice that lies before me.
@Kevin I was just putting notes together. What I eventually want is a backend and a new userscript for chat that acts as the frontend.
I want to avoid typing commands into chat, so the frontend would be doing a bunch of AJAX requests and then rabbit would perform the results.
Hmm, I see.

« first day (2104 days earlier)      last day (3068 days later) »