« first day (2334 days earlier)      last day (2607 days later) » 
00:00 - 17:0017:00 - 00:00

12:01 AM
yeah. Based on my experience with Shake Shack, that's a grab and go place
 
yeah
 
I can totally go for a burger now
 
making tacos atm
 
Just found out Turkey burgers have been made....not as much satisfaction as a greasy beef patty....but it's a fine alternative, I suppose.
 
we have a place here that has a bit of a street food feeling to it, it serves fancy stuff such as duck burgers with duck liver
 
12:10 AM
Welp, I guess I'm gonna head out and try and find a burger.
 
@idjaw Turkey burgers have slightly better macros, but it's sort of a wasted debate at that point (if you can make a turkey burger fit, you can probably make a beef burger fit)
 
Yeah totally....if I'm going out for a burger though....I'm getting a burger full of flavour....which means, I want a nice fatty burger with tasty toppings....like bacon, and an onion ring.....and pickles.....and tomato...lettuce.....ketchup.....mushrooms.....Oh I can keep going..
I love the fine art of burger crafting
I want a degree in burger crafting
This should be a WoW skill too
build burgers, sell in auction house. Is the auction house still a thing?
I left WoW a very long time ago
 
Might be a bit far for @WayneWerner depending on where he's going, but in JC there's a place called Left Bank Burger Bar which is also pretty awesome lbburgerbar.com/?page_id=98
 
SPICY HEIFER!!!!
Wayne get your yammin' behind over there
 
hahah
 
12:20 AM
oh that ghostface killer looks bruuuutal
 
12:43 AM
this is pretty neat. Haven't tried it yet. Will test it out soon
 
user4639281
1:14 AM
Cabbage!
 
cabbage
 
cbg, @Tiny :)
 
user4639281
I'm looking for someone who knows something about python. I found this question through a meta post a few days ago and due to the fact that I was so overwhelmed with how wonderfully posed it was in comparison to the questions I normally see, I posted a bounty. Now I have no idea whether or not the answer it received successfully answers the question or not.
 
user4639281
@AndrasDeak o/
 
\o sorry, no domain knowledge for me there
 
user4639281
1:19 AM
So here's what I propose. When the time comes, you guys pick the answer I should award it to, then I'll award it.
 
user4639281
I don't get to see many good questions, so when I do I get excited :P
 
woah there's a lot happening there and I don't know anything about pyspark
 
user4639281
That's what I said
 
@TinyGiant This is usually a pretty low-volume time of day for this room. It's usually busiest during EST business hours, I would say.
Chances of finding someone who might know pyspark would be sometime then
 
1:26 AM
 
user4639281
I'll try to remember to be on at that time
 
yamming hell this was difficult --------------------^
 
user4639281
?
 
unrelated; I've been struggling with getting mayavi+vtk to work with my data:)
 
Speaking of which...I'm in the EST time zone and still at work
I should go home.
rbrb
 
user4639281
1:28 AM
lol
 
user4639281
I'm going home in 30 minutes
 
half past 2 here...
but I finally got that shit working:D
 
 
2 hours later…
3:56 AM
@AndrasDeak What is that? - Looks to me to a very course plot of an 3d vectorfield when you only plotted a single Z-layer.
 
 
4 hours later…
7:28 AM
Cabbage
 
7:58 AM
Cabbage
 
@AndrasDeak Would this work as a slogan: "The burgest burgers in the burg"?
I hope the OP appreciates my answer. I ended up writing 60 lines of code to test a one line function. stackoverflow.com/questions/42569700/…
 
8:48 AM
Cbg folks
 
Cabbage. The main site just went down. :(
 
slow but up in my part of the world (Europe)
maybe the CDN has not propagated the down time yet ...
 
9:11 AM
re-cbg
 
9:36 AM
Cabbage!
 
10:32 AM
Cabbage all
wonder if anyone can help me with a problem using a python script accessing the Slack API
looking to clear all the messages from a DM
but it throws AttributeError: 'dict' object has no attribute 'iteritems'
 
10:47 AM
@user4676723 I haven't looked at your link, but iteritems is deprecated. It no longer exists in Python 3. Instead, use dict.items(), which works in both Python 2 and 3.
In Python 2, dict.items() returns a list of (key, value) tuples, and dict.iteritems() returns an iterator of those tuples. In Python 3, dict.items() returns an iterator, and there's no equivalent of the old list version of `dict.items(). There are quite a few cases of that sort of thing where old list-returning functions now return iterators instead.
 
if i've installed the script via pip, how do I edit it to fix it?
 
cbg
 
@user4676723 I just had a quick look at that github page, and the PyPI page I can't see any mention of Python 3. From that error message, I assume you have both Python 2 and Python 3 installed on your system. Is that correct?
 
@PM2Ring I'd be worried they'd take them in for...burglary ---- :|
 
cbg
 
10:58 AM
@paul23 it's sort of like that. It's the spin configuration of a magnetic monolayer which is a triangular antiferromagnet. If you put spins on a triangular lattice and tell them to be "pairwise as antiparallel as possible", the topological frustration leads to such a spin structure as the ground state where each nearest neighbour spin pair is at a 120-degree angle
 
@PM2Ring yes, that's correct
pip but slack-cleaner in the my 3 folder
ah, got it
just found the .py file and changed dict.iteritems() to dict.items() as you suggested
thanks for your help
 
@user4676723 Ok. I just did a quick test. The good news is that you can install slack-cleaner for Python 3. The trick is to use the Python 3 version of pip. You can do pip3 install slack-cleaner, even better is to use a more version specific one, so if you have Python3.5 you should be able to do pip3.5 install slack-cleaner. Even better is to use the pip module, eg python3 -m pip install slack-cleaner. Even better still is to install to a virtual environment.
 
Thank you for going to the trouble! Luckily the deprecated command is only used in one line so a simple edit fixed it
 
Oh, good. But now you have an installed package that's inconsistent with the code in the repo, and with what pip thinks you've got, which is a bit messy.
 
I hate naming things.
 
11:08 AM
words to live by
I hate qwertz keyboards
 
I like abcde keyboards
 
Cbg
 
@BhargavRao true
Those suck a lot
 
@PM2Ring it's a one use thing I doubt I'll use again
 
11:12 AM
@PM2Ring That looks kind of complicated.
Except if the labels are just fake, then it’s easy
(I wouldn’t mind having a good keyboard without labels)
 
@poke As the owner said "If you want to borrow my computer, it helps if you can touch type." :)
 
Oh, I skipped the “touch” part
Then yes, I wouldn’t have a problem.
 
TIL it's called touch typing in English
wonder how different that is from duck typing
 
I regularly surprise my coworkers by typing something while looking straight into their faces. Not sure why this is a skill that’s apparently somewhat rare nowadays.
3
@Andras IMO the “touch” part makes no sense at all there
 
agreed
clearly those coworkers haven't wasted enough time chatting on IRC
that's where my typing skills come from:D
 
11:16 AM
:D
 
it's fortunate that the old keyboard layout switcher program for windows was incompatible with the java applets used by the chat website, so I learned qwerty
 
I'm not exactly a touch-typist, but I know where the keys are. Mostly. :) More than half the key labels on my old Amiga keyboard were illegible from years of use. One day my sister had to use it, she was not impressed.
 
(Hungarian is qwertz, bleh)
 
@poke Like one of these?
 
yeah
I still would like to have this one:
Kind of a childhood dream
 
11:25 AM
@AndrasDeak Do you have a set of Nanodots, or similar? I have a set of 216. I wouldn't mind getting some more. They became rather hard to get here a few years ago, after a few kids had accidents with them.
 
I actually do, got a small pack from my sister-in-law a few years ago:)
kids are the worst, see Kinder eggs in the US;)
but yeah, small/strong magnets are not for kids
the name "nanodot" irks me, because those are not nanodots :D
 
> In the United States, as a result of an estimated 2,900 emergency room visits between 2009 and 2013 due to "ball-shaped" and/or "high-powered" magnets, the U.S. Consumer Product Safety Commission (CPSC) is actively trying to ban them through rulemaking.
 
@poke why is shakespeare on the space bar? Weird accent?
 
Let’s continue playing with guns but ban those terrible magnets!
 
@poke well it's the country where toddlers shoot...nevermind kevin'd
 
11:36 AM
@AndrasDeak Customizable OLED display on every key :)
 
Unfortunately, a bunch of junior high school kids got into using those magnets for fake tongue piercings, which is a really stupid idea. Swallowing 1 super-magnet is harmless, swallowing two can be fatal.
 
@poke ah
 
@PM2Ring wow
 
they should switch to eating button cells, that can kill with a single piece
 
@AndrasDeak Yes, it irked me too. But at the time they had the reputation for the highest quality, so that's the brand I went for.
 
11:38 AM
@poke so you want a keyboard made up of the new macbook pro's custom bar? :P
 
@AndrasDeak No, real keys
Real keys with displays
 
The Optimus Maximus keyboard, previously just "Optimus keyboard", is a keyboard developed by the Art. Lebedev Studio, a Russian design studio headed by Artemy Lebedev. Each of its keys is a display which can dynamically change to adapt to the keyboard layout in use or to show the function of the key. Pre-orders began on May 20, 2007 for a limited production run from December 2007 to January 2008, with a second batch expected to arrive in February 2008. It first started shipping the week of February 21, 2008. == Overview == The design featured on the studio's website received attention on the web...
 
12:20 PM
@poke I stumped one of my IT folks a couple weeks ago with my numpad, it doesn't have any numbers on it and he couldn't figure out how to type in his PIN
 
wow
 
he tried 4-5 times before he just went to the regular number keys
 
12:33 PM
Why wont this work?
 
12:45 PM
@yasar I don't know a lot of Numpy, but that looks weird to me. Why are you trying to get the dot product of 2 vectors of different sizes? What result do you expect?
 
first one is 5x1 second one transposed to 1x10, output shoudl have 5x10
 
cbg("room 6")
 
After trying for a few hours to get some SASS stuff to compile to CSS on Windows using Ruby and then Node, I think I'm going to install an Ubuntu VM
(Cbg)
 
@yasar So z should be a 5x10 array of zeroes?
 
@PM2Ring yes, I know it is pointless, it was just for a demonstration
 
12:56 PM
x = np.zeros((5, 1))
y = np.ones((10, 1))
z = x.dot(y.T)
 
hmm
(5, ) and (5,1) isn't the same thing?
 
Nope.
import numpy as np
x = np.zeros((5, ))
y = np.zeros((5, 1))
print('x', x, 'y', y, sep='\n')
#output
x
[ 0.  0.  0.  0.  0.]
y
[[ 0.]
 [ 0.]
 [ 0.]
 [ 0.]
 [ 0.]]
Also
z = np.zeros((1, 5))
print('z', z, sep='\n')
#output
z
[[ 0.  0.  0.  0.  0.]]
 
but what if that's what I want to do? AssertionError: View function mapping is overwriting an existing endpoint function: drop_all
 
morning everyone
 
1:12 PM
@kush pass the --YOLO flag
 
morning
@excaza import idc
 
1:38 PM
Hmm, what was the name of that module that lets you redirect stdout to a buffer that you can read from?
I'm pretty sure it exists because the last time I wrote an StdoutRedirector myself, wim or somebody asked "why aren't you just using the built-in solution, <insert module name here>?"
Oops I stopped caring because the question I was going to answer using that information got a dupe target
 
but now I'm interested :(
 
I think Kevin's talking about this: stackoverflow.com/questions/42649737/…
@Kevin That vaguely rings a bell. But it's pretty easy to write a simple file-like class that's adequate for capturing stdout.
 
On second read, it's double-irrelevant because the output that OP wants is from a different process (presumably, going by the "subprocess" tag), so they can just use check_output or something.
 
It's hard to tell, The question is pretty vague. And I think I saw a similarly vague question by that OP a few days ago.
FWIW, here's an answer I wrote a few months back that captures stdout to a BytesIO stackoverflow.com/a/41074300/4014959
 
It annoys me that when you use the room's "searching for... when said by..." feature, if more than one person on the entire site has the name you're searching for, there's no way to distinguish between them. There are four wims and five Wims and there's no way to say "the one with the badger avatar"
Now I have to trawl through the transcript to find his user id.
Feb 15 at 17:18, by wim
better yet, we already have a built-in context manager for it https://docs.python.org/3/library/contextlib.html#contextlib.redirect_stdout
That's it. I guess I misremembered because it isn't an all-in-one solution. You still need an object to redirect to, this just helps you avoid having to do old_stdout = sys.stdout; sys.stdout = myObj; ...; sys.stdout = old_stdout
Maybe I could write a userscript to inject avatars into the search list. http://chat.stackoverflow.com/users/search?q=kevin&limit=20&timestamp=148889528‌​6110 returns a dictionary of ids and "hashes", although half of them are actually urls that point to avatars. Maybe the ones that don't look urly are gravatar ids.
 
2:16 PM
@Kevin I find the irony of a Kevin saying this almost unbearable. :D
 
It's also a problem when I search for my own name, yes
Let's see... How do I add parameters to my XMLHttpRequest...
I guess I just append it to the url? Urgh
 
I just commented on a fresh Raymond Hettinger answer. I wonder if I'll get a response.
Does c = a.copy(); c.update(b) have an advantage over c = a | b ? — PM 2Ring 3 mins ago
 
>>> {'a': 5}.keys() | {'b': 6}.keys()
{'a', 'b'}
>>> {'a': 5}.keys().copy().update({'b': 6}.keys())
@PM2Ring if you consider the fact that it would stop working with keysets an advantage, then yes :P
 
@Withnail When I see a comment by a Kevin I just hover over the name and check the rep. If it's around 45k I know it's probably our Kevin. :)
 
Oops I can't test my script on a local html page because the same origin policy doesn't let me send GET requests to stackoverflow.
 
2:23 PM
Hmmm. Sounds difficult to automate. ;)
 
@PM2Ring hmm ah:P
but dictionaries do not have or
>>> {'a': 5} | {'b': 6}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
 
@AnttiHaapala But he's creating the union of the dicts, not the key sets.
 
@PM2Ring then my latter one...
 
\o wet cbg morning
 
@AnttiHaapala Oops! Comment deleted.
 
2:34 PM
cbg
 
@AnttiHaapala My excuse: I was flipping between the set and dict docs, and in my haste I lost track of what page I was looking at. :)
And now Raymond Hettinger probably thinks I'm a clueless idiot who doesn't know the difference between a set & a dict. Oh well. :)
 
@PM2Ring wow, Raymond has answered that
 
Yeah. And I have the same score that he does, even though he answered earlier. :)
I saw him answer a fairly basic question a day or so ago. He didn't get many points. Maybe people didn't realise it was the Raymond Hettinger. Or they just don't know who he is.
 
2:49 PM
Lol, Yep.
 
cbg
 
How do you think the other answers compare?
 
cabbages
 
I read an article just now, explaining how well numpy performs with image analysis. I never really thought of using numpy that way.... Guess another reason to set up a remote box to play with Python at work
\o cbg Joe, waddup :D
 
Hello
I am new to python i mean noteven started
I want to run this program
import itertools

def kbits(n, k):
    result = []
    for bits in itertools.combinations(range(n), k):
        s = ['0'] * n
        for bit in bits:
            s[bit] = '1'
        result.append(''.join(s))
    return result

def g(s):
	mx = -1
	count = 1
	for i in xrange(1, len(s)):
		if s[i] == s[i - 1]:
			count += 1
		else:
			count = 1
		mx = max(mx, count)
	return mx

def flip(s, k):
	s = list(s)
	for i in xrange(len(s)):
		if k[i] == "1":
			s[i] = '1' if s[i] == '0' else '0'
	return "".join(s)
It is giving me syntax error
 
2:59 PM
what syntax error are you getting ?
 
When i Click Run module
it says invalidsyntax that is all
 
Let's see... Works for me under Python 2.7, fails with SyntaxError in 3.X. Probably the problem is the final print, which requires parentheses in 3.x.
 
Are you on Python 3 or Python 2 ? also when you get a syntax error it tells u a rough estimate
I second Kevin's statement
 
it says in last printf
i mean does not say
 
Change it to print(f(n, k, s))
 
3:01 PM
>
I am new to python i mean noteven started
 
just f there is highlighted
 
But even that won't give you a functional program, because raw_input does not exist in 3.X.
 
Where are you getting this code? A tutorial? That is a 2.7 tutorial and you are using a 3.X interpreter. Consider using a 3.X tutorial instead.
 
Python 3 Print works different than Python 2...
 
3:03 PM
no actually i am solving a comptetetive programming question
and i have made a C Program
 
The C program fails somewhere and i am not sure which test case went wrong
so i took a program that got AC and now checking my C Program basede on test case
@Kevin
 
Ok, so it sounds like you don't have a choice in the matter, so my "try using 3.X code" advice doesn't apply here.
In that case, go download a 2.7 interpreter instead of a 3.X one.
 
so should i delete 3.x
or it will be there side by side
i am on windows
 
You can install multiple interpreters side by side.
 
3:06 PM
Installing currently
By the way
i want to ask something
If someone does more than one langauge
wont he get confuse?
 
How do people speak more than one language (French, English, etc) don't they get confused?
 
I don't know, ask that person.
@SurajJain also, please stop typing your messages on multiple lines. Look, you can type complete sentences before you send them.
 
sorry why are you being rude
 
Ok, so, I translated all the 2.7-specific functions to their 3.X equivalents: pastebin.com/TGmF0SW6 However, I give no guarantees about whether this code will produce the desired output. Because I have no idea what the desired output looks like
 
he's just confused, too many languages
 
3:09 PM
Now you don't necessarily need to download another interpreter.
 
i actually downloaded
it
now i have both side by side
thanks a lot
 
Ok, I've got the base functionality of my avatar-fetching code working. Now to come up with a reasonable UI design.
 
don't forget to make it webscale
 
Pink and sparkly unicorns
(Essential for any user interface IMHO)
 
3:14 PM
@Kevin rabbit feature?
 
it should also "pop"
 
For those just joining us, I'm trying to create a userscript for chat.stackoverflow.com/search?room=6&q= so that you can select from a collection of avatars when searching by user, if many users share that name.
Use case: you want to search for something I said. You enter "Kevin" into the "said by" box. Twenty Kevins appear in the dropdown. "I want the one with the green gravatar", you say.
But there is currently no "I want the one with the green gravatar" checkbox, so you have no choice but to execute twenty individual searches.
 
Yes, I need that. Why isn't that already a thing?
 
27 secs ago, by davidism
Yes, I need that. Why isn't that already a thing?
 
sigh...one of these day's I'll remember how aggressive GC is
 
3:21 PM
It would be super hard to inject avatars into the existing dropdown box, and it would probably look either goofy or illegible depending on how big I render them, so I'm thinking it should be a more standalone control. Maybe I'll put in a magnifying glass next to the text box, and when you click it, my search-by-avatar box appears.
 
MIA today folks. Big pair-programming day
So rhubarbing myself out of here
<3 stay fresh room6
 
:)
 
I got the basic down of classes and I want to start some kind of intermediate project with classes. Any ideas?
Maybe a project in which I have to inherit from other classes
 
3:39 PM
Chess?
 
Isn't that a hard project?
 
Hold on, reading your mind to determine what you consider hard... Nothing.
Just pick something you're interested in and do it.
 
@SebastianNielsen Eye of the beholder, really
 
Alright I'll give the chess a try.
I love chess by the way, I am a beast at it. It just sounds like a hard project
 
3:45 PM
Writing a two-humans-only multiplayer version is far simpler than designing an AI that can challenge a person.
 
Depends on what you implement, I guess. Just making a simple 2-player game is just a matter of implementing the rules / pieces / mechanics, but if you add AI, that's significantly more complicated
Damn it, Kevin
Kevin'd again
 
The hardest non-AI part is probably dealing with player movements with special environmental restrictions, in particular castling and en-passant pawn capturing
 
Should I make a class for each piece as well as one for the board?
How should I tackle it?
 
That sounds reasonable, sure.
 
@MarcusS All the answers are pretty good, some may be improved by minor tweaks. Inbar's original short version was flawed because it used the or operator, so it could give wrong results when dealing with false-ish values, but he quickly fixed that.
 
3:49 PM
One way to possibly simplify your work is to have each piece class extend/inherit from a base Piece class of some kind, which has actions/attributes/properties that are common to all pieces
 
one thing that makes me super annoyed: when people claim something in a code review, but a quick google disproves the claim they're making
 
In chess there is not one single thing that every piece can do. Like for instance not all pieces can move one field forward.
 
But all pieces have a position, and a name, and a color, and (if using a GUI) an image.
 
@SebastianNielsen Right, but... sigh. What Kevin said.
I have got to start typing faster
 
Kevin do you know of a good GUI to write this chess game in.
It could be an interesting project
 
3:53 PM
Whichever one you're most familiar with.
It's not like they designed, say, QT so that it's inherently better at rendering chess pieces than Tcl.
 
For now I might recommend making a basic "print the game state in ASCII" method just so you can get the game logic down first
Then you can add all the bells and whistles later
 
@SebastianNielsen who's writing this, us or you? Sit down do some research and thinking, and start working.
You're never going to finish it if you keep thinking ahead to how you're going to make it 3D VR battle chess.
 
Yeah, I get it thanks.
I won't make use of a gui.
But I need some help to get started, should I make a "self.a4" for each of the fields on the board?
That's what I think about doing.
But maybe that is not the best approach
 
A master has failed more times than his pupil has tried.
 
Come on man, I just want a push in the right direction.
I don't want to look up a code that another person have made.
 
3:59 PM
I'm thinking either a 2d list or a dictionary with (x,y) keys.
 
Try to keep it modular. IOW, you should try to keep the game logic separate from the GUI stuff. That way you can just print to the CLI, or use various GUI engines, even make it into a Web app, without having to rewrite your core game logic.
 
Just do it how you would do it, and don't worry about how others would do it. Once you've done it your way, improve it if you want, by looking at other people....
 
Right, whatever I'll just write something, and hope it works. Thanks for the tip 2ring.
 
2 mins ago, by Sebastian Nielsen
That's what I think about doing.
Then you should try that.
 
4:02 PM
I simple just wanted a push in the right direction to get started davidism, but there is not that much help to get here. :/
 
I'd be kind of interested in seeing a fully functional implementation of chess that uses self.a4-style attributes to store piece locations, in a morbid sort of way.
... Without using getattr or setattr at all.
 
another fun way: dont even save the current locations, just save the moves which were made and calculate from there :D
cbg btw
 
@SebastianNielsen A board with 64 individual attributes for the squares sounds messy. Think about using some kind of collection that can be indexed.
 
@SebastianNielsen If we gave you a push in the right direction, how would you judge what's the correct direction on your next project? Would you just stick to that one direction, blindly, not knowing why we picked it? The direction you should be concern right now, is not the right direction or the wrong direction, is which direction should I take. The process of thinking about a direction is really important.
 
Alright I just searched for a chess code now, take a look: github.com/niklasf/python-chess/blob/master/chess/__init__.py
It's so long!
 
4:06 PM
Better get started then
 
almost 4k lines xD
 
@davidism I guess if he tries that he'll learn why it's not fun doing it that way. ;)
 
Good lesson.
 
I think this is too large of a project to begin with, I'll prob not finish it anyway :/
I have to be realistic.
 
26 mins ago, by davidism
Just pick something you're interested in and do it.
 
4:08 PM
Most projects go unfinished, I find.
 
And I should aim for projects that I can finish.
 
try tic tac toe for beginners, then do a game of 2048 and then go with chess.... i feel like the learning curve is better that way
 
@Kevin I hope that's not a prediction to your userscript :D I want to see that working avatar search
 
That would slightly challenge me
 
It sounds like your ideal project is one that doesn't involve code, or can be done entirely by asking this room.
 
4:09 PM
Not f*** kill me with 4k lines of code :P
 
@Kevin but thats the interest part - figuring out how it works; not actually completely implementing it - thats typist work :P
 
There's value in starting a project you know is too hard for you, if you know that you'll learn something along the way
 
I am already done by the way, I copy pasted from github :)
That was easy.
#ImAProgrammer
 
@SebastianNielsen Not all chess implementations will require 4k lines of code. I suggested chess because it has some good opportunities for learning OOP / inheritance and modular design, and in this case it happens to be a game you know well. Sometimes the projects that seem daunting at first are the ones you learn the most from.
 
4:10 PM
I think it would be better to create a game like ludo.
 
But if it's not up your alley, just pick something else
 
Also if you do a project that someone else has done, you can compare yours to theirs and see what you could have done better. I did that during AoC, before I fell too far behind :P
 
@SebastianNielsen Not much opportunity to do OOP stuff with a game that simple. But it's still a good coding experience. And then you can move onto something more challenging, like Freecell.
 
user6845426
4:33 PM
cbg o/
 
user6845426
are functions executed automatically when a program is compiled?
 
Python executes everything at the module level when it's imported.
 
user6845426
I'm looking at someones git which using theano to implement convolution layers, but they define functions to handle input but I cant see any calls to it. That must be why
 
I doubt it. Functions aren't executed at import, code is.
They're being imported or introspected from somewhere else.
 
Functions don't get called on their own. How would Python even do that? Suppose your function has eight parameters. Is Python supposed to just guess what those values should be?
 
4:40 PM
It's using the same mechanism that we use to guess what people's vague questions in this room actually are.
 
user6845426
Yeh true. I'm obviously missing something when reading this code, thanks guys
 
When I write def launchNuclearMissile(name_of_city):, I definitely don't want the interpreter to call it on my behalf
9
 
Kevin! snakeCase? For shame.
 
I am become deathDestroyerOfWorlds
 
4:42 PM
now_we_all_sons_of_bitches
 
Hmm connection issues again
 
@KevinMGranger When dealing in crimes against humanity, may as well go all-in.
 
@Kevin When you write?
 
I also wouldn't be surprised that the argument for nuclear proliferation is "just copied from java"
 
nah, in python it's just: from nukes import *
 
4:44 PM
from __future__ import winter.nuclear
 
There used to be a spoof website for an OS that launches nukes whenever C code invokes undefined behaviour.
Much more impressive than merely deleting your HD or dumping core.
 
C programmers would still smugly tell you "well, of course that's undefined. What did you expect? What the OS did was valid per the spec."
 
Exactly
 
Aren't c programmers always depending on the local specifications?
 
Only the crappy ones.
 
4:49 PM
I've seen many adruino programs where I think "hey that's not standard c!"
 
I'm not familiar with arduino, but remember the separation between the C standard, the C standard library, and a POSIX operating system. It could still be valid C that just happens to not work on any other OS in existence
And then if you want to get more pedantic, the separation between a POSIX standard and all of the OSs that claim to follow it :P
 
OK, stuff written for specific hardware and especially embedded systems is allowed to bend the rules.
 
Let's just ignore Microsoft Visual C(++)
 
People who program exclusively on Microsoft OSes have a long tradition of ignoring the rest of the universe. They were doing that before Windows came along.
 
/me waves from his castle visual studio. - Hi down there.
 
4:58 PM
Hi, I used to be president of my school's Linux Users Group, and I admit that Visual Studio is the best IDE ever made
 
00:00 - 17:0017:00 - 00:00

« first day (2334 days earlier)      last day (2607 days later) »