« first day (2326 days earlier)      last day (2616 days later) » 

DSM
4:00 PM
On a day like today I'm glad I'm at home. It's gorgeous with a cool breeze. And a new flask-sqlalchemy release to boot!
 
I don't know what we ever did to deserve davidism.
Er, for the two possible interpretations of that message, choose the complimentary one.
 
"May your day be as pleasant as you are"
 
DSM
You mean the sarcastic disdain that comes free with my meal?
 
Er, for the two possible interpretations of "complimentary", choose "expressing a compliment; praising or approving" rather than "given or supplied free of charge"
Unrelated, but it irritates me when people assume that 0b101010 and 0x2A and 42 are all different types.
Not to mention questions like "how do I convert this string into a raw string?"
 
awh davidism the HTTPS cert on your site is invalid :\
 
4:06 PM
Same way you convert a whole number into an integer?
 
DSM
@Kevin: from many OPs I have learned that the first is binary type, the second is hexadecimal type, and the third is digital type (not to be confused with decimal type, which is something else). Still not sure how floats fit in..
 
OPs should go and write their own language and leave us in peace.
 
OK, Twitter, Reddit, and mailing list posts taken care of.
Please don't get flooded with bug reports.
 
They'll have a numerical type for every base, and infinite precision floats, somehow, and printwill be interchangeable with return via the use of cunning "do what I mean" AI
 
DSM
4:09 PM
How is KevinScript coming along?..
 
I was implementing import, and I decided to let my subconscious ruminate over the problem, and then it never got back to me.
We're going to have to incept me to retrieve the design document.
 
sometimes I wish I could install Python on my work machine rather than using an online emulator... :\ slow days like today would allow me to play with different modules. One day, I believe...
 
DSM
Is it forbidden by company policy?
 
IT doesn't like it when they do their weekly clean up on the machines, if you install something that isn't needed for work, they just yell at you and give you a warning... (happen once don't know what happens if I keep trying)
Maybe I will just bring in a flash drive with Python and stuff on it and boot from that... I wonder if the system would catch that
 
What if you install Python, use it for six days, then uninstall right before the weekly cleanup?
 
4:16 PM
@Kevin :\ no clue maybe :D. I will try this week, remind me next week to report back.
 
DSM
ISTM you should be able to install Anaconda in a per-user way, but if the company really doesn't like you installing anything which isn't work-related (as opposed to just not wanting the maintenance headache of you modifying the system), that's not going to help.
 
I was thinking of buying a Raspberry Pi and putting a linux box on it, install Python, and allowing me to connect to it, just a private network, but then I don't know if the Pi is strong enough, and I don't know the security issues I might raise doing that...
 
One of my great fears is that my next job will have restrictive IT policies of that nature. I expect programmers tend to have freer reign than ordinary bean counters, but I know it's possible because it took me three years to get administrator rights at BigCorp.
 
@MooingRawr I'd be surprised if they let you boot disks that they don't control. Especially if you work at a Windows shop and you want to boot Linux.
 
My IT managed to set up permissions so that even admins can't uninstall programs
 
4:19 PM
@PM2Ring hmm guess I will have to look into remote connections than :(
 
DSM
Everyone should just get a position where Python dev is their main responsibility. Then they'll have to let you!
 
I endorse this solution.
 
depends on if they actually care about your position description :p
 
DSM
We need to come up with some sort of snapchat-like room for Marcus, where every word is fleeting, and every thought impermanent..
 
XD
 
4:33 PM
Well, asking people to retweet the announcement in the mailing list was certainly successful, the Twitter notifications keep coming.
1.5k impressions in less than an hour.
 
4:47 PM
Hmm, what's the dunder name for unary ~, again...?
 
Oh joy, my first 'Company Town Hall' meeting... I wonder how this is going to turn out. The only experiences I have on this topic are from movies and stories, where at the end is usually either a massive bouns/gift giving, some drama ensues, or a mass lay off...
 
Yep, that's it. Thanks
 
+1
 
DSM
@MooingRawr: NumberFirm's town halls are mostly strategy updates. Seldom interesting either in good or bad ways.
 
4:49 PM
Likewise
 
I see, guess I will see how the half day event is going to turn out... thanks
@DSM are you watching / following spring training #baseball? If you are thoughts on how things are going in general ?
 
DSM
Haven't tuned in yet. Only knew how things were going in the Phillies game because of my phone.. :-/
 
It irritates me that the Phillies did not use an actual existing noun to describe themselves when choosing a name.
 
I remember when the Phillies won the World Series back in 2008 -- center city absolutely went nuts
 
Are you in Phillies or did it just so happen you were in that city?
 
5:03 PM
I went to college in Philly
 
Similarly, I look askance at the 49ers. And the Miami Heat are on probationary notice because the abstract concept of heat would not be capable of handling a basketball.
 
that day in particular stands out in terms of how crazy high-energy it was
 
Except perhaps through clever use of updrafts.
 
haven't seen anything like it since the opening night of Snakes on a Plane
XD
 
DSM
I'd agree with you, Kevin, but "Leafs" isn't even the right plural, and they're the team I care about most in all the world..
 
5:05 PM
@MarcusS come to Toronto when the Leafs win the cup.... hopefully... maybe.... one day..... :S
 
I'm on the fence about whether an eagle could properly play football. If it can grasp it by the husk, perhaps...
 
hahaha
when the leafs win the cup
LOL
haha
 
@Kevin I would rather Marlins be called Heat, as it's hot doing baseball season and throwing balls at such fast speed, having high energy... something something heat...
 
re: basketball, it took me a while to actually learn what a trailblazer was (from the Portland Trail Blazers)
 
DSM
@idjaw: If we haven't won it in twenty years we'll take up a collection, buy out the rest of the teams, and fill them with players that would get cut from bantam.
 
5:07 PM
yeah....seems like the best next step
 
@DSM Be a trendsetter and start calling them the Toronto Maple Leaves.
 
@idjaw I wear a Leafs t-shirt on Fridays for the last 5 months at my company. This one co worker saw it one day, ( he usually work at the opposite side of the office) and said "one day, one day...." and went from a ':)' to a '):'...
 
Why "Leafs" though :/
 
@Kevin No don't, then people would have new jokes about how we should leave the NHL because how long since we've won the cup :(
 
Alternatively, give homage to the discovery of the Americas by the vikings, by calling them the "Leifs"
That one will be easier to get away with in non-textual mediums.
 
DSM
5:10 PM
@MarcusS: named after a regiment. It's like if we were named after a man "Robert Wolf", we'd be the "Wolfs", not the "Wolves".
 
Ah
 
 
that's angry
what's happening there
 
Fig 1. A fearsome maple leaf about to engage in territorial combat
 
5:18 PM
@MarcusS Toronto Arenas (pre 1919)- > Toronto St. Patricks (1919–1927) -> Toronto Maple Leafs (1927-Now). The original Toronto Maple Leafs was a minor league baseball team ( en.wikipedia.org/wiki/… ) but the hockey team's name which was like DSM said, was based on Maple Leaf Regiment from World War I. source (en.wikipedia.org/wiki/History_of_the_Toronto_Maple_Leafs)
 
wow, 1967
 
DSM
Yeah. We know.
 
I'm assuming there's got to be a good reason for that -- TORONTO is like one of (or the?) biggest cities in Canada, no?
 
DSM
...
 
Also fun (not so fun) fact, Maple Leafs, is the only Original 6, that hasn't won a cup since the 1967 expansion. :\ New York (1994), Montreal (1993), Chicago (2015), Boston (2011) , Detroit (2008) all won them. [those were the most recent]
 
5:22 PM
The reason for Toronto not winning is aligned with why Montreal is on track to being in the same boat and not winning either
 
DSM
@MarcusS: Ontario is the biggest city in Canada like California is the biggest city in the United States.
 
Administrative politics that they refuse to let go of and properly build a team and organization based on winning games and not meeting some political standard
 
I would argue that the Maple Leafs is the richest or one of the richest team in the NHL. Every game we play it's like 70%+ packed even on a off day among other factors like how much our fans buy products, how loyal our fans on etc etc... so we have money, it's just multiple reasons on why we didn't win. And I don't really feel like going down history eras naming and pointing the blames :(
 
BLAH that was a typo
 
However....I think the Leafs have been slowly climbing out of that hole and are making bigger changes these days that are going to work better for them as the seasons go by
 
5:24 PM
Meant Toronto
 
DSM
:-) But yeah, the Greater Toronto Area is Canada's largest metro region, and the team has more money than they know what to do with. Literally.
 
@idjaw Lou is a smart GM, we have the best Canadian Coach, and Brendan Shanahan has been a leafs fan all his life. We finally got a management team that is actually something we could be proud of.
 
Yup. They are moving in the right direction. Hopefully it does work out for them
Because it's going to be funny when Montreal can't chant 67 anymore
 
DSM
I'm about as optimistic about the current admin as I can be, but I'm not holding my breath. On the other hand I'll settle for being able to BEAT THE HABS ONCE EVERY FEW YEARS
 
OT hurt my soul this weekend :-(
 
DSM
5:28 PM
I texted my father immediately after: "I hate Montreal." He replied "Me too." #family #leafsnation
 
also it was estimated in 2015 that the top 3 teams net worth were: New York Ranger 1.2 bill, Montreal 1.18b and Leafs 1.15b, but that was before our management and players drafts steped up. I'm sure the numbers are a lot closer...
 
I think it's hilarious Montreal is now at a point with their hiring/firing cycle and strict hiring rules, that they are now recycling coaches
it's comical
 
2008 == 2017 (?) wutface.... but in all seriousness, Habs mostly want french speaking coaches.... :(
at this point, I just hope we don't become the next Cubs :( I don't want to wait that long for a victory.
 
DSM
We need to get Theo Epstein interested in hockey, is what. I think I've seen pictures of him at a Blackhawks game so it's not impossible.
 
reading more about the Leafs and the finances/mgmt/fanbase... pretty awesome
hilarious but still awesome XD
 
5:39 PM
Why can't Phil Jackson know hockey
I want Phil Jackson
 
DSM
I think the Knicks would be willing to lose him. :-P
 
@MarcusS if you find that funny, en.wikipedia.org/wiki/Ottawa_Senators_(original) and en.wikipedia.org/wiki/… the blunder of Ottawa and it's money issues
 
oh poor Ottawa
they just can't
 
@idjaw I see what you did there. well done o//
 
:)
 
5:43 PM
Cbg
Also rbrb
 
@davidism can you give a minimal, complete and verifiable example of that?
 
:-|
 
I read your tweet in the flask mailing list. Nice :-)
 
DSM
How many of us have ever mentioned that we net.know davidism in a conversation to seem like we're really connected? .. .. me neither.
 
5:49 PM
I don't usually namedrop you guys. Mostly our escapades fall under the descriptor of "my internet friend(s) (did|said) <thing>"
Bragging about my adjacency to any of you would fall on deaf ears because none of my meatspace friends know what Flask / StackOverflow / Project Euler / OEIS is to begin with.
 
@Kevin can I be one of your internet friend? or do I have to do/create something special first?
 
I don't either, because that requires meatspace friends.
 
also rbrb lunch time.
 
DSM
You are famous for your wit among people I physically meet, so there's that. Comedy is a more easily demonstrable skill to strangers than programming.
 
> And on the pedestal these words appear:
'My name is Ozymandias, king of kings:
Look on my works, ye Mighty, and despair!'
Nothing beside remains. Round the decay
Of that colossal wreck, boundless and bare
The lone and level sands stretch far away.
 
5:55 PM
LOL
 
In the end it's all dust.
 
DSM
A seasonally appropriate thought.
 
One of my favorite poems </srs>
 
Same. I'm not often moved by poetry, but this one's a hit for me.
 
Bryan Cranston really nailed it, too: youtube.com/watch?v=T3dpghfRBHE
 
5:57 PM
@MooingRawr Ok, you're in.
 
cbg
 
(anyone else playing Hollow Knight, by chance? Really cool game)
 
First I hear of it and looks really interesting
> Classic side-scrolling action, with all the modern trimmings.
sold
 
@MarcusS I was just thinking of buying it last night. Probably would have gone for it if it wasn't half an hour before bedtime.
Saw a thread for it on 4chan and those guys usually hate everything, so the fact that they could maintain enthusiasm for more than a page's worth of replies is high praise indeed
 
DSM
6:10 PM
Good policy. Decisions I make right before getting into bed have historically been a little.. variable.. in their wisdom.
 
Now that you've corroborated the claim of it being a good game, I'm almost certainly going to make the purchase.
 
recbg
 
Hey guys, I didn't initiate this as a question, so I want to ask it as a question.

I'm trying to implement a tree data structure in Python. At first, I need to understand tree data structure. Do you know a resource (book, writing etc.) which handles tree data structure (in a part of it or as a whole)?
Can I find it in any standard algorithm book?
 
It's a pretty common data structure so it's probably going to show up in the average textbook, sure
 
What's with this Twitter meme going around of "Hi I'm {name}, programer for {X} years, and I still do {silly thing}."?
 
6:15 PM
Hmm... Let me look, thanks.
 
Most surprising one:
Hi, my name is Markus. I'm a maintainer of Flask and I have never had a job as a web developer.
 
I usually just make do with Wikipedia articles for this sort of thing
In computer science, a tree is a widely used abstract data type (ADT)—or data structure implementing this ADT—that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes. A tree data structure can be defined recursively (locally) as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated, and none points to the root. Alternatively, a tree can be...
... Although Wikipedia articles are not always written with the intent of being understandable to the uninitiated
 
Many different types of trees out there with different properties, so it may depend a little bit on what you're trying to do
 
I checked it out. I thought maybe much descriptive resource exists.
 
At its most basic, a tree is nothing more than:
class Tree:
    def __init__(self):
        self.value = None
        self.children = []
 
6:17 PM
@Kevin what if they are implicitly the Philly Fillies, but they contracted the name?
or is that really it?
 
@davidism Interesting...
 
Well, I thought of some problems on this. If I want to find the root of tree and if I do it on a children, what do I do? (Or maybe I didn't understand the nature of it.)
 
from math import sqrt
 
Ah, being able to traverse up as well as down requires additional attributes.
In particular, a self.parent attribute.
 
Ah, yeah.
Whatevet
I will check out some books.
Thanks again.
@kevin
 
6:19 PM
def get_root(tree):
    node = tree
    while node.parent is not None:
        node = node.parent
    return node
 
So, each node in the tree will have parent object as an attribute.
 
Yeah, with the topmost node's parent being None, naturally
 
Yeah. Thanks, this gave me some ideas.
 
6:33 PM
Unrelated. Upsides of working with 2.7: You can't reassign print, which is likely what is happening in Python: error msg str is not callable
Clearly all built-in functions should be converted into statements, solving the overshadowing problem once and for all.
Retrieving the return values of those functions is left as an exercise to the reader.
 
hmm...you can even assign to __builtins__.print
that I did not expect
 
cbg
 
cbg
 
Is there any way to dump sql file using sqlalchemy?
 
@Kevin the downside is you can't dir(print)
 
6:36 PM
Only the naughtiest users would dare to assign to __builtins__
 
I'm currently using dumps function from sqlalchemy
 
What does it mean to dump a sql file?
 
Seems like it can't get an sql file from that..
 
No, you would use your database to dump a sql file.
 
Do you want to print it? print(open("MyFile.sql").read()) ought to do it
 
6:38 PM
For example, in PostgreSQL: pg_dump -Fc -Z9 mydatabase -f mydatabase.db
 
@davidism you mean through mysqldump command?
 
Oh, that kind of dump. Never mind.
 
I want to do a regular db backup.
 
Then make a cron job (or a systemd timer).
 
OK, from builtins import print will restore the overwritten version
 
6:39 PM
Yeah, exactly.Since I'm using GAE, I can't run any shell commands.
 
Sure you can, make the cron job on another machine, all database clients can connect to remote databases.
 
Actually I can access my cloud sql db from my local pc. But I though it would be better if the server does the backup job..
So, you don't recommend dumps func from sqlalchemy?
 
@AvinashRaj I'm not sure what you're referring to, SQLAlchemy does not provide a dumps function.
 
recbg
 
6:45 PM
@AvinashRaj that page pretty clearly says it's for serializing the query, not the data. So no, I wouldn't recommend it for backing up data.
 
6:56 PM
Making a list of lists with Python is another victim of Python's overblown reputation for resembling ordinary written language.
"1-10" would be perfectly understood to mean "one to ten" by a human, but not so by the parser.
 
sounds like a good case for the "do what I mean" AI of the OP-lang
 
It maybe should also be noted that that won't be a list of lists in python 3.
 
uuuuuugh....I have to create some API calls in a Django project
Ok....be more positive...be more positive
woossaaa woossaa
 
@idjaw \o/
 
7:16 PM
Currently listening to the Moonlight OST. Pretty good if OST music is your cup of tea
 
oh did anyone watch the Oscars yesterday ?
 
kinda.
saw all the important bits
 
@idjaw I also find BGMs to be one of the best working music... maybe because it fits so perfectly in the background :D
 
when I have to really concentrate on stuff I need music without words
 
Speaking of BGM, Deconstructing: The 8 Dungeons of Link’s Awakening is an interesting read-slash-listen. It talks about creating a mood of impending danger using the Game Boy's limited sound hardware.
 
DSM
7:23 PM
Ten minute phone conversation with colleague managed to resolve important blocker on major project after I came up with (seriously) an MCVE. #success
 
7:48 PM
wtf....apparently that BST question by US customs was not a joke??
 
DSM
Eh?
 
well...I'm still very unsure about this
but
I was just asked to balance a Binary Search Tree by JFK's airport immigration. Welcome to America.
and inside there there is another article
second one, individual was given a CS test
This has to be a joke....
Apologies....this borders political.
 
Tsk tsk, JFK. Everyone knows you test for fake programmers by using FizzBuzz.
 
^^
 
DSM
I remember visiting a country once where the customs agent explained he was interested in physics and asked some astronomy questions after I explained I was visiting for a conference. Made some sense.
 
7:56 PM
@Kevin Wait is FizzBuzz actually used in some interview questions? I always thought it was more of a satire thing...
 
I've never encountered it myself, but I know others have.
 
Yeah it's actually used. People find it insultingly simple because anybody with a week of experience can eventually solve it. So it serves to filter out everybody with less than a week of experience.
 
DSM
I had some intern candidates last year who I'm pretty sure would have bombed fizzbuzz.
 
I've only been in two interviews, one contract work for web dev (no actual programming questions) just which website look better, and terminology. The other one (the one I'm currently with) asked one programming question, well it was more of an algorithm question more than anything.... I still want to see what other programmer's interviews are like.
 
In one of my previous workplaces, there was a rumor that a coworker of mine had no prior programming experience, and just sort of learned as he went.
 
8:00 PM
I think we can say it wouldn't be used anymore
because of its popularity
 
Fake it till you make it...
 
Seemed like a bright guy in general but I have no clue what his code was like, since we didn't have a policy of peer review and I never had reason to audit his checkins or anything.
 
I started work at my internship with a guy who was asking for help with certain basic linux commands. A year or two again the company published their linux kernel module, mostly written by him. So, some people are quick learners.
(I know, userspace is not kernelspace. Still.)
 
That reminds me, I still need to learn how to use git.
 
DSM
True. It's one of the reasons why you can't just interview to optimize knowledge because some of that knowledge isn't going to be relevant to the problems your candidate will actually face.
 
don't come back til you've read the whole thing twice
 
I have had no experience with c#, just java, and here I am writing c# code.... :\ I still feel like a phony. Also zero experience with github and git and yet I have to use it :\....
 
I just looked at the table of contents twice. I think I get the gi(s)t
 
C# and Java are more similar than they care to admit. Idiomatically, maybe not, but you can definitely get by just fine.
groan
At least read the chapter on reset, that always trips people up
 
8:04 PM
Dec 2 '16 at 19:47, by Wayne Werner
Seriously, read http://tom.preston-werner.com/2009/05/19/the-git-parable.html @MooingRawr
 
DSM
Jun 14 '16 at 18:40, by DSM
Apr 7 at 19:26, by DSM
When I first started working with C# it struck me as Java done right.
 
Wasn't C# designed specifically so Microsoft could have a Java-like language without depending on the IP of another company (i.e. Sun)? Or did I just dream that.
 
That's right. But then they asked the right person to design it.
Anders Hejlsberg (/hɑːlsbɛərɡ/, born 2 December 1960) is a prominent Danish software engineer who co-designed several popular and commercially successful programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi. He currently works for Microsoft as the lead architect of C# and core developer on TypeScript. == Early life == Hejlsberg was born in Copenhagen, Denmark, and studied engineering at the Technical University of Denmark but did not graduate. While at the university in 1980, he began writing programs for the Nascom microcomputer...
 
I find in c# and Java, the constant typing Typenames to be rather annoying and clutters the code up..
 
en.wikipedia.org/wiki/C_Sharp_(programming_language)#History acknowledges the similarity between the languages, but doesn't appear to have any sources from Microsoft admitting it directly
@MooingRawr Use var where practical.
 
8:07 PM
There's no return-type var like there is in c++, but that might be considered a good thing.
Hey, worst case, just use dynamic objects everywhere, and you've got your python in your C#!
 
yeah, and then drive my co workers crazy... :\
 
DSM
I didn't hate myself after writing C#, although I stand by my view the language is needlessly large.
 
I'm glad I've got a proper IDE for my work projects because I'd quickly lose my patience typing out List<LongTypeNameGoesHere> x = new List<LongTypeNameGoesHere>() if I didn't have tab completion
 
print("hello world") vs public class Program { public static void Main() { System.Console.WriteLine("Hello, World!"); } }
 
@Kevin Wouldn't admitting it defeat the purpose?
 
8:11 PM
No var?
@DSM what could be removed?
 
Not sure. I'm unclear on the legal ramifications of just coming out and saying "Yes, we wrote C# to be as close a copy of Java as we possibly could"
 
doesn't sound very lawyerproof
then again Octave I think is an openly open-source copy of MATLAB
 
The reason our production system burst into flames last week is because we had two equally valid standard modules that did the same thing, and many years ago we chose one to standardize upon, and MS recently decided to mark that one as deprecated, and when we changed over to the other one, Bad Things happened despite them having seemingly identical interfaces
 
they sometimes reject features which are not MATLAB-like enough
 
DSM
That reminds me of a discussion over in one of the sister sites which was in the sidebar a few days ago, where someone was asking if some character's hair was supposed to resemble Mickey Mouse ears. He refused to accept anything short of someone saying "no, they're not supposed to resemble Mickey", rejecting even comments from the creators saying "we wanted it to look heart-like (or something)."
 
8:14 PM
"discussion"
 
@KevinMGranger To be honest, I forget var exists most of the time.
 
just got an email warning about "Phishing Attempt"... with flashy picture telling you to think twice on clicking a link.... I don't know what to make from this email..
 
are you sure the warning is part of the original e-mail? :P
 
Ah, the 'ol phishing double-bluff.
 
A while back I got a spoof e-mail urging me to change my password to a service [LINK] because bad guys breached the system and it got compromised
made me do a double-take
 
8:17 PM
I don't know... there's no return email, signed off with "IT Corporate Security" .... and the 'To list' is everyone in my building (or mostly from what I can tell)
 
DSM
An old colleague's computer was ransomwared (although a much cruder form of it than you'd see today) by a program pretending to be a security service, locking down the computer to protect it from malware.
 
reminds me of this (tangential)
 
"Think twice about clicking links" is a typo. The phishers meant to say "think about clicking links twice" because they get double the revenue that way.
 
DSM
Heh.
 
user6568562
I wonder when click farms will hit mainstream media, what will happen
 
user6568562
8:26 PM
I can't wait for the titles
 
hey @randomhopeful
 
if i wanted to send and recieve data from/to a server, would i need two threads, one for sending and one for recieving?
in python 3^
 
user6568562
Hey @AndyK , what up
 
Not if you have non-blocking send/receive calls.
 
I'm all rite matey
GF is out of town, so are kids, so it is time to geek a bit
 
8:29 PM
would something like this in a thread work?
the first while loop is for sending messages, the second is for receiving
 
You had nice indentation and then something went wrong, there.
 
IP = "192.168.0.73"
PORT = 5005
BUFFER_SIZE = 20000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((IP, PORT))
while to_be_sent != None:
    s.send(to_be_sent.encode("utf-8"))
    to_be_sent = None
while True:
    data = s.recv(BUFFER_SIZE)
    if not data : break
to_be_sent is a variable which is defined to be None, unless a message is entered to which is obviously changes to be the message
 
Well, the first while loop will always terminate after exactly one execution, and the second while loop may loop for a while, but after it terminates, the program terminates completely, so you're not going to be able to receive more than one message, or send a message after you receive a message.
Both of those things are fine, if that's what you want the program to do.
 
well, i need the program to not terminate afterwards
i need it to be always recieving messages when they are sent and ready to send messages
with the sending messages, i've made it so that the thread always opens when there is a message sent and afterwards it is closed.
so i'm assuming for the process of receiving data i will need an entirely new thread
 
I was thinking something more like
while True:
    while messages_to_send: #this is a queue that's populated by another thread, perhaps
        s.send(messages_to_send.pop())
    while True:
        data = s.recv(BUFFER_SIZE)
        do_something(data)
        if not data: break
 
8:37 PM
oh yes
yea that makes sense
ill try that, let you know
thank you
 
Or, hmm, I guess those last two lines should be switched? I guess it depends on your use case.
 
@Kevin last two should be switched
it works
 
Good, good
 
thank you
ah sugar
things going wrong
and i dont understand why
ive restarted the server several times, physically and its program
but when i receive the message, its like i receive all the messages that were sent before it
no, wait
 
Quick question:
I just started playing around with ocr, but I was a little confused on what library I should use; Any suggestions? (There is quick a lot ocr libraries for python)
 
8:47 PM
guys when I am implementing a design pattern like observer should I stick to the name of the methods as the pattern used to have it. for instance, if i want implement the observer pattern the observable(subject) class will have a method called addObserver() OK! can I call it something else like addTrafficLight() since i am doing a traffic light system and implementing the observer pattern
 
It should be fine as long as it's still clear to the reader what you're doing.
Some times when I employ a design pattern, I don't ever mention the name of it anywhere. Like, most recently I made some Decorators without ever using the word "decorator".
 
aha thanks very much Kevin
 
@davidism, I have SQLALCHEMY_TRACK_MODIFICATIONS set to False in my app.config, and can print it out to verify, but whenever I run a query against my db, I get a KeyError in reference to SQLALCHEMY_TRACK_MODIFICATIONS. I have no idea where to even begin, ass it must be looking for another app.config
 
@Kevin are you up for some difficult debugging
because im clueless what to do
 
I'm afraid I haven't got the time. I need to commute home in five minutes and sixteen seconds.
 
8:55 PM
rip
okay, then ill ask it in a form of a question
 
"Who is it that doesn't have time for some difficult debugging?"
and the answer is Kevin
 
well @AndrasDeak would you mind helping me?
 
> Added support for custom query_class and model_class as args to the SQLAlchemy constructor. (#328)
 
@Kevin do you always leave on the dot ?
 
@davidism: FINALLY! :)
 
8:56 PM
@SylentNyte sorry, I'm pretty swamped myself:) plus I don't know sockets
 
@AndrasDeak me neither, learning them
 
@MooingRawr Typically yeah.
 
let me restart my pc
 
first thing i'm gonna do tomorrow is getting rid of this damn monkeypatch ;)
 
@Kevin good to know that, 4 pm my time is the cut off point from seeing Kevin, until tomorrow.
 
8:57 PM
*Kevout
 
@ThiefMaster I need to go read into why this was a good quality of life change, you're the fifth person who pointed this out as something nice...
 
sssssh, it's just an elaborate ruse trying to make davidism smile for the first time in his life
 

« first day (2326 days earlier)      last day (2616 days later) »