« first day (1474 days earlier)      last day (1758 days later) » 

5:42 AM
@AndrasDeak That's annoying. Someone wasn't thinking there.
Glad you finally upgraded to R2019a. R2019b will be released soon... :p
 
 
2 hours later…
7:52 AM
@AndrasDeak I really don't like this "there should only be one way" mentality. In python of all languages there are 1000s of ways to do everything. It feels like some people are citing their bible without ever thinking about whether it actually makes sense.
But I do like the polymorphism argument.
@AndrasDeak Thanks for sharing!
@AndrasDeak MATLAB is for the rich!
 
@AndrasDeak What do you do with MATLAB? I thought you transitioned fully to Python...
 
 
2 hours later…
10:19 AM
@Dev-iL run snippets when someone here asks for it :D
And maybe quote literal errors to lazy askers
@flawr native python typically adheres to that. One huge counterexample is string formatting. And there should preferably be one obvious way.
Third-party libs are much more redundant
@CrisLuengo I don't exactly live on the bleeding edge :P
 
 
2 hours later…
12:23 PM
English question: suppose I'm discussing some equation of the from A = b, how would I call the process of rewriting it as 0 = A-b (i.e. moving everything to one side so that it's equal to 0)?
 
12:41 PM
I want to differentiate between the case of "first divide by some value and then equate to zero" and "equate to zero directly w/o any division"
 
 
2 hours later…
2:25 PM
@AndrasDeak yes but I still don't think it is a good thing.
 
Varietas delectat ;) It has a consequence that there are a lot of familiar patterns to doing certain things, and it takes very little mental effort to recognize them and see what's going on. I imagine this would be more difficult with a more "redundant" language, where the mere combination of possible approaches makes harder to recognize patterns.
At the end of that day I suspect someone either likes MATLAB or python, but not both
 
2:43 PM
Well again I think pure python is very inconsistent. On the one hand you have len(arr) but then again you have arr.append(). If you're already making an oop language with the familiar dot "." notation why would you want to mix in so many procedural things even if they would fit perfectly into the OOP ansatz?
 
I'm not sure python arrays have an append method :PP
(sorry, lists being called arrays are one of my many pet peeves)
 
Well it is the next best thing to an array in python, isn't it?
 
The len() thing ties in with the whole data model. There are a bunch of built-ins that delegate to dunder methods
@flawr no, because there are also stdlib arrays, namely array.array and bytearray
and they are indeed more array-like than lists
I've heard criticisms of python that the OOP was added as an afterthought (for instance by the guy who made Ruby), and also claims that python is not "truly OOP" because "it doesn't support polymorphism" or something along those lines, on which I can't comment because I have no idea about the matter. But it's perfectly reasonable that your objections to non-pure OOP in python is because it might not be very pure at all.
you might enjoy Ruby more, they.have.all.the.dots ;)
 
Well haskell also has all the dots, but they do something different:D
@AndrasDeak interesting, yes that would explain a lot...
I also wondered why you have to explicitly always add the self argument for methods, but then you still cannot call them as class.methhod(someObject)
 
you can call them as such
 
2:49 PM
really???
 
yup
the point is that there's explicitly no magic with self, it's just that the instance gets passed automatically as the first argument on instance methods (unless classmethod or staticmethod...)
 
except the magic that the self suddenly disappears when you call somethinga s a method:)
 
well, yeah, but it's much less magical than this in most languages
I think in JS it's highly non-trivial what this is in a nested scope
for references to the earlier criticisms: Ruby guy on python's oop, Madara on python OOP
 
huh, last time I've tried it didn't work, or at least I was convinced it didn't
 
that's about all I know about the subject
 
2:52 PM
@AndrasDeak but it feels a lot more natural
 
@flawr perhaps you tried a classmethod or staticmethod?
@flawr "natural" is very dangerous :)
one man's intuitive is another man's insane
 
My view is the only legitimate one.
So nothing dangerous here
@AndrasDeak hmm
 
>>> class Foo:
...     def bar(self, *args):
...         print(self)
...         print(args)
...
...     @classmethod
...     def baz(cls, *args):
...         print(cls)
...         print(args)
...
...     @staticmethod
...     def quux(*args):
...         print(args)
...
... f = Foo()
... f.bar(42)
... f.baz(42)
... f.quux(42)
...
<__main__.Foo object at 0x7efe7ef90518>
(42,)
<class '__main__.Foo'>
(42,)
(42,)

>>> Foo.bar(f, 42)
<__main__.Foo object at 0x7efe7ef90518>
(42,)
 
I was even convinced that I tried this and it didn't work:/
 
I wouldn't have bet that that would work, though
monkeypatching is fickle business
 
2:57 PM
Well anyway, I still don't like piethon, I just use it basically because it is the most use language for what I'm using it and there are some nice libraries and tons of ressources online
it's just a huge mess, and and sheds a bad light on snakes
 
Do you know where the name comes from?
 
monty python I think?
 
yup
 
that's why it's such a joke
@AndrasDeak have you used pytorch?
 
@flawr no arguments here
@flawr I don't do any ML, ever
 
3:03 PM
I think it does many things a lot better than pure python as well as numpy, even considering it is still under such a heavy development
@AndrasDeak it is not only good for ML but for any kind of optimization, or computation for that matter
 
I see
 
great if you want to accelerate things with a gpu
 
I also don't do gpu stuff
 
@AndrasDeak so what do you do all day long? :D
use turtle graphics? :)
 
draw pretty pictures
 
3:05 PM
ok that is nice:)
let me start to tell you how horrible matplotlib is
I should port pytorch to haskell
 
what's stopping you? :P
 
good question :)
 
lol, an OP just changed my accept to their crappy self-answer after 3 years
 
let us downvote this guy
 
nah, they somehow got one more vote on their self-answer than I have on mine
 
3:13 PM
maybe not much longer :D
@flawr I should have answered lazyness :)
 
lol, don't downvote them
 
How comes that you have 3 questions on SO? Aren't you supposed to know everything? actually you self answered two of them, and one is about FORTRAN
 
3:38 PM
:P
 

« first day (1474 days earlier)      last day (1758 days later) »