« first day (2673 days earlier)      last day (2272 days later) » 
00:00 - 18:0018:00 - 00:00

6:05 PM
Oh yeah. He deserved to walk on a field of legos honestly. But man did he have a lot of 2x XP saved up.
 
If he buys my premium penance pack, for the next 24 hours he will earn 2X karmic points for leggo-stepping-upon
 
Ill make sure to let him know of such a great deal!
 
6:28 PM
Lego insoles for you
 
Caution. He may have one of these concealed:
 
wim
@Aran-Fey Python str view
 
@ZackTarr They are even discussing about "parent" and "children"...
 
6:42 PM
@wim You're a bit late, Ilja already pointed me towards memoryview :)
 
@AshishNitinPatil So many kevins!
 
re: meigakure, I tried the demo, and... eh, don't get HL3-hyped for it. Maybe I didn't get the 4-dimensional thinking, I just wound up sorta guessing each puzzle. But this could have been too early for it content wise.
 
Also on that dup I just posted. Can someone take a look to make sure me sending him down the read/write method was correct? stackoverflow.com/questions/48712105/…
 
@KevinMGranger yeah, it's supposed to intuitively teach you trueish 4d
 
@ZackTarr It's year 2030, and all the last 5000 stars in the Python room were from Kevin, all upvoted by Kevins.
6
 
6:48 PM
@wim nice! You won't like it, but in python you need a bytestring in there
 
@KevinMGranger there's a Miegakure demo?
 
I played it at PAX however many years ago
 
@KevinMGranger Why must you do this to me? I was super excited about trying the demo for a whole 5 seconds :(
Now all I feel is disappointment :(
 
Yikes, touchy subject. Let me just shift the 4th dimension back and prevent myself from bringing it up
 
6:52 PM
I don't want you to tesserwrack your brains over it
4
 
The ones with the scroll access to the 4th dimension are real sneaky characters I tell you.
 
I forget, primary-Kevin, is our hivemind 4d-compatible?
 
wim
@Aran-Fey the post is from 2014 ... did you try searching?
 
@KevinMGranger Socialism, communism and even democracy don't work that well, maybe we all need some Kevinism.
 
@wim Well, sort of. I was searching for something else; memoryview doesn't actually solve my problem. I ended up writing a custom file-like object.
 
6:56 PM
Idk, Davidism seems to work pretty well
 
@KevinMGranger Yeah but you might have to flip the cable around a couple of times before it plugs in
 
@KevinMGranger But for a new world order, we need something bigger than a flask :-p
 
wim
@Kevin yeah, this is a real thing (long tail effect of old posts). I often check in and already have ~100 rep before even posting anything that day
0-50k is WAY HARDER than 50k-100k
 
Bigger than a flask? Yes, we need sunshine in a class Bag(collections.Counter, collections.defaultdict)
 
Granger Things
 
7:00 PM
I think my first 50k involved a lot more fast-gunning crap questions compared to you guys because my long tail ain't that long
 
fast-gunned crap questions are the tails of the future
@KevinMGranger I just found that in the transcript
 
Who would have thought that writing good answers to good questions was actually good???
 
wim
@KevinMGranger what does that do that a plain old Counter doesn't?
 
I just need to work on my speed to get my rep off the ground. You have to be able to type at 1000 words per minute to answer a question before most of the Python tag hawks out there.
 
wim
7:03 PM
@ZackTarr Not really.
You just have to know your stuff
 
I can't remember, I might be mixing it up with the solution for an ordered bag or something
 
user379888
Hi. I am trying to choose between JavaScript and Python. I want to learn one language this year.
 
wim
And know how to summarise the most important essence of the answer, you can edit in the polish later.
 
I thought Stack Overflow was supposed to be in english?
 
I have trouble really knowing what the best answer to a question is most of the time. Like I know how to do it but cant explain it as well as some. Ive seen improvement over the last month or two in how I can approach questions but just need to keep working
 
wim
7:05 PM
Actually, learning how to be concise and "getting to the point" ends up being a very valuable workplace skill. I learned it from answering questions on SO!
 
@FahadUddin cbg, what do you want to get out of learning a new language this year? What interests you about each?
 
wim
I just can't see how Bag(collections.Counter, collections.defaultdict) can work because you need to be able to pass the default factory to default dict
yet Counter init tries to iterate the argument
 
@wim Thats my ultimate goal right there. I want to improve on here to help improve in the workplace. Right now Im in an IT role but want to get into a development type role at some point. So I figured getting engaged on stack might help me prepare for all of that.
 
wim
so, how can you inherit from both and do anything useful?
 
perhaps he was merely joking?
 
7:08 PM
No, I remembered something about counter from some interview talk in this room before
 
wim
I guess you can manually assign to the default_factory attribute after creating an instance
Yes, that would seem to work
>>> Bag.__mro__
(__main__.Bag, collections.Counter, collections.defaultdict, dict, object)
 
user379888
@ZackTarr: There are a few things:
I work on WordPress right now and everyone hates it. I want to pick a solid language where I work on core programming.Not drag and drop stuff and autobuilders.
I am fascinated with AI and machine learning too and Python is being used for it (but its super tough to solve kaggle problems)
 
wim
hmm, nope, doesn't work
>>> b = Bag()
>>> b.default_factory = float
>>> b |= Bag('stuff')
>>> b['f']
2
>>> b['x']
0
Counter already handles missing so defaultdict never gets the chance
 
lunchtime cabbage, all
 
7:15 PM
How are you, inspector? Haven't seen you around for a while.
 
been busy... stupidly busy. Had to write a bunch of bash functions (one of which is >100 loc) to help me monitor my jobs on the cluster because I'm running too many experiments to track manually
how've you been?
 
wim
damn, that 4D toy box thing that someone posted is cool
 
@FahadUddin Im not sure on which will be best for you in the long run. But if you are doing mostly web based dev then you can check out django within python. Not sure if this is what you are really looking for though. If you want to get into AI stuff and more complex things I would think python but thats due to me not knowing what all JS can really do, other than the simple HTML scripts Ive played with.
 
user379888
@ZackTarr: Thanks.
 
wim
If you're just making websites, then know that it will take something like a decade of web dev experience before you can make anything as good as you will get from a canned bootstrap template from drag n drop on wix or weebly
templates these days are very good, and to do anything of that quality by hand is really difficult
 
user379888
7:21 PM
I already have been doing development since 2010
 
wim
and it's not just Python, you need to know tonnes of javascript
(which is an awful language)
 
user379888
I have played with HTML, CSS, PHP, WordPRess.
 
wim
OK, good, I'm sorry, meh.
 
user379888
But you are right. One needs certain level of experience before being able to build good projects.
 
7:23 PM
3rd lq question from the same guy today...
 
user379888
@AnttiHaapala: You must be super good. You have so high reputation.
 
or he's just really bored :)
 
user379888
My reputation of 6K has come from asking +500 questions since 2010.
 
@FahadUddin or perhaps evil?!
 
user379888
Haha
 
user379888
7:24 PM
If I ask a bad question now, people shame me saying I have got 6K reputation and I don't know how to ask.
 
wim
hahaa
true dat
 
well more like you've posted 500 yet don't know how to ask...
 
wim
congrats, you are not being treated like a baby anymore.
 
well they're not wrong
 
user379888
Asking how to ask questions is indeed an art.
 
7:26 PM
@inspectorG4dget Sounds like you are having fun. I started a new job back in August and have been getting up to speed on new projects.
 
@FahadUddin but yeah, reading the commentary above, Python is your choice :P
 
wim
wow you are member for longer than me, even
 
user379888
@AnttiHaapala: Thanks
 
@FahadUddin also, you don't need to ask questions about Python, just read the old ones.
 
@Code-Apprentice congrats! whereabouts? It's fun, but sometimes, I just wanna kill zombies
 
7:27 PM
(almost) everything has been answered already
 
@wim Just saw a link on your profile to project euler. What was the hardest or most interesting problem youve worked on? Just curious
 
@inspectorG4dget I'm in Idaho. I stumbled on a position at a start up in a small town here.
 
chilly legumes!
 
I'm a firm believer that every piece of code has been written already and now it's time to just piece things together.
 
ooh! job just finished. Rhubarb folks
 
wim
7:30 PM
what do do with questions who tag both and ? what do they want? maybe we need a new tag for or something so that people can specify they are looking for cross-compat solution.
 
@inspectorG4dget now you are just making up your own words...rbrb until next time
 
I the great dragons of good and evil hath looked into the future to the year 2030 and returned with a screenshot: i.stack.imgur.com/MqlsG.png
 
wim
@ZackTarr I enjoyed problem 31 (coin sums) because it was when I first grokked dynamic programming
 
7:45 PM
Neat! That one seems do able. Some of the late questions look crazy difficult. Ill try work on that question sometime though!
 
@wim hmm, wonder how I solved that
 
wim
probably recursion
 
yup
one of these days I should read into dynamic programming
 
wim
you should, it's very elegant and beautiful
and recursion generally sucks in Python
 
I'm aware of that
the latter, I mean
 
wim
7:47 PM
because of the limited call stack, expensive function call overhead, and lack of tail call optimisation
DP, in the cases when you can apply it, whacks all 3 of those limitations out of the ballpark
 
Like this question... projecteuler.net/problem=532
 
I haven't done PE for so long...
Looks like I did #31 both recursively and with DP
 
8:05 PM
Can a Python extension always be considered a module?
 
docs.python.org/3/extending/building.html makes it sound like the answer is "yes". PyInit_modulename returns "either a fully-initialized module, or a PyModuleDef instance" and both of those have "module" in their name so I would consider both modules
 
DSM
@KevinMGranger: tesserwrack ouch
 
[quietly adds "tesserekt" to list of Highly Specific Burns To Use Later]
 
wim
8:23 PM
ooh, 2018 version of pytz
 
It's the pytz (tm)
 
wim
what has changed in the wacky world of timezones I wonder
 
I'm going to guess something to do with daylight savings
 
wim
probably Australia/Yancowinna up to no good again
 
8:58 PM
Love the confidence in the title of a recent question: "I know it is good but can it be better?"
"Obviously I know I'm hot stuff, but am I the hottest stuff I could possibly be?"
Relatedly, I find it curious that PEP 8 recommends you write your comments in English, but says nothing about the language of your identifiers.
 
wim
bah, la pep8, c'est la merde
 
Wow... this is gold:
https://stackoverflow.com/q/48713974/3579910
@DeadPool69 what does "good" mean to you? Are errors good? – vaultah 4 mins ago
Sort of depends on what errors it is – DeadPool69 2 mins ago
 
9:26 PM
if you post a link to a comment it will onebox
 
Hmm, I didn't know you could link to comments. I now just noticed clicking the timestamp seems to provide such a link. neat.
 
9:50 PM
I made a small module to replace if __name__ == "__main__". Thoughts?
 
@Pavel I'm not sure what was insane about the existing system?
 
@roganjosh Magic strings are ugly
 
Agreed. __main__ being considered a separate module is also ugly.
Pop quiz: If you place this code in a file named foo.py and execute it, what's the output?
x = 'foo'

if __name__ == '__main__':
    x = 'bar'

    import foo
    print(foo.x)
 
@Aran-Fey I think it's foo. Since the loaded module is __main__, no mule named foo has been imported, and it will be reloaded.
 
Yep, that's exactly right
 
10:00 PM
The module system is what bothers me the most about Python
 
@Aran-Fey absolutely no idea. I feel I should know for the sake of knowing, but practically, I wouldn't write such a thing myself because it's ambiguous just at a glance]
 
And all because of the stupid __main__ garbage
 
I also take offence with __init__.py. It bothers me.
 
Yeah, the import system is definitely one of python's worst aspects
 
I'm curious... You both seem set against the main paradigm and it seems that it only take a little code to overcome it. Is there a major library that does something similar?
 
10:06 PM
@roganjosh you mean, to my startpoint?
 
@Pavel as in, the equivalent of that within the library
 
wim
@Pavel do you know about __main__.py
 
@roganjosh If I knew of a module that did that, I wouldn't need to reimplement it.
@wim That just causes weirdness. It's impossible to import a file named __main__.py.
 
wim
you're not supposed to import it
you're supposed to run it
 
@wim I'd rather have my scripts be named something useful
 
10:10 PM
@Pavel I was perhaps unclear. In very few lines of code, you were able to "fix" the issue (that I'm not aware of, I'm by no-means a Python expert) so I would expect that major projects could just incorporate whatever you did without it being an external module, if the felt held-back.y
 
I'm lost. How is __main__.py comparable to if __name__ == '__main__':?
 
wim
I don't get it. If you are just writing a file that only needs to be run as a script, and not imported, then you don't really need main() much anyway you can just write code at module scope
 
@roganjosh The __main__ thing isn't so bad, that's just a minor annoyance. But the import system as a whole is yammin' terrible.
 
Oh, I remember how __main__.py works now
 
@Aran-Fey We can agree on that :)
 
10:13 PM
If you execute a directory with Python, it'll look for a __main__.py in the directory
I can't give a directory a #! line though
 
@Pavel a __main__.py?
 
If a directory foo contains __main__.py, then python foo is the same as python foo/__main__.py
 
It's python -m foo
 
Right, sorry
 
...not that I ever tried to execute a directory with python. For all I know, it might actually work.
 
10:17 PM
$ mkdir foo
$ echo 'print("Hi")' > foo/__main__.py
$ python3 foo
Hi
@Aran-Fey Totally works, actually
 
TIL
 
You can also execute ZIP archives
 
@vaultah You can, but that's gross
 
I realize that I don't have a say in most stuff, but I remember that neither does the majority of people that I disagree with, and that gives me some relief
 
wim
@Pavel where is your test suite
I won't touch untested code
 
10:19 PM
When you subprocess.call an ssh command to docker run and it only requires you to escape the quotes... that was way easier than I was expecting.
 
@wim In a file on my computer called test.py, sorry.
 
 
1 hour later…
11:19 PM
Hey guys, if I wanted to do something like this in a django project what are some libraries you think I'll need for the visualization part demographics.virginia.edu/DotMap/index.html
 
wim
bokeh maybe
 
Unrelated to your question: That map is really cool, although I have suspicions regarding the accuracy... large sections of Seattle are blank... which leads me to believe it is incomplete.
 
11:40 PM
cbg, friends
 
00:00 - 18:0018:00 - 00:00

« first day (2673 days earlier)      last day (2272 days later) »