« first day (3288 days earlier)      last day (1882 days later) » 
00:00 - 17:0017:00 - 00:00

wim
wim
00:01
what's the connection to milk? why would you assume homogeneity of the universe?
On the very large scale that cosmologists work in, the universe is fairly homogeneous. The universe is modeled as a homogeneous cloud of dust, with the dust particles being galaxies.
And milk is often homogenized. :)
An earlier xkcd comic on the dark matter density in the solar system: xkcd.com/2186
wim
wim
00:16
hmm so it's the same joke but in the earlier one they assume inhomogeneity ?
can anyone find a video for this? can't find it on youtube montypython.net/scripts/camspot.php
wim
wim
01:15
 
2 hours later…
wim
wim
02:57
Wow, the import docs have had placeholder crap in them since forever ... docs.python.org/3/reference/import.html#open-issues
 
1 hour later…
03:59
Does anyone know how to install MANIM?
@piRSquared Sorry to ping, but I'm running out of time. Can you please help me with an installation issue?
 
2 hours later…
05:58
Hi All, I really need some help here please:
https://stackoverflow.com/questions/58412457/how-to-write-scraped-data-to-a-data-frame-in-the-correct-order-in-python
@wim works for me. Maybe you got the capitalization wrong?
 
1 hour later…
07:22
Seen in a random OP's code: (open(zip_file,'rb')).close() Ouch.
Did I get it right now :D
Yes. There's really no advantage to having the return outside of the with though
oh....
wut.
:D
07:56
@Aran-Fey there's no functional difference but isn't it nicer to have tight with blocks?
I guess
So the epg's object still exists? (I guess I could just run it and see.)
08:18
@DarkRunner what's the problem? it seems to work just fine on a fresh debian with python 3.6
$ pip install manimlib
Collecting manimlib
  [...]
Successfully built manimlib progressbar pycairo
Installing collected packages: argparse, colour, numpy, Pillow, progressbar, scipy, tqdm, opencv-python, pycairo, pydub, manimlib
Successfully installed Pillow-5.2.0 argparse-1.4.0 colour-0.1.5 manimlib-0.1.10 numpy-1.15.0 opencv-python-3.4.2.17 progressbar-2.5 pycairo-1.17.1 pydub-0.23.0 scipy-1.1.0 tqdm-4.24.0
user10984358
is there a place where I can see advent of code solutions in python? I want to compare mine with others, though I just started
user10984358
or the whole point of advent of code is to not care as long as your answer is correct?
user10984358
meaning its the approach that matters and not the nifty use of python concepts
@TheNamesAlc I don't do AoC, but various people put solutions on Github, etc. Eg, chat.stackoverflow.com/transcript/6?m=47570742#47570742
nah, it's fun to see how others solved it and marvel at their wizardry. there is a list of people who share theirs somewhere each year: sopython.com/wiki/Advent_of_Code
08:32
@Arne Good thinking. :)
Here's hoping this year unihedron stays away or leaves their competitiveness outside
Here is hoping I actually manage to solve all of them this year =D
The downside of changing jobs so I don't have a crazy long commute each day is that I don't have a set two hours of idle time any more
woe is me
@djsmiley2k Have you seen and Facts and myths about Python names and values by Ned Batchelder? Also see Other languages have "variables", Python has "names" for a briefer version of the same stuff, with cute diagrams.
@Arne poor thing :P
08:48
but yeah, I'm really looking forward to this year's AOC again
@PM2Ring Ooo awesome ty
Thanks @AndrasDeak for that new prime spiral pattern. I love stuff like that which is simple & almost obvious in hindsight, but which nobody's done before... or if they have, they never bothered publishing it because it seemed too simple. :)
ahhh re-binding is a thing I fell over, before :O
@PM2Ring always welcome :)
@PM2Ring Now I'm thinking, I could pass in the empty epgs value, rather than returning it...
but that would possibly make using it as a modle harder...
08:54
@djsmiley2k returning it is better. More testable.
@djsmiley2k Don't worry, everybody does, especially if they already know another language.
Don't worry about lists being thrown away.
@AndrasDeak ok, but the other way 'would' work?
Of course
create a list outside of the function, edit it within the function, 'tada'!
08:55
You don't even have to pass it, you can mutate the global name (but don't do that)
@PM2Ring I'm..... a network engineer, who's had experience doing all sorts of weird stuff. The language I knew 'best' was php, and even then I wouldn't say i knew it well at all, just enough to make things work.
hahah, my very first version of the script was mutating globals...
heh, now I got to the bit about returning values, and it says it's likely the best way. ;)
(And you don't need explicit global epg for that)
It's often quicker to create a fresh list than to modify lots of the items in an existing list. And the resulting code is usually easier to read, and less likely to have subtle bugs. Also, Python is very good at recycling memory, so don't worry about making lots of temporary objects, unless they're ginormous.
What hurts my head is... (going to try and type out something to illustrate it....)

> b_list = a_list ## Points to same values
b_list.append(1) ## updates both

b_list = a_list + 1
## Now they're different?
The last one should be b_list = a_list + [1]
09:01
@djsmiley2k a_list + [1] is a new list
Otherwise you'd use a_list += [1]
The bit that's messing you up is where you say # updates both There's no "both". At that stage, there's a single list object with two names.
cbg
Just curious, is there a way to parse a string as an f-string after it's been already assigned?
var = 42
a = '{var}'
# somehow take the string in a and parse/treat it like an fstring.
(For science. not intended for any practical use.) I haven't been able to figure a way so far. Also, haven't really found a builtin/function that i honestly expected i'd find for fstrings.
09:14
eval('f' + repr(a))
oh, that's nifty
though it doesn't work with closure variables, unlike a real f-string
@ParitoshSingh you may want to use a regular format string in that case
09:30
I'm inclined to re-open that f-string question. It doesn't need a MCVE. OTOH, I guess it doesn't really need more answers, either.
does someone have experience managing python services via puppet? any modules that work well or google-top-hits that one should avoid?
@PM2Ring some code would be useful to understand what the OP actually expects the conversion to mean. it is not unlike people wanting to convert a string to an r-string, which is equally ill-defined.
09:48
@MisterMiyagi Fair point, and there are several questions by confused OPs asking about converting a "normal" string to an r-string. But I think the desired output given in the f-string question makes it clear enough what the OP wants: basically what Aran-Fey's code above does.
@Aran-Fey I've searched for a little and can't come up with such a non-working example. Do you have one handy?
The usual "the variable died before you tried to use it" thing
def func():
    var = 42

    def closure():
        return eval('f' + repr('{var}'))

    return closure

print(func()())  # NameError: name 'var' is not defined
user10984358
has Wim made his repos private? github.com/wimglenn/advent-of-code/tree/master/aoc2015 and the ones for 2016 is inaccessible, at least to me :(
@Aran-Fey thanks!
user10984358
09:53
thank you! just 2 days in, lets see how great people do
I guess I should've been more specific. "doesn't work with closure vars" isn't really correct
@Aran-Fey roughly put, is this because true fstrings are parse-time while eval is run-time?
Yeah. An f-string would be parsed at compile-time and would let the interpreter see that closure tries to access var.
ok got it
10:23
@PM2Ring raw string literals have been around for much longer and still people get confused
10:50
@AndrasDeak Very true. I use this Martijn answer to dupe-hammer such questions. But it's one of those things that can be hard to get if you have a wrong idea stuck in your head. Just reading a good answer may not be sufficient to get your thoughts switched over to the right track. A chatroom (or face to face) discussion may be required.
ah nevermind, I completely missed that you were talking about r-strings yourself
Well, I started talking about f-strings, but Mr Miyagi brought up r-strings.
missed that too :D
I'm good at being redundant today
go a step further and be good at being good at being redundant
only a matter of time...
11:20
brb
@MisterMiyagi aye, honestly, just fooling around with that one in particular, not really planning to use it. Someone asked me this question, and it got me thinking
@Aran-Fey ooh, i see thanks
11:43
cabbage
No @TheNamesAlc, this is the link. the one referenced in the wiki is obsolete.
12:01
I updated the wiki
Wow... it's amazing to think we missed it was the 6th anniversary of @Kevin being an RO on the 3rd of this month... how time passes...
Happy Anniversary @Kevin
Time sure flies
and @poke was 5 years on the 2nd...
and @idjaw 3 years next week... wow... just wow
12:17
🐍🐍🐍 party time 🐍🐍🐍
We’re old.
@poke speak for yourself... I'm still a puppy and staying that way :)
You did look younger 5 years ago though. But maybe that’s the ninja outfit.
I think that's just your aged eyes... I look younger than I ever did... cough... cough...
Only one of us is wearing a ninja mask that might cloud the vision.. rolls eyes
12:28
Thinking about sailing west to the Undying Lands, lads
need to find Círdan first
or can we make a raft out of codeless debugging questions?
I think I've got his LinkedIn, no problem there
12:46
@joncle My memory fails me a bit but wasn’t I already RO before that? (And then I went for a break, returning Oct'14)
@poke You can say that when you're 60. ;)
Halfway there..? ^^"
I kept a "how do I pad this string?" question open too long and now all four of the answers recommend doing overly complicated length arithmetic instead of just calling ljust with the correct precedence and now I'm mad.
answerers on SO find a way to disappoint even on the easiest questions
I'm pretty sure I'm the oldest Room 6 regular, apart from Foul Ole holdenweb.
@Kevin I guess there aren't any f-string or format answers, either.
12:53
I looked this up once and ThiefMaster has the earliest comment on record in the transcript but the oldest regular active user is PaulMcG
I added an f-string answer, although to my shame I couldn't come up with a solution that uses only f-strings
I guess I could have done f"{f'{x}.':<11}" but that's silly
@AndrasDeak I'm struggling with this joke. Does it have something to do with logs?
But there also was some python chat room merge that happened and I think one branch of the transcript was effectively lost
Perhaps MCVEless questions make the best flotation devices because they're so vacuous.
I think we need to consider the two lives of this room: The old one, and the one after it was rescued by @JonClements. So we have two eras: BC and AD – Before jon Clements and After jon Did rescue the room.
12:59
Haha, see, because buoyancy is inversely proportional to density, and the vacuum is the least dense thing there is... I'll see myself out.
@Hubro no, it was just zero effort
@Kevin No emoji keyboard here so... Haha
@PM2Ring me too
@AndrasDeak There was a great joke in there somewhere :P
sorry :P
13:04
@Kevin I figured the best questions to be used for flotation devices would have been about floats
@poke "rescue"... umm... nice to be appreciated though :p
:D
@Dodge xD
13:30
Hmm, how long has it been spelled "flotation" and not "floatation"
heck - why not just "flowtation"?
That's how it will be spelled after the post-modern English reformation
cbg. I'm looking for something quite hacky but my searches keep getting derailed. I want to create a demo version of my flask software that's currently hooked up to live data. A lot of the app takes the current datetime into account (e.g. the last month's worth of machine production from this point backwards). If I stop feeding live data to the demo, most of the functionality will break over time. Is there a way to launch the app and it forever think that "now" is the current datetime?
@Kevin I was surprised to see it when you wrote it, but only a few weeks ago I was surprised at "forty" so I shouldn't talk...
@roganjosh Yeah... there's a "freeze" kind of library that you can decorate functions with and it intercepts calls to datetime etc...
13:39
it's for testing but github.com/spulec/freezegun
postmodern English will also do away with eleven and twelve, replacing them with the much more logical oneteen and twoteen
Thanks guys, I'll have a look into that
it's mostly used for test stuff... but ^^^ ugh... Kevin'd - that's the one I was thinking of... darn you @Andras!
The debate over whether to change thirteen to threeteen will ravage several countries
am darned
@Kevin I think we should make it simple by dropping 13 entirely, just like hotels do
13:41
@AndrasDeak as long as Room 1408 is still available - that's fine :p
redrum
We're going to sprinkle some Ms among the lower numbers because at the moment it doesn't show up until 1,000,000
@AndrasDeak "here's..... puuuuuuppppy!" :p
13:53
It bothers me that "foobar" * -2 evaluates to the empty string. Perhaps it's nice for people trying to format their data, who would prefer incorrectly padded output instead of a ValueError, but that doesn't mean I have to like it.
What else would it evaluate to?
an error I guess
Or do you mean it should raise an exception of some sort??
Either an exception or "ɹɐqooɟɹɐqooɟ"
3
raboofraboof
13:55
I never would have thought to multiply a string by a negative number
also the lack of parentheses disturbs me
seems I got Kevin'd yet again... /me glares at Andras
Would you still allow * 0 though?
Yeah.
One common place you might see string multiplication pop up is if you're writing a homebrew string padder, e.g. pad = lambda s, x: s + " "*(x-len(s)). It's conceptually valid to do pad("foo", 3), so it should be valid to multiply space by zero.
plus multiplication makes sense for natural numbers
as in "how many apples?"
I have some ideas about complex-length strings, but the world isn't ready yet
wim
wim
What do lists do here?
14:03
Let's see...
>>> [1,2,3] * -2
[]
In [1]: import numpy as np

In [2]: a = [1, 2, 3]

In [3]: a * -2
Out[3]: []

In [4]: A = np.array(a)

In [5]: A * -2
Out[5]: array([-2, -4, -6])

In [6]: np.repeat(A, 2)
Out[6]: array([1, 1, 2, 2, 3, 3])

In [7]: np.repeat(A, -2)
ValueError: negative dimensions are not allowed
@DarkRunner sorry, I have no experience with manim
cbg all
@Kevin And threeteen of course.
This whole teen thing is kind of mess, honestly... Maybe we should just use "onety-one" through "onety-nine"
14:10
Teens are so 2016. Threellennial
For maximum consistency, zero through nine are now zeroty-zero through zeroty-nine
wim
wim
@Aran-Fey I am talking about the anchor links on hover event, in glossary page of docs.
four twenty ten nine... 99... in French
We could go with the standard pattern one-and-ten, two-and-ten
But, hmm, there's still some inconsistency, because "one hundred" precedes "two hundred", but there's no "zero hundred"... Ok, zero through nine are now "zero hundred zeroty zero" through "zero hundred zeroty nine"
14:13
@piRSquared meh... let's just go for one, two, many, lots...
Cbg, guys! Anyone have the X-Y problem link lying around?
  vvv an infinite number of placeholder zeroes goes here
"(...) zero hundred zeroty zero million, zero hundred zeroty zero thousand, zero hundred zeroty [digit]"
1554
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

@JonClements trolling ;)
@JonClements <thumbs up>
14:14
@Andras I'm sure you have other things to do... don't let me detain you? :p
@wim oh, that's this one
@JonClements many melons
Speaking of strings & negative numbers, here's something I saw in a Martin Gardner column. Let a=1, z=-1, b=2, y=-2, etc. Then (-4, 9, -1, 1, -9, 4) encodes "wizard".
14:32
@Chillie watermelon
Additional magical words:
bevy [2, 5, -5, -2]
girt [7, 9, -9, -7]
grit [7, -9, 9, -7]
hovels [8, -12, -5, 5, 12, -8]
trig [-7, -9, 9, 7]
vole [-5, -12, 12, 5]
wizard [-4, 9, -1, 1, -9, 4]
https://bpaste.net/show/7iKS -- so I have this file, members5.py in my directory. If I import getMembers from members5

Will that import everything that the module needs to run, or does it litterally just import that function?
Only getMembers will be directly accessible in the file that you're importing from, but when you call getMembers it will be able to access searchGroup and whatever other local values it requires
Thanks, Kevin.
@Kevin ok, that's what I wanted. Ty @Kevin
From my magical list I have excluded some short words such as "za", and some words that I have deemed to be fake, such as "levo"
I guess there'll be a few odd length patterns, where the middle letter can be anything.
I struggle to understand the thought process of users that ask questions like "I've noticed that [fundamental feature of the language] is pretty slow. Can I make it faster?", where the feature is something like "modulus" or "function calls". Do they think that the language devs wrote an intentionally slow implementation as a joke?
Note that this category does not include users that ask something more focused like "can I make my recursive function faster?" and then post the O(2^N) version of the fibonacci function. That's fine.
"Why is my recursive fib(n) slow?" --> acceptable
"is there a speedup I can apply to all recursive functions?" --> not acceptable
14:57
Can a function access it's caller's space?
MCVE:
I'm tempted to tell them it's faster if they pay for the premium version...
def f(g, a, b=1):
    return g()

def g():
    # do something that accesses caller's frame
    # and somehow return the values of `a` and `b`
    pass

f(g, 'hi') == ('hi', 1)

# I want it to return the tuple `('hi', 1)`
OTOH, pow(a, b, m) is faster than (a ** b) % m when b is very large & m is smallish.
cbg all
can I b!+c# and m04n for a minute about this guy I have to work with?
@piRSquared Perhaps you could use my favorite new horrible hack:
def f(g, a, b=1):
    return eval(g.__code__, locals())

def g():
    return (a,b)

print(f(g, "hi") == ("hi", 1))
If you're thinking "I only have control over the body of g, not f", perhaps you could do something with inspect...
15:01
@inspectorG4dget Possibly...
@Kevin the latter, however I'm intrigued by the horrible hack
@PM2Ring "How can I make (a**b)%m faster?" is acceptable to me. I consider the combination of two operators to be more than one fundamental feature of the language
ooooo ooooo going to do something horrible
I have some IP's that are just hosts, and some that are networks...
him: calls me over to help diagnose/solve a python issue
me: test whether `pd.func(arg)` actually does what you think it does
him: <checks>. It does!
me: then, `arg` isn't what we think it is. Easiest way to diagnose this is to wrap <problem line> in a try/catch and print out `arg`
him: I don't want to do that
me: why not?
him: because I don't want to
<cycle repeats 2-3x>
but to be honest I don't care other than the IP part (even if it's a network, I don't care about the subnet).
wim
wim
15:04
@Aran-Fey oops, right you are. could you loosen the url matcher to make it work on docs.python.org/2/glossary.html too?
him (finally): can't rerun because that involves <way too much effort with CI/CD>
me: oh! that actually makes sense. Maybe tell me that next time. Otherwise it looks like you're just being lazy
him: I shouldn't have to. You should assume that I'm not being lazy
me: ragequits
background: he usually takes the lazy way out
@piRSquared horrible hack v2.0:
import inspect

def f(g, a, b=1):
    return g()

def g():
    caller_locals = inspect.stack()[1].frame.f_locals
    return (caller_locals["a"], caller_locals["b"])

print(f(g, "hi") == ("hi", 1))
wim
wim
@piRSquared looks useful, cheers
Woooooooooooo it almost works
15:07
@Kevin don't be so down on the hack. It'll get a complex
and ty. that's exactly what I was looking for
@inspectorG4dget I have a circle of trust, where I automatically assume that any member has a good reason for whatever wacky thing they're trying to do. That said, none of my coworkers are in the circle of trust.
wim
wim
@Kevin friends don't let friends do crack frame hacks
piRSquared is in the circle of trust, which is why I just gave him two loaded footguns.
https://bpaste.net/show/CUQ2 -- main script, https://bpaste.net/show/_S9f, https://bpaste.net/show/F_ok

It's almost right
don't worry about me... I point them outwards while I do cartwheels
15:10
except the final function call is returning a blank list :/
well, it's also partly that I'm new here (3 months) and he's not (1.5 years). What bugs me is the apparent mentality of "because I said so" rather than explaining reasoning. Makes it seem like he's posturing himself to intentionally make me look clueless
holy crap it works!
@inspectorG4dget oh that kind of person hey... luckily I've not had many positions where I've had that
... or am I just reading this wayy too wrong (as far as you can tell from a condensed one-sided account over the internet)
A good developer should always be prepared to explain their reasoning. Even if they're in the circle of trust of everyone on the planet, it's still a good sanity check.
15:14
omg omg omg it works \o/ \o/
I just need a neater printout, than using print(repr(allEPGs))
see that's what I thought... Also, I figured I could use it as a learning opportunity about how our CI/CD works (and where/how it can be frustrating), while helping out a friend. But that seems to not only not be in the cards, but not even allowed in the deck (if that makes any sense at all)
I think there's a time and place to say "I can't explain it to you now because you'd need a ton of context that you'll only be familiar with later", but I don't think that's what is happening here
@djsmiley2k try
print(*[repr(EPG) for EPG in allEPGs], sep='\n')
wow that's o_O
/me also needs to add dedup
:D
@Kevin I would have accepted that. That would have been "trust me, there's a good reason, but not enough time to get into it right now". But "because I don't want to" just seems like a d!|{ move
15:19
I was v. lucky in the full-time jobs I've had, my seniors acted as mentors and weren't focused on "the known" ways of doing which they taught me, but also welcome "to be taught"? @inspectorG4dget
my manager is fine in this respect. This guy is actually a good friend from back in the day, who actually referred me to this position. Makes it even more difficult for me
I think I've created a list of lists?
What I should really do, is take the objects from the returned list, add them to the 'big' list. Then dedup the big list and print it out.
My crystal ball tells me that if you want to make a big list out of smaller lists, you should use extend instead of append
huh thanks @Kevin! I was kind of thinking out loud there, rather than asking :P
@inspectorG4dget then maybe the best thing is, especially if they're a friend (and while it's difficult if you're friends), you should evaluate the level of friendship and criticism you can both take. It takes nothing to take 20 minutes out of the day and just have a 1-1 chat to hopefully make you both reach something you can move forward with.
15:22
X.extend[y] ?
/me googles
>>> big_list = []
>>> big_list.append([1,2,3]); big_list.append([4,5,6])
>>> big_list
[[1, 2, 3], [4, 5, 6]]


>>> big_list = []
>>> big_list.extend([1,2,3]); big_list.extend([4,5,6])
>>> big_list
[1, 2, 3, 4, 5, 6]
@JonClements that's helpful. Thanks. I'm gonna put some time on his calendar
@inspectorG4dget just keep any conversation neutral... there's no who's right/wrong etc...
Don't be submissive or aggressive kind of thing
@Kevin thanks, I'm used to be people just shouting at me to go read rather than answeing! I should stop wasting good answers!
I got extend and deduplication working !
just try and keep it neutral and have a discussion of why you thought what you were doing/thought you'd do was better than their's and listen to them as well
15:26
@JonClements I'm going to try to do the "when you do ____, I feel ____" format. Keeps away from the blame game. Thanks for the advice.
'when X happens, I feel Y.'
That way, you're not directly blaming them for X.
@inspectorG4dget nope... avoiding feelings
and remove the person from the equation altogether (or at least use a "royal we")
I understand what you're saying, but I'm having trouble figuring out how to describe an action without saying "when you do <X>", which immediately brings him into the narrative
I am reminded of back in high school, when I'd play Magic: The Gathering during lunch period. Some of my opponents had a habit of countering my spells and saying "it's countered". I criticized them for using passive tense and insisted on "I counter it". If they were going to rain on my parade, I wanted them to at least take responsibility for it.
for example, how would I say "when you don't tell me the reasoning behind a decision, it makes it difficult for me to understand that decision and extrapolate it to other similar decisions" without the "you" in there. I could abstract it away as "when someone says", but that almost seems like I'm trying to posture into some high ground
15:32
This is all a long-winded way of saying that passive language isn't guaranteed to minimize the amount of jimmies that are rustled.
something along the lines of: "We both agree on the end-goal, but we seemed to have a difference of opinion the other day... can we work through those and discuss both our opinions?"
ok that helps. thanks
I'm skeptical that the "official" form of nonviolent communication even recommends avoiding direct subjects in the X segment of "when X, I feel Y"
/me shrugs
I've just seen people get offensive.
errr defensive.
I'm an avid enthusiast of overthinking my words so they can't possibly be misinterpreted, so I think I'm in a good position to say: some people will take things the wrong way no matter what.
15:35
@djsmiley2k Kevin's showed you how to make a flat list using extend. To dedupe that flat list, you can probably use a set.
That is, collect stuff into a set instead of a list. You can't use extend, because that's a list method. But you can probably use union.
@Kevin always depends on context - it's a weird one
bigList = [i for s in listOfLists for i in s]
bigList.reverse()
dedup = set(bigList)
inds = {e:len(bigList)-i-1 for i,e in enumerate(bigList)}
answer = sorted(dedup, key=inds.get)
that's a basic sketch off the top of my head
@Aran-Fey THVM! It's working, but why it works? I till not getting why perms.append(chosen) can't append the value chosen is currently representing. Can you tell me a little bit more about it?
If you don't need to preserve original ordering, then deduped_list = list(set(the_list)) would work fine
@Kevin heck... over the years and years, depending on the person I was dealing with, you have to switch "approaches" as it were... some wouldn't have get the point hammered home until they were called into the office and were asked "you've fed up - what the f is going" and others needed to be "we've got a tricky situation here, where do you think we've not got things quite right?"
15:43
> allEPGs.extend(getEPGs(myMember))
allEPGs = list(dict.fromkeys(allEPGs))
dict.fromkeys is an... Interesting approach
Ah, I'm guessing you got it from stackoverflow.com/a/7961390/953482, which recommends using it to preserve order. I guess that's fine.
@Kevin list(OrderedDict.fromkeys(...)) has always a been a kludgy work-around to preserve order
Every time I discover that sets don't preserve order, I'm surprised
I should try to stop mentally categorizing a set as "a dict whose values we don't care about"
3.8 changes that, no?
@Quark It is appending the value chosen is currently representing. But then you modify that value. You only have one list, the one that you call chosen. If you want each element to be different, you need more than one list. So you need to create copies.
15:47
@inspectorG4dget As far as I can tell, no:
c:\Users\Kevin\Desktop>python
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> seq = ["a", "a", "b", "c"]
>>> list(set(seq))
['c', 'b', 'a']
Or maybe the order is well-defined, but backwards? idk
I thought I saw Brett Cannon talk about maintaining insert order
@Aran-Fey Get it, thanks, it was new for me
Ok set("bac") gives {'c', 'b', 'a'} so I guess it's not "well-defined but backwards"
If that were the case I'd expect {"c", "a", "b"}
ugh - anyway... need to make dinner - what was the original Q here?
djsmiley2k wanted to deduplicate his list of ip addresses. I think he already found something that worked for him, so we're just bikeshedding at this point
15:57
It's a list of strings at this point :)
Professionally, where is Python used?
@JohnnyApplesauce Google?
I know about it's AI, sentiment analysis, et al applications
I guess they migrate everything to go/rust but it wa s big there.
Eh, tell me more about that?
15:58
@Kevin oh this is good to know. Thanks
@JohnnyApplesauce Google, Amazon, Roku, Facebook to name a few
But what I meant in asking was
I know it's not the full apps of these folks being made
What parts?
@JohnnyApplesauce You might find wiki.python.org/moin/Applications interesting
(By the way, what does it mean in the tab of a browser when there is (*) in SO chat? Is it like a regular expression, there have been an arbitrary amount of replies ever since the last time you opened the tab?)
I just helped depploy a full service written in python with scikit-learn, wrapped in a flask server, deployed in a docker image on <some server somewhere>. I think at that point, it becomes somewhat accurate to say that the whole thing was written in python
That's neat
16:01
I think a star means you have an unread ping
wiki.python.org/moin/WellKnownPythonPrograms lists "Youtube" but I'm guessing it's not 100% Python.
Wikipedia says Youtube's "core/API" is Python although the citation is a bit sketchy
@inspectorG4dget anyway... you're one of the few that I'd consider free to msg me off line regarding stuff if you want - just happy to see you around more these days
16:17
@Kevin Due do hash salting, the order can vary from run to run, but will be consistent during a given run.
Here's an answer I wrote a while ago on a very old question stackoverflow.com/a/51578541/4014959
Ah, just as I vaguely suspected
16:33
oh beep
@wim and now Davidism noticed that importlib.resources is not a replacement...
anyway, RO's - in order of transparency and discussion - can it be scheduled another public meeting be run - let's say mid November?
Sounds good to me
Any inputs on this...
Tested without /cache it is working fine
sopython.com/wiki/2019_Q4_General_Meeting now exists. I have arbitrarily chosen the exact midpoint of November, but we can change that based on availability
16:43
the "environment" side-wide is, umm, "interesting" but that's no reason the room shouldn't publish and hold meetings - thoughts?
Removed /cache folder from volume container, worked fine
@JonClements Much thanks. I might have to take you up on that at some point if I don't find a therapist soon enough. Glad to be back. School's over and I get to do real things now
Guillaume Le Stum on October 07, 2019

Buffer all IO to reduce the overhead on Go system calls. On a system call, current Goroutines yield to that call. 

When possible in tight loops, use structs instead of interfaces to minimize the interface methods indirection overhead. 

Use pre-allocated buffers within tight loops (similarly to how io.Reader works) to minimize garbage collection pressure.

Process data rows in batches as a workaround to poor compiler inlining, as to move the actual computation closer to the data and minimize the overhead on each function call.  …

Please suggest agenda items for our semi-quarterly general room meeting, tentatively occurring Nov 15.
9
@inspectorG4dget life is hard... everyone knows it is, but some won't admit it because it's perceived weakness
16:47
@Kevin smooth, nobody will notice the year
we should move over the suggestions from last year's
But we already talked about those... I think
talking seems to be the only thing that actually happens
During the room meeting we can form a plan addressing the problem of not consistently enacting the plans we form during room meetings
10
@overexchange the reason is simple. The cache is meant to be kept around, that's the purpose of a cache, whereas the build volume is not supposed to be kept around.
on the contrary if it is then it might mess up things.
00:00 - 17:0017:00 - 00:00

« first day (3288 days earlier)      last day (1882 days later) »