@IntrepidBrit That typo is so common that many people, especially those who aren't native English speakers, think that it's the correct term. We discussed that here a little while ago...
quick aside: anyone have a good recommendation for an android meeting recording app? Preferably with auto transcription?
I've gone with a few in the past, but there's always some little feature missing that drives me up the wall (ie - no easy sync with dropbox or google drive)
I need to do some data visualization this week. We're going to be playing Risk at board game night and I want four hundred tables each describing the likelihood of outcomes of a battle between N attackers and M defenders with 1 <= N, M <= 20.
OK, but is it normal that it takes up a buttload of mem when nothing's using it, and that it allocates new memory when needed instead of freeing up from the slab?
I actually need something more like eight hundred charts because we're playing Risk Legacy which has additional rules like "when defending a country with a depleted supply line, subtract one from your highest die roll" and "when playing as the Saharan Alliance and you roll two sixes while defending, the attacker can no longer attack that country this turn"
After running for about 18 hours, this system is using ~10GB of memory, causing the OOM-killer to be triggered when we run our usual tasks:
# free -h
total used free shared buffers cached
Mem: 14G 9.4G 5.3G 400K 27M 59...
@idjaw There's a board game?1?!?!?! I need to buy it now...
Oh btw cbg \o Joe. If you didn't know Overwatch is having a Chinese New Year event, looking like Mei and D'va getting some special skin (not sure about the other heroes).
just want a config file at the base level and some dependency specifications with a single example. The JS ones try to include everything they possibly can.
@WayneWerner Risk Legacy is apparently better at this. You don't need to kill every other player to win.
You only need to get to four Victory Points, which are acquired by 1) capturing an "HQ" country, or 2) trading in four of the cards you get each time you win a fight.
So in theory the game could end after only 12 battles
Our first session finished in an hour and a half but I expect next time to be faster because we know the rules now
I love the story behind OP Gandhi (IIRC something to do with setting an aggression level to -1 or something and it wrapped back around to 255 in testing)
@idjaw What source of magic is 'too much smoked salmon' ? Also, it's Friday, video game all weekend long! (is my plan, I think I'm pick up Diablo 3 again)
@mojo706 the rule is: use 3.latest you can find, and if you have problems with some libraries that seem to require python 2, come here and complain about them :D we might be able to find alternatives.
I haven't found anything in the past few years that couldn't be ported to Python3 with fairly little effort. Anything that's big enough to matter probably already supports 3
There's a Tableau API they use here at NumberFirm which is nominally 2 only, but they publish the code so I was able to make a 3-compatible version which works for me. That's the only one I've hit recently.
> With that, we successfully raised the shared memory of each worker process from 140MB to 225MB, and the total memory usage on the host dropped by 8GB per machine. This saved 25% RAM for the whole Django fleet.
> We strongly recommend you don’t use Learn Python The Hard Way. It contains some “interesting” decisions, and its structure tends to lead people into asking premature questions.
Then no. There are certainly changes I don't like in various languages, e.g. the new typing syntax they probably use in Woolerton (pause for spit), but I definitely prefer modern Python on the whole. And modern C++ is way better than older, modern JS is better than older..
I try to do site-specific searches using site:stackoverflow.com on google, which works for the first page but when I go to page 2 it's broken that apart into "site stackoverflow.com". Does anyone else have that issue?
I wonder if anvaka.github.io/common-words/#?lang=py is counting the contents of comments... Is a truly the most popular one-letter variable name, or is it getting an artificial boost from also being a word?
Ok, so roughly 37k of them are names. But s has a similar problem because it counts words ending in apostrophe-S, and it counts the %s in old timey format strings.
@DSM I'm pretty happy with the explicit self. Plus it removes the need to do any kind of weird hackery by the implementation in injecting self in the locals for every method
The only thing I don't like about explicit self is the questions by confused newbies asking "why is x.y(z) saying expected three arguments, got two when I'm giving it only one argument?"
Maybe I'm missing something. When we call a method, we don't pass the class instance: Python handles it. So it must know it needs to pass it, and if it knows that, why can't it mention it?
My intuition is that the part of Python that handles self for you is separated from the part of Python that raises TypeErrors on bad function calls, to the extent that it's hard to get one to communicate with the other
Not that I've ever seen anything in the source that confirms this. It's only a feeling.
Also the anthropic reasoning: if this were easy to implement, we wouldn't be having this conversation, because it would have been implemented
That's plausible enough. It's also possible that there's a performance cost which every happy path would then pay just to improve the error message, though that seems a little unlikely to me.
so this error now only occurs when the number of arguments is exceeded
>>> Foo().bar(1, 2, 3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bar() takes 3 positional arguments but 4 were given