« first day (2237 days earlier)      last day (2936 days later) » 

16:00
Aug 7 at 12:42, by PM 2Ring
@AnttiHaapala "The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary." — James Nicoll
Strange, I can remember reading "much to my chagrin" repeatedly in the past and it was obvious from context in meant "much to my amusement" but now that I look it up, no dictionary agrees that this is a valid interpretation.
whenever I see "a strange word", I suspect French
DSM
DSM
Last night I was wondering why I couldn't get data on one system when I could on another. I didn't think that the difference was me: I ran one test several hours later than the others, and [source of numbers] made them available in the interim. :-/
I even remember reading a post on tumblr saying something like "isn't it funny how 'chagrin' can mean both 'embarassment' or 'amusement'?" But maybe my memory is hazy and it was actually a different auto-antonym.
:S
at least everything works fine...?
DSM
DSM
16:02
Sometimes the Copernican impulse is wrong..
Obviously I've recently fallen into an alternate universe where words mean different things. Seems to happen a lot with me.
Python 2 is a mess..
DSM
DSM
In retrospect, yeah.
@IsabelCariod I cannot reproduce what you are saying:
>>> class MyHTMLParser(HTMLParser):
        def __init__ (self):
            HTMLParser.__init__(self)
            self.insideATags = 0

        def handle_starttag(self, tag, attrs):
            if tag == 'a':
                self.insideATags += 1
                print(attrs)

            elif tag == 'span' and self.insideATags > 0:
                print(attrs)

        def handle_endtag(self, tag):
            if tag == 'a':
                self.insideATags -= 1


>>> p = MyHTMLParser()
>>> p.feed('<a id="a"><span id="b"></span></a><span id="c"></span><a id="d"></a>')
The alternative, that my memory is incorrect or I'm fallible in any way, is clearly unthinkable.
16:04
fallible, but only into interdimensional rifts, amirite?
Oh, you
@poke This is really good, Thanks
Glad it works for you, you’re welcome
self.insideATags[-1:] == ["a"]
That seems unlikely to execute properly, because you can't slice an integer.
16:15
naysayer
besides, lst[-1:] is simply lst[-1].
oh, except it's a list, sorry
I can't type today
I found something nice, re
import re

text = '<title>hello world</title>'
list = re.findall('.*?\<title>(.*?)<\title>.*?', text)

print list
I'm about to rewrite a poopy bash script in python, but I just realized I have to target 2.6.
I don't even get argparse. Help.
@KevinMGranger Click is based on optparse, which should still be there.
@AndrasDeak ...
16:23
@KevinMGranger fifth circle of hell?
>>> 15//-4
-4
why not -3?
@AnttiHaapala well almost:P
I'm using Click right now actually
this is exactly the one special case
(that I hate)
how so?
16:25
@IsabelCariod I think you’re better of using BeautifulSoup after all
@khajvah truncate to -inf instead of truncate to 0, it would seem
@poke no, I use that function is too good
at least 2 doest that too
@IsabelCariod just watch out for Zalgo
what's that?
@IsabelCariod what's the point of coming in here and asking us how to do things if you're just going to ignore our advice?
16:27
@IsabelCariod That’s a reference to this question: stackoverflow.com/questions/1732348/…
@AndrasDeak uses floor?
@khajvah maybe not internally, but it does look like that, yes
I'm sure there's a pep somewhere:P
@AndrasDeak it is correct, // does floor division
according to PEP
then there you have it
floor(-3.2) is -4
16:28
Click is nice. But I don't have pip available on the target machine. Maybe I can package it locally and push it there.
yeah
TIL
@davidism and what is your advice?
wim
wim
@khajvah read blog post from guido --> python-history.blogspot.com.au/2010/08/…
Wow, that just floors me.
@IsabelCariod in handle_starttag, set variable like analyze = True if head, in handle_endtag set analyze = False (for testing purpose might be global) and then look for a tags if analyze = True
wim
wim
16:31
I don't understand why people like click? argparse is great. Also, seems like a stupid use case for decorators to me
well right now, KevinMG doesn't have argparse
wim
wim
oh, right.
Hey, right now anything beats while :; do case "$1"; -v) do_thing ;; ... esac; shift; done
I could make the mona lisa in bash if I needed to but everyone to come after me would hate me for it
fwiw, I jumped in to this project mid sprint and found click being used. So I went with it.
I don't care for it at all tbh
wim
wim
wait, if you can pip install click then you can pip install argparse
16:33
I can't pip install ._.
wim
wim
so that makes no sense
Heck, I can't even yum install. These vms are poopy. But I can push a file with ansible and install it
wim
wim
why you can't easy install pip
and then pip install from an egg or wheel
you don't need internet access for any of that , pushing up files is enough
This is a lot of bootstrapping for a helper script :P But it definitely is going to get more complex down the line, so this might be good to look into later.
@idjaw yeah, click seems like a bit of a mess to me, I don't really maintain that one compared to the rest of the libraries
wim
wim
16:35
click seems like armin had so much fun with decorators in flask that he decided to decorate all the things
It really seems complicated for no reason.
Callbacks and contexts are interesting, but they're not explained well at all.
wim
wim
decorating views with routes ... cool idea! decorating functions for a cli ... ehhh ... not cool idea
The only disappointment I had with click was some gotcha related to subcommands a year ago, but I've since forgotten it
I'm looking at the entrypoint function that has click decorators with things I don't get that don't seem intuitive
16:36
The idea of mapping CLI args to function args seems perfectly natural to me.
wim
wim
it's not a decoration though
library code and command line code should be decoupled
Maybe I'm focusing too much on strict PEP8 here, but it also leads to a battle of staying within the line length
Look at this decorator for example:
@click.argument('thing', metavar='thing', type=click.Choice(thing.keys()), required=True)
Just to be a goodie little Pydev, I have to break that up
and yes, wim, I agree....it's not doing anything of the intended use of a decorator...could be debatable I suppose.
or define it somewhere
accessorization is important
16:40
and then use
doesn't it even make it prettier?
16:53
i've noticed that if someone has a female nick name people are more forgiving when answer questions
dunno if its not a sexism
Probably. But presumably you'll also want to consider if it's an attempt at being more inclusive
I mean, think about when animals are mistreated. It's pretty hard to regain their trust and often requires a much more tactful approach
As a gender, we're pretty awful.
i've found that it has its own definition
"benevolent sexism"
I'm aware that I do tend to have more patience with questions that appear to come from a female. Though a vampire is a vampire, regardless of which chromosomes it's got
Pick a different topic.
How does one get the caramel in to the caramilk bar
...aaaand go
16:58
Any of ya'll subscribe to a VPN service? I've grown tired of getting sternly worded letters from my ISP.
Never heard of a caramilk bar.
> Caramilk is a candy bar made by Cadbury in Canada.
> Canada
I'd like to be able to torrent Linux .isos in peace without third parties snooping all up in my packets
I've never received a letter, so I've never looked.
@davidism I never knew it was Canada only.....it's a good chocolate.
... Although I understand that a VPN doesn't really protect you from men-in-the-middle, since they just have to travel farther down the pipe to where the VPN talks to whatever resource you're trying to access
But still, an extra layer of indirection may give me some comfort.
I found this guide the other day, and I'm trying to decide which of the seven listed services is least likely to be an FBI honeypot
17:07
@Kevin I'm a happy user of NordVPN
@Kevin NordVPN here too.
Self hosted & ProXPN here
Especially now that the Snooper Charter is going to be law..
Quick question: are any of you a deep undercover FBI agent? You can tell me, I'm cool.
@Kevin since the point of VPN is to protect from MITM attacks, ISP isn't supposed to see your traffic at all
17:09
is that nordvpn one of those unlimited ones?
well, except for VPN ISPs
@IntrepidBrit How does self-hosting work? Do you rent rackspace in a data center somewhere?
I'm guessing it doesn't make sense to self-host literally in your own home, since it's unlikely anyone is going to snoop on the cat5 cable connecting your office to the server in your basement
I've got an office away from home.
Well. Funny you should mention that.
Some of the ports in the office go ... somewhere else. No-one is sure where
Naturally, they're not patched into the rest of the network
They also don't appear to be attached to our network (with respect to "fair use" calculations) - so if I've got a big download to do, I plug into one of them
You don't work for the office factoring company do you?
Nope.
Day 1527. Have gained the local population's absolute trust. Whoops wrong window, disregard
3
@IntrepidBrit I hope NSA is paying your internet bill
17:19
That'll learn 'em
> This story isn’t extraordinary at all. Spend much time in the hacker and security scene, you’ll hear stories like this and worse.
Reminds me of a kid I knew who used to run phishing stuff on AOL
like... he literally just downloaded some prog from IRC and would run it and he would get user/passwords rolling in
Nice.
> The number of people whose job it is to make software secure can practically fit in a large bar, and I’ve watched them drink. It’s not comforting.
8
@idjaw Updating my Netflix app like a fox
wim
wim
Gooligan - 1 million google accounts breached
17:39
TGF2FA
Today I spelled "automatically" wrong twice in two different answers.
Just another word that my fingers don't know the letter ordering of.
wim
wim
blame qwerty
If it means I can deflect blame away from myself, gladly.
I think you know the letter ordering, you just have a left-right race condition
17:55
Wise, for is it not written, the left hand does not know what the right hand is doing?
wim
wim
the words that always trip me are calendar and separate
Huh, apparently that's a bible verse. Now my joke about incongruously treating it as a piece of ancient knowledge doesn't work properly.
wim
wim
I forget which are a's and e's
@Kevin You just need to learn how to automatically spell automatically
I used to get "separate" wrong a lot, but I've gotten better lately.
I spelled "definitely" wrong until I was fifteen.
17:59
I'm not sure if I have any words that I used to consistently misspell.
Python error TypeError: must be string or buffer, not instance typo, if you consider misplaced parentheses a typo.
By getting zero upvotes and no accept, the universe is indicating to me that I should have just left a comment and voted to close.
DSM
DSM
I still remember a discussion among my teachers in grade 1 about the correct spelling of the Canadian knitted cap..
I'm going to go with "toque" on that one.
Although I pronounce it like "touque", now that I think about it.
toque-can sam says, "follow your nose"
18:02
Why would you put a hat on your nose?
two-k is how I pronounce it. (not to be confused with two-kay)
Society can't tell me how I wear a hat.
@WayneWerner 'cause you're still doing it, HA!
I definitely don't pronounce it like this: dictionary.com/browse/toque
@AndrasDeak oh, actually - "psychopath" or "psycho" was one
I thought it was psyco
when I signed up for my westwood online account, that's what I used. Well, psyco was taken so I used psyc0
when I got my AIM account, though, even psyc0 was taken. That's when I became firstpsyc0, heh.
tuque
18:08
petition to change it to "tuk"
signed
We The People....
And hey bro can you tell me is there any way to know the file size before downloading ? — laslavinco 14 mins ago
Not sure whether I should tell OP "try asking that as a separate question"
Side note: you are now a bro.
Because I don't know if it would be received warmly by the community.
18:15
Better start popping them collars
the answer of course, is "yes", because headers
True. I'll pass that along and give him a nudge in the right direction.
Note that Content-Length and friends are optional, though, IIRC. A client is supposed to deal with the socket closing after the server has sent all the data
I think Content-Length is only optional for Content-Encoding: chunked
You're probably more up-to-date on standards than me
I wouldn't call HTTP1.1 up-to-date :P I was only reading it because I had a similar question when making something.
> Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding. If the message does include a non- identity transfer-coding, the Content-Length MUST be ignored.
18:22
@Kevin you mean a fist-bump in the right direction
18:35
Have a python while loop append to a file, without writing over previous content has some quite interesting code. He's got a class definition and an if __name__ == "__main__": conditional, all inside a while loop. Don't see that every day.
no wonder
There's a sort of logical progression here... "I've got working code that does X once, but I want it to keep doing X until it leaves the date range". Most straightforward solution: stick as much of your working code as possible inside a loop.
well, they know that tail recursion is bad, turned it into a loop instead
I tried to tell him it's weird to have a name-checking conditional inside a loop, but I don't feel like I worded it well. "the conditional should contain all your executable code" doesn't define what "executable code" means. I want to say "code other than class definitions and function definitions"
And imports and constant definitions and...
It's not a well-defined category.
@Kevin looks like someone found a "bro" in you ;)
DSM
DSM
18:43
@Kevin: huh. Well, you can't say he's not trying.
I do not understand this human emotion known as "bro-ness"
Brozoned
I want that shirt too
wim is a shirt winner
18:52
cbg
@wim well, pyramid decided that that decorating views with routes wasn't really a clever thing to do...
wim
wim
but they're kinda different beasts ... pylons project is a mature and pythonic web framework. flask was a toy project that started out as an april fools joke and somehow got popular
arguably one of the big reasons for the popularity was that decorating views with routes seemed cute, and there was hype around micro frameworks at the time
19:07
Flask was an april fools joke?
I don't get it.
I'm looking at the "It started as a Joke" slide and see zero funny things.
Or is "it started as a joke" itself a joke? Like how people say gmail was a prank because it launched on April 1, even though it was not actually a prank?
@Kevin you're not Austrian.
This is true.
To be fair, the language is named after a comedy troupe. Everything's a joke.
wim
wim
19:11
> it stores state in the module and uses implicitly defined data structures

there is a function that accepts both a template filename or a template source string as the same parameter and guesses based on the contents of the string.

it introspects the interpreter frame to figure out the name of the function that called a template render function to automagically guess the name of the template.

it uses automatic function registration and decorators to register URL rules.
really stupid ideas
I see no problem with the last one. The others, meh.
wim
wim
"I hate everything there" <-- from the author himself
Plenty of inventors came to regret their creations but that doesn't make them pranks
@Kevin god is no joke?
19:16
does json.load need a text file :(
Ok, I'm more willing to accept that since it's contemporary with the original release
wim
wim
I wasn't paying attention back then, probably davidism would know better what was really happening at that time
That's right in DigitalOcean's space. Very interesting.
wim
wim
the biggest joke is that he didn't clean it all up, e.g. garbage like thread locals is still in there , and people happily use it
DSM
DSM
Yeah, the $5 512 MB/20 GB matches the one I rent from DO. (Can't remember the transfer limits, but I never hit them anyhow.)
19:19
@wim and they even argue that they're a good thing (tm)
wim
wim
who argues that?
I don't argue that they're good, but I don't argue that they're bad either. I have no opinion on them besides "I'm not going to change it."
people say that they wouldn't use django or pyramid exactly because you need to pass request around.
anyone play Cities: Skylines?
wim
wim
19:32
@AnttiHaapala anyone worth listening to saying that?
no, obviously :D
wim
wim
many people also like to use global variables to pass state around
pylons-the-framework taught me that they're rather idiotic
tl;dr: web dev sucks, just use node
node.python
19:35
Choosing what framework to use because you didn't want to to pass a variable is silly.
at least no one uses globals in node
Dictionary size changed during iteration is quite a mysterious question. The current answer suggests a quirk of defaultdict but that can't be the whole picture because node is seemingly always guaranteed to be a part of mst already.
if anyone has the time I would like to know what I should use to document my flask api
I see swagger
then what?
wim
wim
19:40
never actually looked at it until now
it seems like swagger is really popular
and they have a bunch of things for python swagger.io/open-source-integrations
I was wondering which one and why?
I've never heard of swagger, so it can't be that popular. Never mind that I do precisely zero work with flask.
wim
wim
swagger + drf is popular combo
Truly popular libraries should develop brand awareness even among people that never use it ;-)
19:43
@Chad I linked you the Sphinx module for web docs.
Swagger is really annoying, I would not recommend it.
It's useful for generating an initial block of code, but not useful if you ever plan on adding your own code. At least the way I've always seen it (mis)used in SO questions.
@davidism I have not experience in such a thing but thanks for leading me somewhere
OP commented on my answer saying "this just gives me a TypeError", then accepts thirty seconds later. I can't handle the dissonance.
It's like when you have to sneeze, and then you don't have to sneeze.
Right now my fondest wish is for a follow-up comment saying "sorry, I forgot my input was a list of strings, not a list of ints, it's working now"
wim
wim
don't lose any sleep over it
@AnttiHaapala well spotted.
I am not sure about it tho
but it is one possibility
this is just the guessing game
19:50
Yeah. I'm guessing OP will come back and confirm after he has a nice eight hour rest
" Apologies if it is a dumb mistake - I am a bit tired." <--- Red flag that you're not going to get any feedback for at least one nap's length
:D
I easily leave comments like that 4-5 hours before going to sleep, so keep your fingers crossed
# am drunk, will fix later
It all fits in with my theory that most questions are hastily written right before OP rushes off to do something dreadfully important
most bad questions
Most questions are bad questions :-D
19:58
can't argue with that
there is no bad questions, only interesting ones and bad ones.
the fractal dimension of the bad-question subspace is d-epsilon where d is the dimension of the complete question space
That reminds me, I had half of an idea for a gif this morning that I then forgot about.
maybe it was about a jif
It had to do with visualizations of 3d fractals using two spatial dimensions plus time. But the twist is, the axes aren't necessarily perpendicular!!!
20:03
you mean a tomography-style cross-section movie?
A little bit of that, and a little bit of the lag effect that occurs when you videotape a screen that is casting the thing you are videotaping with nonzero delay
such as these, minor trypophobia warning
Vampires are right to fear it.
wim
wim
Wow! beautiful!!
There are some quite neat cross sections of the julia set floating around the Internet somewhere.
I remember it having a really slick html5 interface that made my browser slow down really bad. But it was pretty.
20:18
we should ask Fizzy
user6568562
Cbg
user6568562
@AndrasDeak That's eery for some reason
wim
wim
Is trypophilia a thing?
20:21
@Kevin the banner on that page is a really cool structure for rollercoaster tycoon
user6568562
@wim Yuck
Ok I got up to about slide 30 and now I'm sure this is it.
There aren't many webpages containing 2d graphs that rotate to become 3d spirals. Accept no substitutions
you're making me curious, I'm enabling scripts on the site
neat
> But like any fractal, the Mandelbrot set also contains copies of itself, buried inside its edge.
BOOOOOO
What's your objection? Not all fractals contain copy of themselves? The mandelbrot set doesn't contain an exact copy of itself (as far as we can tell)?
Or are we just booing the mandelbrot set in general?
the former, fractals don't necessarily contain themselves, only self-affine fractals do
20:33
Must be a Julia set audience in here tonight. Which is isomorphic to a mandelbrot audience, but don't let them hear you say that
anything that has a non-integer Hausdorff dimension is a fractal
including the shoreline of Norway
or anything else fjordy
mm hmm
I'm only an armchair fractalist so I can't comment on Hausdorff dimensions
I'm mostly that too, save a low-intensity course on fractals and chaos
I didn't take any courses, but I did pick fractals as my five-minute topic for Public Speaking 101. I fudged the exam by spending two minutes showing a video zooming through the mandelbrot set >:-)
20:38
stuff with finite volume and infinite surface (or finite area and infinite perimeter) are hard to quantify in size, and the Hausdorff dimension is one way to assign a number to their extent. If a 2d-embedded fractal has a lot of holes in it, its fractal dimension is close to 1 (it's line-ey). If it's dense, its fractal dimension is close to 2
I think the Hilbert curve has dimension 2, it's pretty dense
yup, hence "space-filling curve", duh
Let's see, it's four copies of itself, each shrunk by 1/2... so that's ln(4)/ln(2). Checks out.
yup, for self-affine fractals generated by an iterated function system, it's easy:) (looking at you, Sierpiński)
also, Cantor
I feel like I should be able to find this, but is there a one-liner way to print a variable from a list of objects without a list comprehension? or is a list comprehension the only way?
ie: [x.attributes for x in Machines]
printing or storing in a list?
huge difference, and don't use a list comp for printing, that's considered an antipattern
mcve, too broad, homework, whatever take your pick stackoverflow.com/q/40895514/344286
20:46
only use a list comp if you need the list
Just printing
honestly just for debugging
use a loop
for x in Machines: print(x.attributes)
1 line
Works for me!
I thought there might be a more pythonic way
probably just overthinking it
@NeilHanlon nope:)
Well thanks!
20:47
no worries:)
My two cents: there isn't anything necessarily wrong with print([x.attributes for x in Machines]). "only use a list comp if you need the list" is fine advice, but "need" can mean a lot of different things.
well sure, I'd do the same thing for my own ends
but I can't have that in the transcript, can I?:P
wim
wim
examples of fractals which don't contain copies of themselves?
@wim it's hard to generate one, but that's a technical matter
say, the trajectory of Brownian motion
@Kevin for quick dirty stuff I've done [plt.close(k) for k in range(3,8)] in the past and I'm not ashamed
@Neil clearly knows that what they're doing works, I assumed that the question is related to good practices
wim
wim
fractals just have to have some self-similarity, not exact self-similarity
20:56
Do a google image search for "3d fractal" and the vast majority of results will be pictures of shapes with lots of crinkly edges but not necessarily any obvious self-similarity
@wim they don't have to have any self-similarity in the strict sense, I think
@AndrasDeak shame on you. use list(map(plt.close, range(3, 8)))
I mean, that's my point (I can still be wrong)
@AnttiHaapala :P
@Kevin I'd prefer import pprint; pprint.pprint([x.attributes for x in Machines]), though
@AndrasDeak Brownian motion and ferrofluids are some of my favorite things
A lot of them have sub-sections that contain sub-sub-sections that are similar to the sub-sections in which they are housed, but don't reflect the structure of the whole
20:58
@Kevin like Mandelbrot, actually
wim
wim
There is no strict definition of fractal
Actually, here's a simple example: the koch snowflake. Zoom in as far as you like, you'll never find another free-floating koch snowflake inside it.
You'll only find edges of the snowflake that are similar to other edges.
@wim there is: anything with non-integer (Hausdorff) dimension
wim
wim
But by any hand-wavy definition, I've never heard of a fractal without repeating patterns
one might not agree, but that's a straightforward definition
20:59
Contrast this with the koch curve, which isn't a closed shape, which does have true self-similarity
then again there are integer-Hausdorff-dimension fractals, like a Hilbert curve
wim
wim
fractals have non-integer hausdorff dimension
that doesn't imply the converse

« first day (2237 days earlier)      last day (2936 days later) »