« first day (2147 days earlier)      last day (1065 days later) » 

8:14 AM
stackoverflow.com/q/67566100/5211833 @AnderBiguri where's that dupe target again?
 
haha I think we did not make it
can't do it now, sorry, have some conf
 
Question is rather weak to begin with; very non-minimal, bad text-to-code ratio IMO, and a rather 'easy' to understand error message
 
just take it as easy as this bear does
 
Meh, I just duped it to the previous one Andermentioned
 
 
4 hours later…
11:54 AM
@AndrasDeak haha, other people are complaining that certain stuff in the MIT Python course doens't work if you import both Numpy and pylab, rather than pylab only :p
 
well yes
 
One of the TAs answered with "Since the course videos were shot in 2016, pylab has been deprecated, and its use is heavily discouraged. I don't pretend to understand why, but I'm told it is to do with corruption of namespaces."
 
the solution is not dropping numpy :P
 
I left a comment pointing to the links you sent me a week or so ago, mentioning that the MIT is rather st00pid to have still used (and thus recommended) it in 2016
 
well, it had only been deprecated 2 years earlier
 
11:57 AM
But still :(
I was quite intrigued by the Stackoverflow blog about Python 2 deprecation. Had been deprecated for 20(!) years, and still there were new users attempting to learn Python 2 rather than 3, for some arcane reason
 
Python 2 was only deprecated couple of years ago tho
There was development on Python2 and python3 simultaneously
 
Well, according to that blog Python 2 was supposed to have been deprecated ages ago (Python 3 started in 2000 iirc), with deprecation being postponed and postponed ad nauseam, because people refused to move to the newer version
 
@AnderBiguri everyone was told when 3.0 came out to switch. Then everyone was told when 3.3-3.4 came out that there's absolutely no reason to stay and every should switch. Then everyone was told that 2.7 would be the last version. Then OH NO PYTHON 2 WAS DEPRECATED WE NEED MORE TIME!
 
Bit of a devil's circle though, because precisely because Python 2 kept being taken care of, people didn't feel the need to switch
 
3.0: 2008. 3.3: 2012. 2.7.0: 2010.
 
12:01 PM
hahaha that is fair Andras, but in any case, deprecation only came recently
 
@AnderBiguri what do you mean by "deprecation"?
 
Somethink like 25% of PIP downloads in the last couple of years were still for Python 2
 
EOL support I guess
 
@AnderBiguri yeah, that's not deprecation
Deprecation is "this still works but it soon won't"
 
most people I know that has been using python 2 is because dependencies
 
12:02 PM
EOL is "you done fucked up"
 
then deprecation never came :D
 
yeah, nobody saw it coming
 
In sciences, it tends to be "the entire data acquisition was written in python 2 by 3 people in 1995 and our facilities depends on it, and no one pays researchers to maitain the code, as that is not publishable"
following good practices requires time, time that most people can't have, beacuse they will lose their job
 
There are a few industries where 2.0 was prominent, like visual effects. And things developed by academics, because you know. But by the time I started with python 5 years ago python3wos.appspot.com was almost all green. No excuse to stick to 2 other than FUD from some religious idiots and laziness.
Saying that "we're stuck with 2 because reasons" is fine. Saying that "boo hoo python 2 was suddenly pulled out form under us" is utter bullshit.
 
yeah, agree, but most of the people I know is neither for religion or laziness
@AndrasDeak agree, of course
 
12:06 PM
@AnderBiguri and "deprecation only came recently" is also bullshit :P
 
well, as close to that, as it was still being supported.
you support something for 20 years and they you say "it was obvious this was not the thing you should be doing!" is also bullshit :D
In any case, im all in for python3 and only made python 2 TIGRE because otherwise the biggest particle accelerator of the UK would not use my code
but we coded it such that everything was python 3 compatible
and indeed, the onyl thin we needed to change was setuptools, a couple of bugs
 
2012: "Python 2.7 is intended to be the last major release in the 2.x series. The Python maintainers are planning to focus their future efforts on the Python 3.x series. This means that 2.7 will remain in place for a long time, running production systems that have not been ported to Python 3.x."
 
What irks me about this, though, is that this is a course from a highly acclaimed university. People thus trust it to be good, and they weren't following best practise to begin with. Teaching youngsters to use deprecated code is just .. bad.
 
"university", there's your problem
if it weren't for my python dev connections I'd have no idea how to do things correctly
 
Also, imo not very good, is that they haven't updated the course since 2016. I can get around to not shooting new vids, that's expensive. However, there were some compiled helper functions for 3.4, 3.5 and 3.6 Those of course no longer work for the majority of students, as they download the latest Python
 
12:11 PM
@AndrasDeak 100%
 
academics have a habit of assuming they know everything and don't bother looking up if that's true
 
So the TAs have rewritten those helper functions for 3.7, 3.8, 3.9, but have to drop links to a GitHub repository, rather than that the actual course with the zip-file was updated -.-
And you can actually pay to get a certificate in this course X.X
 
Scientific method my ass. Just take the first thing that works.
 
@AndrasDeak honestly, my own experience has always been that people are more like the example I gave before. They rely on some absurdly obsolete code from 1990s and no one has the time to sit down and rewrite/revise that because it means less papers and therefore you not having a job 2 years down the line
 
12:29 PM
So I guess I wait for my python4 to be out until I start porting my python2 code.
Must be any time soon, since we're already at 3.9 and they always made 0.1 increments.
 
@AnderBiguri the thing is that scientific code would be ported to python 3 pretty much automatically
the real kicker is how strings vs bytes are handled, which is mostly a non-issue for us
 
sounds right because it was like that for TIGRE, but the thing I heard complaisn about was data acquisition libraries, where I could see being an issue
 
 
2 hours later…
2:18 PM
@flawr Iron-clad logic.
 
For a time they said 4.0 might come after 3.9
 
LOL.It's going to take another 20 years for idiots to switch to 4.0, if it were released today.
Better never increment that major version number again.
 
Or just skip one and go directly to 5:P
 
Just introduce breaking changes slowly and silently, like MATLAB does. :D
 
Current promise is that it will be as major as a minor bump
Idiots will be idiots though
 
2:27 PM
has anyone of you tried 3.10? the pattern matching looks quite nice! It seems python is slowly becoming haskell
 
@flawr :|
 
is that a reaction to the pattern matching or to haskell?
 
Yes
 
:|
 
I just learned about the pattern matching. A way over the top switch statement, as can be expected from Python. ;)
 
2:43 PM
At least it's not as bad as asspressions
But yes, over the top, and once again thanks to Guido
 
too bad things like
x = [1,1]
match x:
	case [u, u]:
		print('works')
don't seem to be supported
 
@CrisLuengo I like that
 
3:03 PM
@flawr They have an example:
match point:
    case Point(x, y) if x == y:
        print(f"The point is located on the diagonal Y=X at {x}.")
    case Point(x, y):
        print(f"Point is not on the diagonal.")
If your case it would be case [u, v] if u==v:
Agreed that case [u, u]: would be easier.
@AndrasDeak I'v been trying to find out what asspressions are, but all I can find is things about anal glands of dogs...
 
@CrisLuengo yeah, the same XD
maybe he meant regexp?
 
I'm guessing it's a combination of "ass" and "expression", but it must refer to a specific type of expression, and I'm guessing you need to hang out in the Python chat room to know about it. :)
 
with the cool kids
 
What? Cooler than us? Impossible!
 
3:19 PM
hehehehe they don't know that though
 
@flawr tabs...?
 
3:41 PM
@AndrasDeak Oh, I heard about that. Didn't we discuss this here earlier? I don't see why they needed to add a new operator for this, there's already the = operator for assignment. Works just fine in C (as an expression).
 
4:00 PM
@CrisLuengo we probably did. And they needed it exactly to avoid the if humans_must_die = 1: kill_all_humans() pitfall
 
@CrisLuengo yep its := now
@AndrasDeak I was fighting the markdown, sorry
@CrisLuengo so you must like prolog then:)
 
4:32 PM
@flawr No
I like imperative languages, they match the way I think.
@AndrasDeak Then how do you distinguish good programmers from idiots??? :p
 
4:52 PM
We'd be dead anyway :P
 
5:27 PM
@AndrasDeak is there a way to have 1 cmd call such that actvates the pyton virtual env + runs code?
can I just call the python inside the pyenv, and that will have onyl access to its own stuff?
 
@AnderBiguri activate; python script.py :P
@AnderBiguri venv yes. Other envs dunno.
Use case?
 
yes, went and just calledn that specfic python from inside the venv folder
Usecase: NVIDIA visual profiler needs 1 executable to run
I guess I could have made that executable a bash script that does everything I needed
 
6:02 PM
yes, that would be more idiomatic
 
 
3 hours later…
8:36 PM
Hello! it's that user again! Can MATLAB's onCleanup be 'safely' removed without running it?! This seems impossible...?
 
why don't you rename yourself to that_user_again? :)
 
when I see a user* in chat I just pretend it's always a brand new user
 
oh, that's not bad
 
I'm also very cruel to new users
 
hm... the next question might be obvious
^^
(are you cruel only to new users?)
 
8:46 PM
good question, but I don't answer questions from new users
 
andras has been nice to me I think at least once
 
you're welcome
 
I felt very honoured
 
ok, here goes a NaN poisoning attempt
['will you answer this question?' * NaN]
(if the function is if(~newuser), answer(); end; this should evaluate to true)
(I think??)
(I should really rename I guess, facepalm)
 
9:05 PM
no pressure
 
Hmm. Too bad the admin tools don't allow me to change a user's name. That would be fun... :)
@user2305193 That would defeat the purpose of the onCleanup object. You might want to use different solution for whatever problem you have.
Or maybe you could "booby-trap" the function, so it doesn't do anything if certain condition is met? But I don't think that function can read variables from the calling workspace, as those can be destroyed in arbitrary order.
I think there are two recurring user* users, I can't keep you guys apart, sorry. :/
 

« first day (2147 days earlier)      last day (1065 days later) »