« first day (2004 days earlier)      last day (2947 days later) » 

10:00 AM
“High Performance Computing, Big Data Analysis, and Finance”
 
nice
despite finance
 
Unfortunately, I don’t really have a reason to participate there.. :/
At least I can’t think of one..
other than “I was invited”
I hardly understand the session titles >_<
> Task and thread parallel programming models for multicore with Standards, incl. OpenMP, TBB, Cilk
 
you go there and do some nice HPC stuff for me to use in a few years:P
 
@AndrasDeak A man after my own heart :)
 
10:13 AM
re-cbg. Speaking of changed contrast, the red syntax highlighting has been reduced in contrast. I think the new look is a bit washed-out, but I'm getting used to it. Here's a demo using Andras' Wayback Machine link: old vs new old=#800000, new=#713225
 
10:30 AM
@PM2Ring The HTML syntax colors were also changes massively
Compare old and new.
 
@poke Radical! I guess the new version does look a little better. But I've always thought the SO / Google prettifier colours were a bit garish, compared to the default colour scheme that KDE uses in kate, etc.
 
If anyone has any pointers as to why this code is failing to pass all the tests on this Hackerrank, they would be very welcome :)
 
Yeah, I like the softer colors, but the color scheme looks a bit inconsistent now. Only a few colors were changed, and the old one are now too different.
 
cbg all!
I am trying to convert a set into list simply. But:
type(self.factory.protocols)
2016-04-11 16:02:13+0530 [-] (Pdb) <type 'set'>
list(self.factory.protocols)
2016-04-11 16:02:16+0530 [-] (Pdb) *** Error in argument: '(self.factory.protocols)'
print self.factory.protocols
2016-04-11 16:02:21+0530 [-] (Pdb) set([<stroke_protocol.StrokeEcho instance at 0x00000000051A3F88>, <stroke_protocol.StrokeEcho instance at 0x00000000051E9FC8>])
 
@AndrasDeak lol, I just took that test out of boredom…
 
10:39 AM
What happens with l = [item for item in self.factory.protocols]
 
@poke Nice. I was 30ish though I'm on a crap monitor.
 
I blame those three points on me getting bored in the end…
 
And yeah the test dragged a bit.
 
@RobertGrant self.factory.protocols is set, how can I iterate it?
 
> Best score for your gender and age range: -24350
wat
 
10:40 AM
l = [item for item in self.factory.protocols]
2016-04-11 16:10:32+0530 [-] (Pdb) *** Error in argument: '= [item for item in self.factory.protocols]'
 
@RobertGrant or just l = list(self.factory.protocols)? :p
 
@JonClements read the OQ
That isn't working.
 
@JonClements that's where he started :)
 
@poke link
 
Although I think we need a Clements to help with this anyway
 
10:41 AM
48 mins ago, by Andras Deak
this is for you, then: http://www.xrite.com/online-color-test-challenge
 
Is it some weird Twisted set that isn't a standard set?
 
Yeah clearly converting this set to a list is going to need 7 itertools functions and a Counter, so we need Joncle.
 
[x for x in iterable] and list(iterable) should always yield the same result though?
 
@RobertGrant @JonClements list seems to be a built-in function in pdb :p
 
ehh, pdb shadows the built-in list?
 
10:44 AM
yeah.
print list(self.factory.protocols) works
 
Well, make some sense since pdb isn’t taking Python code as commands…
 
cbg. Another sick day. Thumbs down
 
@idjaw Have you considered not being sick?
 
@idjaw awww... poor Cap'n. Have you tried getting some fresh sea air? :p
 
score 7
:(
 
10:51 AM
@Ffisegydd I've considered it. But turns out I love it too much.
@JonClements you know I probably should peak my head out. The fresh air might help
 
dunno if my display's a reason :D
 
@poke not bad:D
too bad I don't remember my score:(
oh hey I have a screenshot!
3 for me too! on my laptop!:D
 
Can I take this test too?
 
No.
You might sneeze all over the colours and mess them up.
 
That's fair
 
10:57 AM
How can I convert a set to list in pdb and access it's elements?
 
I did pretty well, considering this crappy monitor:
 
You're putting me all to shame ;___; though I've always thought I had good colour perception
 
@Ffisegydd how much
30ish
now that's crap
 
I was better than average ;_______________;
I always knew there was a reason I preferred B+W photography.
 
fizzy you're aware your avatar is green on a red background right?
 
11:07 AM
;__________________________________________________________________;
 
list(self.factory.protocols)[0].sendString(data)
2016-04-11 16:35:03+0530 [-] (Pdb) *** Error in argument: '(self.factory.protocols)[0].sendString(data)'
^How can I make this work?:)
 
@AbhishekBhatia you only just asked that question, there's no need to ask it again.
 
You've been around this room enough to know this by now.
 
@RobertGrant Here is the thing, there is no way to tell if a website has malicious scripts or not unless you block and filter them. How about this: when the users enter a website for the first time, it can note the users about malicious scripts and let them in only when users accept it. In that way, the website will respect its users and the users will respect the website by running ads.
 
11:18 AM
@Ffisegydd <3
@AbhishekBhatia Put a p in front of it
 
"Our website uses Google's trackware and has facebook like button, so both Google and Facebook will know that you visited this website."
 
@JRichardSnape: Here's some more tasty violin work for you. Geoffrey Castle from Seattle playing Hendrix's Voodoo Child (Slight Return)
 
Switched monitors.
@khajvah Seriously, are you really bringing this up again?
 
@PM2Ring Nice. One of my favourite Hendrix tracks, too.
 
Great song.
 
11:21 AM
@Ffisegydd You sound like I don't make sense. :D
 
It's an "acid test" of virtuoso playing. :)
 
You don't, I completely disagree with your arguments and think Rob has wiped the floor with you.
I'm just asking that you don't bring it up again, or if you want to then make your own room for it.
 
@PM2Ring the bit where he plays behind his back is phenomenal.
 
@khajvah I'm not a big fan of tracking scripts or ads, either. but there's no point in having extended discussions on stuff like this: it's like politics and religion, further discussion isn't going to change people's feelings, and eventually it will end in tears. So I'm going to put my RO hat on and agree with Fizzy that it's time to drop this subject.
 
@Ffisegydd Just a note, the last one was a response to his last message, so it technically wasn't "bringing up", but ok, it is irrelevant for python room.
 
11:25 AM
I'd leave it @khajvah. Comes down to whether you think people have a right to be paid for their labour and whether you think ads are a legitimate way to earn that money. You'll inevitably have entrenched differing views
Ah - what PM2 said :)
Anyhow colour
 
Small discussions about these are fine (as we have all the time) but eventually it becomes too OT (shock horror gasp)
 
I think it depends a lot how long you take over that test. I got 11 in a very short pass through, but then 4 with a bit more scrutiny.
 
Anyway brb FizzyLunch.
 
I think all the results lower than—I don’t know—29 are equally good and show that you have no problems with color perception.
 
Yeah it's a shame there's not more stats on the breakdown of the results.
And what the numbers actually mean.
As opposed to what looks like a programming bug of "0 is perfect! For your age range the best score is -24,000" or something
 
11:29 AM
Yeah, that’s somewhat odd
I assume that the result is passed to the “store statistics” service which can be publicly called without authorization
 
@JRichardSnape I'm amazed I haven't heard of him before. I stumbled across that clip last night, after watching a bunch of Hendrix stuff by Nigel Kennedy. Nige does some interesting and inventive stuff, but I wish he didn't feel so compelled to make changes to the original chord progressions.
 
damn. I am blind
 
@PM2Ring Mmm - he's very unconstrained in his interpretations. I do like the way he can span genre though - some of his jazz stuff is great.
 
@khajvah no, and ignoring the fact that you didn't start with this argument and so it probably isn't the real reason, you can always hit a URL with something that isn't a browser, to parse the javascript before you go to the actual page
Why don't you write a Python script that does that and formats the js nicely for you to peruse at your leisure
Must take a couple of hours to check all of the javascript on a page before you enable script, so that might actually help you
 
11:42 AM
@poke thanks!
 
DSM
Morning cabbage for all!
And it turns out I have perfect colour acuity according to random internet test. #dellinspiron
 
You got to zero?
 
DSM
Yep. "Your score: 0 Gender: Male Age range: 30-39 Best score for your gender and age range: 0 Highest score for your gender and age range: 1520"
 
“Best score for your gender and age range: 0” – So there are no male cheaters aged 30–39, huh?
 
I once failed driving license test because of color blindness
 
11:47 AM
@JRichardSnape Nige can do whatever he bloody well likes. I think he's earned that right, being one of the greatest violinists to have ever walked the Earth. :)
 
DSM
This screen has good colours, even though it has bad, well, whatever the word is that means you can't set the screen at any angle and still see the corners.
 
@RobertGrant I would continue the discussion but we will pollute the chat room with irrelevant stuff.
 
Colour perception can be tricky. Here's a lovely optical illusion to demonstrate: dryad.fr/blog/wp-content/uploads/2015/02/constancedecouleur.jpg The central squares of the top and front faces of that cube are actually identical!
@khajvah No only that, you'll get kicked if you persist. :)
 
@khajvah if you have any more objections, have a look at my chat history for the responses :)
 
Ahh, the green dress.
 
@DSM I just call it colour shift or colour distortion. Some people call it colour solarization, but strictly speaking that term should only be used when the shift is so severe that the hue and brightness is inverted.
@poke Wat?! :)
 
;)
 
I guess green is kinda the mean of blue and gold.
 
Just arguing about blue vs. white is boring. Let’s throw in more colors! We have so many
 
DSM
12:08 PM
@PM2Ring: is that really what it's called? That answer would make more sense if the last word in my sentence were "colours".
 
Angular2 makes it possible to hit race conditions in the single-threaded language JavaScript… I hate my life right now.
 
@DSM Oops. My bad. thought you were referring to the phenomenon of the colours on LCD screens distorting when you view them from oblique angles.
 
@DSM Depending on what you are referring to it’s either viewing angle, or luminance uniformity
 
DSM
Well, it looks like both happen here. It gets super dim, and does seem to invert if you open the book so it's almost flat.
 
SCIENCE.
 
12:20 PM
I have an old Aldi e-reader / media player. It's quite good considering how cheap it was, but when watching videos you can't tilt the screen much before the colour & brightness starts distorting. But I reckon it's pretty amazing that modern LCD technology has reduced that effect a fair bit, considering how liquid crystals work.
@RobertGrant: One of the guys you DV'ed for using recursion has tried to justify it:
Good point, you shouldn't do this in production code, for reasons you've stated. I thought the recursive solution was simpler to understand, that's the only reason I put it up :). — mwm314 25 mins ago
 
DSM
:-P
 
:)
 
I see what you did there
 
12:38 PM
Found this comment under some YouTube video:
 
@poke :) Considering the number of questions we get from new programmers who are baffled by even a simple recursive factorial, I'd say "no". OTOH, it does seem that some people are able to comprehend recursive programming almost straight away, but others have to have a lot of exposure to it before they're comfortable with it.
But really, it shouldn't be that hard: our minds have to deal with recursive structures just to process natural language, but I guess doing that sort of stuff informally is different to writing and understanding recursive code.
 
> Alien 1: Do humans recieve our messages?
> Alien 2: Yes, but…
> Alien 1: But what?
> Alien 2: They dance to it and call it Dubstep.
 
hehehe
 
In today's episode of Silly Micro-optimizations: stackoverflow.com/questions/36548518/… FWIW, I can't reproduce the OP's results.
 
@PM2Ring language theory (formal or natural) is backwards though. We don’t use language like this because its grammar is nicely formalized; we define grammar syntaxes and stuff to fit our crazy minds that did it like that in the first place.
@PM2Ring vtc’ing
 
12:43 PM
Sure. But still, our mind's "software" is capable of dealing with and generating these recursive data structures. I'm not implying that we are actually aware of the algorithms we use to do that, though.
 
DSM
I'm not even sure how to ask this in a way which makes sense, but is it known whether we parse language recursively or in a stack-based way? (I'm imagining that failure modes might allow us to distinguish.)
 
I’m just saying that we probably need to go a different route to explain these things.
 
@poke Well, some people can reproduce his results, but I guess it's not a particularly useful question.
@poke Ok. Models of what the mind computes may bear little resemblance to how it actually does so. :) And as for the underlying neural structures, the science is still at a very primitive stage.
 
Interesting. There was significant typo in one of my old answers that someone tried to fix. The review queue rejected it.
 
@PM2Ring mmph :)
 
12:53 PM
@DSM My guess is that we don't have a general-purpose stack that can grow arbitrarily. Some people seem better at maintaining deeply nested mental contexts than average, but whether that's due to intrinsic neurological differences, or due to neurological enhancements that developed through training, it's hard to tell.
I think that we do have some general purpose recursion-handling stuff going on, but it's fairly limited in how deep it goes, and I don't think it really matters much whether it's using a stack or "copy-pasted" recursive structures.
 
2p
@PM2Ring slap
the question is tagged Python 3, and you're still stuck with that prehistoric 2.6
 
@Antti Which question were you referring to?
 
@poke the "why is sorting a sorted array faster than unsorted"
the answer has 20k upvotes :d
 
But that’s a very different situation, and also consistently reproducible. There’s no branch prediction going on here.
 
this is consistently reproducible. on python 3
not on python 2 so of course pm2ring cannot reproduce it
 
12:55 PM
Not on my machine, no.
 
can be linux related also.
 
PS> py.exe -3 -m timeit "a = tuple(range(2000));  b = tuple(range(2000)); a==b"
10000 loops, best of 3: 79.7 usec per loop
PS> py.exe -3 -m timeit "tuple(range(2000)) == tuple(range(2000))"
10000 loops, best of 3: 78.3 usec per loop
I have very consistent results to those numbers
 
I get consistently 20 % more for the no-vars
 
It deviates by maybe ~1 µs
I also get very close results in a single Python process
 
12:58 PM
>>> import timeit
>>> x = "tuple(range(2000)) == tuple(range(2000))"
>>> y = "a = tuple(range(2000)); b = tuple(range(2000)); a==b"
>>> for t in x,y:
        timeit.timeit(t, number=100000)

8.35322886131462
8.40541269697556
 
now I am testing 3.5 and there is not that much difference
 
Also, OP is using Windows and already compared the result with a different Windows machine and could not reproduce the results there.
So yes, I stand by my point that this is not consistently reproducible :P
 
@DSM Relevant. I think that our 95% case in language is stack-free. It only takes a few registers to remember say, the subject verb and object of a sentence, which can be identified by passing the sentence through a couple regular expressions until it matches one.
 
@poke hmm :d
indeed... something fishy with calling timeit from cmdline
 
Python 3.4 is about ~20µs slower on my machine… but for both solutions.
 
1:01 PM
@AnttiHaapala Erm, some people (eg Khelwood) cannot reproduce it on Python 3. And I realize that the effect is supposed to be less pronounced on Python 2. I tried several variations: eg using xrange, and defining the range or xrange in the setup arg, but my results were all over the shop. However, I was just doing it all in the shell, not in a proper timeit script.
But I don't feel like mucking around with this now: I'm listening to some very tasty jazz from an online radio station, and I have to stop the music to run fair timeit tests; if I were serious I'd also close the browser.
 
because it is not that clear at all on ipython
:(
 
Guys, why isn't unittests.mock able to patch "private"(attributes with two underscores in front) attributes?
 
Because __foo is not the name of the member you defined as __foo.
 
@khajvah try _Class__foo
 
It’s _ClassName__foo.
 
1:04 PM
it worked, thanks
so internally, leading underscores become _ClassName__..
 
@Antti I see the problem now with a very minor effect on 3.4.
@khajvah Yup, that’s called name mangling
 
@khajvah I typically make sure that anything that might be declared as private is implicitly tested in my unittests via the public methods so I don't have to deal with the 'name mangling'.
 
^ If there’s reason to test the member, it shouldn’t be “private”.
 
I don't like implicit testing
 
so I just bought an iPhone SE, and it's not any different than iPhone 5, what's the deal with that?
 
1:09 PM
“implicit testing”? What’s that?
@corvid Apple making money, as usual.
 
testing a private method indirectly
 
@poke @khajvah exactly. That was my next point I was typing....If I find that I have something like this:
 
@poke Dunno, is there some undiscovered feature? Comes with this apple pay thing but I don't get what the point of it is
 
You shouldn’t test implementation details. And private methods are an implementation detail. Test behavior, not implementations.
 
@poke +9000.
 
1:10 PM
class Foo:
    def __thing(self):
        pass
    def stuff(self):
        self.__thing()
 
Doesn't unit testing imply that you don't care the slightest about private methods, only that the interface does what it promises? Oops beaten by poke.
 
@poke you keep typing what I'm trying to type
heheh
and I end up deleting it :P
 
Refactoring your implementation should never affect your unit tests (so that your goal during refactoring is to keep your tests green). If you have tests that test your implementation, then that doesn’t work (by definition).
 
@poke hm, makes sense
 
@idjaw @Kevin Sorry you two.
 
1:11 PM
no need to apologize :P it was pretty funny.
 
;)
 
That which we say three times is true. There is value even in ninja'd posts.
 
Morning cabbage.
 
cbg morgan
 
DSM
Huh. I don't want to be contrarian for its own sake, but I'll test whatever I want to test. If that means that I'm testing an implementation detail to verify that it works the way I think it does, then I'll do that.
 
1:14 PM
@DSM but surely the point of an implementation detail is that it can change without changing the behaviour?
 
I can understand that. But it complicates refactoring when you are trying to keep the behaviour the same but change the way it is implemented. For example, the point I was trying to get to was trying to refactor out private attributes so that my unittests don't have to be changed when I do get rid of them.
 
@poke But sometimes, indirect testing becomes too complicated. In my example, I have a private method that runs a graph traversal algorithm. It would be really hard to fully test it indirectly.
 
which is why you should revise why you have so many private attributes
if your tests get too complicated, that means your code is too complicated
 
But what are you doing with that graph traversal algorithm? What’s sitting in front of it?
 
DSM
Code has different natural levels. Some things I might want to test (say whether two "implementation-detail" objects are identical or copies) might not even be the sorts of things I want exposed to higher levels. So I test it at the level it happens.
 
1:17 PM
Does someone knows where to put PIL library in a Mac? There is not an installer as for Windows.
 
@PichiWuana use Pillow not PIL.
 
user559633
Worst part of ikea: papercuts from cardboard on your fingertips
 
@poke a couple of public methods make use of the algorithm. It is possible to test indirectly but it won't cover the entire algo.
 
@tristan are you in a new home in Russia? (I may have got this very wrong.)
 
user559633
@RobertGrant Renting in Boston, MA, USA
 
1:18 PM
is there any Github seed project for django + angular2 . Code related to both should be in a single project?
 
@Ffisegydd Okay I will use it, but where do I put folders for python libraries if I need?
 
DSM
I thought our tree-stand had returned to the New World.
 
For example if you have a function that gives you the shortest route from place X to Y, then you test if that function gives you the correct results. But it doesn’t matter if you use some graph algorithm underneath, if you are doing stupid bruteforce, or if you have a human sitting on the other side that phones some person that knows all the routes on top of their head.
You test the result, not the implementation.
 
@PichiWuana You install them using something like pip.
Try to avoid manually installing libraries.
 
@tristan ah sorry - I'm terrible at keeping track
 
user559633
1:18 PM
@RobertGrant There is absolutely no reason to be sorry.
 
user559633
This was our "if we don't make a decision, default to X" choice
 
And by manually installing I mean "downloading the code and putting it in a place"
 
@Ffisegydd I understand. Thanks!!
 
user559633
"Our" meaning me and my alternate personality: Dr Conrad von Huffinglue
 
@AvinashRaj I don’t know Django, but should just any Django seed that’s using some client-side framework work, and then you swap that framework with ng2?
 
1:20 PM
@Ffisegydd Which from these would I use for installing Pillow to iMac?
 
morning cbg all
 
morning @WayneWerner
 
@PichiWuana none. You would type something like pip install pillow
 
@PichiWuana I think I've just done python -m pip install pillow
 
pip install pillow would probably be a good idea.
 
1:21 PM
@khajvah But in general, yes, it’s diffícult to draw the line there. Some implementation naturally just becomes very complicated (and that’s where TDD theory stops talking about it :P), so you have to decide yourself what is appropriate and what isn’t. But the general idea is to avoid testing too much internal implementation since you want loose coupling between implementation and tests.
 
(there, rule of threes satisfied)
 
DSM
Some things are difficult to test on the outside, and easy to test on the inside. I'm not going to spend time trying to come up with some artificial way to test something indirectly to adhere to a slogan-- I'll test things where things make sense.
 
@Ffisegydd Wait where do I type pip install pillow? I'm using PyCharm... I'm confused. I guess I don't know what you are talking about exactly.
 
@PichiWuana I'd suggest you do some research on how to use pip.
 
If you're using PyCharm, then just use the builtin package manager.
 
1:23 PM
@poke Yeah I understood your ideas, thanks.
 
And also learn how to use pip.
 
I read a fantastic article about TDD the other day.
Let me see if I can find it
 
would love to read it
 
@poke +1 to that... I've recently stopped trying to test every little thing in isolation, and started more trying to test where it makes sense...
 
Same. I'm really bad about testing things, and I should be better.
 
Thought experiment: If my public interface is "this method finds the shortest path in O(log(n)) time", how do you test it?
 
et al
 
@Kevin go away.
 
@Ffisegydd ah an Uncle Bob article! :) should be good.
 
Typically I am just working on CRUD apps - no real logic involved, so my tests should be integration tests
 
user559633
1:25 PM
@Kevin in this scenario, are you a student, consultant, or full time employee? If full time employee, just name it shortest_path_O_log_n() and go to lunch
 
@Ffisegydd I found for installing pip, sudo easy_install pip but where do I type this?
 
@tristan Employee.
 
@poke it did get interesting
stackoverflow.com/a/36549633/918959 41103 extra mmap calls
 
user559633
Employment: None of Us is as Lazy as All of Us™
 
1:27 PM
all of the US
 
Serious answer: I guess you could run the function for varying sizes of N and... Do some kind of statistical thing to it.
 
user559633
yeah, world's premier superpower and economy sure is made up of lazy dumb dumbs
 
@PichiWuana Really? Have you tried to do more than 2 minutes of research on it? Please come back and ask once you've spent an hour reading tutorials and blogs. You'll probably not need the entire hour as you should have it worked out in 10 minutes.
 
@Antti Wow. That’s pretty crazy. Is that worth a bug report?
 
I bet "least squares" is involved somehow.
 
1:28 PM
@poke I guess some bad behaviour from pymalloc
 
@Kevin I don’t think your interface should have runtime behavior.
 
@Ffisegydd every time I read an article by uncle Bob, I realize how bad my code is.
 
Change "in O(log(N)) time" to "in O(log(N)) time... maybe", job's done.
 
Haha... QFT
 
"I ran your method ten times and its performance is identical to this graph of N factorial" "well I only said it would maybe be logarithmic"
 
1:31 PM
static void *
_PyObject_ArenaMmap(void *ctx, size_t size)
{
    void *ptr;
    ptr = mmap(NULL, size, PROT_READ|PROT_WRITE,
               MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
    if (ptr == MAP_FAILED)
        return NULL;
    assert(ptr != NULL);
    return ptr;
}
could be this
 
@khajvah blog.8thlight.com/uncle-bob/2015/06/30/… might back up some of poke's arguments for you.
> *That means that tests win. No test can be denied access to a variable simply to maintain encapsulation.*
> You mean that if a test needs access to a private variable...
> *...the variable shouldn't be private. Yes*
 
user559633
This Uncle Bob article on TDD reads very condescending for something that's ultimately preference and opinion
 
@tristan Fair enough. That is, after all, your opinion :P
 
user559633
Wait, you're saying that you need to learn how to appreciate a michelada more than a bloody mary?
 
user559633
"Just drink this and attend the church of the Agile for a few years before saying it's not a good idea"
 
1:35 PM
and proceeding with our star wars themed sprints..we are at the letter I this sprint and are going with: Armand Isard
 
DSM
Your workplace is admirably nerdy.
 
I couldn't be prouder
 
Umm... Iridonia ?
 
What is "Star Wars Rogue One" supposed to be? It it episode 8?
 
I remember hearing that they planned to make various spin-off movies that don't adhere to the main branch's numbering scheme. I assumed it is one of those.
 
DSM
1:41 PM
@AnttiHaapala: the transcript you pasted uses python for the first test and python3 for the second. Was that intended?
 
I saw it had a Death Star in it which puts them up to 4 now?
 
@QuestionC it's set back in the original trilogy about a squadron looking to steal the death star blueprints
 
@DSM venv, so no worries :d
 
Now trying to figure out if "assumed it is" is grammatical...
 
I assume it is.
 
1:43 PM
@QuestionC It's a spin-off that's based before A New Hope I think. Won't be Jedi focussed.
 
@Ffisegydd I like the part that follows a bit after that:
> “Wait! Where did the instance method go?”
> I don't need it.
> “Ah, the instance variable is public. You can just use it directly.”
> Right.
> “But... But... Someone might over-write it?”
> Who would do that?
> “I dunno. Uh. Someone bad.”
> Do you have bad people on your team?
 
@Kevin QuestionC assumed it is... :p
 
That’s exactly why Python doesn’t need access modifiers.
 
@poke "Yes. Yes I do. The baddest person is called Fizzy. He's a monster."
 
@Ffisegydd That's something I wholeheartedly agree with
 
1:44 PM
@JonClements Divide by zero error.
 
DSM
I suspect we'll be getting access modifiers soon enough anyhow.
 
Access modifiers are for people who don't understand computers
Give me physical access to the computer and nothing is private anymore
You just piss me off with your stupid design because now I have to figure out how to bypass your access modifiers because yeah, you wrote a library that I have to use, but you wanted to protect your precious variables.
Sorry... having some flashbacks there ;)
 
@Wayne wow - I felt that from all the way over here.... :p
 
DSM
I once spent a solid hour trying to work around some unfortunate const choices. Did not make me happy.
 
Access modifiers are a decades old strategy that works. I prefer Python's way of handling it, but private/public obviously isn't unworkable.
 
DSM
1:49 PM
True enough. But their absence doesn't cause as many problems as Official Theory says it should, which suggests that either the threat is overstated or Python's other advantages outweigh it.
 
Yeah... I was dealing with a library that was used for accessing our mainframe. They used "information hiding" for not giving you access to the connection string. Rather than just pulling it out of the config like any sane environment. So I had to figure out what it was doing from decompiling the .NET code so I could do the things I wanted to do, because their API was not very good.
I've never been frustrated by a Python library that I can recall - at least not to the extent that I have with <insert library with public/private access modifiers>
 
user559633
If when writing something, if I ever create a second voice just to feign surprise and agree with me, please use your Tristan Express card to book a flight and physically slap me in the face.
 
user559633
ARE WE UNDERSTANDING THIS?

>Yes. I see your point. Good designs are easy to test.
 
DSM
I've occasionally used a second voice to mock myself. Is there a self-deprecation exception? ;-)
 
Darn it... now I can't remember the rather famous pythonista who has a bunch of jupyter notebooks kicking around
he used a second voice... but not to agree, more to explain. Had something to do with probabilities
 
1:54 PM
whats the best way to remove comments from a json-like file?
im scanning through the json package but find no way to strip out comments like with a json minifier
 
user559633
thanks other me! i was afraid i'd have to make a reasoned argument in which i'd have to allow another's opinion to influence my worldview.
>no problem other other me, i know just when you want to be myopic and smug.  by the way, your haircut is *totally sweet* and not at all a traditional russian men's haircut that has since grown-out and merged into your neckbeard creating a neckbeard-mullet
 
user559633
@gnzlbg json-like or json?
 
@gnzlbg ewww.... Well, I guess it depends on the format of your comments.
 
If you have a programmer that lacks the concept of public/private access, then language-enforced access modifiers are a good thing. I suspect most programmers lacked the concept of public/private access 30 years ago.
 
user559633
json doesn't support comments, which is why i asked.
 
1:56 PM
found it
yes json doesn't support comments
but if you are using json as a configuration file you might want to add some comments to it
 
user559633
Yes, but JSON doesn't support comments. So, JSON or JSON-like?
 
there is JSON.minify which removes comments from "json-like" files, to make them valid json
yeah that's why i said json-like
json doesn't support comments
 
user559633
Well, that's why I asked. Because no one in here can have any fucking clue what's sitting on your local machine if you don't post a relevant section.
 
{ "comment": "JSON doesn't need explicit comment support." }
 
one can do that as well
but its a bit overkill if you want to annotate every field
 
user559633
1:58 PM
yaml: >
  this is way better. shit, did i want | ?
 
yes yaml is way better
 
user559633
disagree with better; was just making a joke
 
@QuestionC I don't know if I'd agree with that. Languages had scoping, which is basically the same thing. Except Python is nice and even exposes closed over variables for you ;)
 
for my purpose it would be better at least
 
user559633
what kind of idiot relies on meaningful whitespace
 
1:59 PM
so chat needs at least the trollface emoticon :P
That should totally be part of the unicode standard, though
 
user559633
if you could tell that i was being sarcastic, the current implementation is just fine
 

« first day (2004 days earlier)      last day (2947 days later) »