« first day (2072 days earlier)      last day (1146 days later) » 

12:14 AM
@LuisMendo It's not just delegating copy-on-write to the programmer. Python's "assignment creates a reference to the same data" allows for really useful things such as having a list of values, and then creating a dictionary with those same values. Now you can access (and modify!) those values using either an index or a key. The list preserves the original order of the elements, and allows you to visit them in the right order, and the dictionary allows quickly finding the right element.
In MATLAB you'd have to keep a dictionary with indices, and then use an extra indirection when accessing the elements through the dictionary.
Made very good use of this in my recent "learn Python project" crisluengo.github.io/doxpp
 
 
1 hour later…
1:41 AM
@LuisMendo do you also remember web.archive.org/web/20180411011411/http://python.net/~goodger/… ? That's why I say copying is just a side-effect.
 
 
7 hours later…
8:48 AM
@CrisLuengo That makes a lot of sense, and is a good example of why "assignment created a reference to the same data" can be useful, thanks. BTW, your example reminds me of Matlab's ' table', whose columns can be accessed by index or by key
@AndrasDeak YEs, I agree that name-binding is the fundamental thing, rather than what happens with copying
 
 
1 hour later…
10:07 AM
@AndrasDeak I had another epiphany regarding paths/python/windows: In windows each drive has its own "working directory", so to switch from the current working directory from one drive to another you can just use os.chdir('C:') (or whatever drive you wanna switch to), so then os.chdir('C:/asdf') changes to the directory asdf which is located in the "root" of C:, but os.chdir('C:qwert') changes in to the subdirectory qwert of the current working directory of C:.
In hindsight this all seems obvious but it wasn't to me up to now:)
 
 
2 hours later…
12:11 PM
@flawr I don't know windows but that actually rings a pitfall bell
Does it actually work for the right drive? Does it not just ignore the drive part?
 
12:38 PM
it seemed to work
I've tried in only in the REPL though
 
 
6 hours later…
6:57 PM
@LuisMendo I ended up answering that colorbar question with one of the undocumented hacks I mentioned
So I got my 2nd vaccine this morning. No side effects so far...
 
7:20 PM
@Dev-iL Great! I'm still waiting for my 1st one. And it looks like it may be AstraZeneca, not Pfizer. But hey
@Dev-iL You and your undocumented stuff
That function name...?
 
@flawr it should not matter
 
7:46 PM
@Dev-iL ...just like Haskell!
 
8:10 PM
:-D
 
9:01 PM
@LuisMendo I like listening to a german radio show where they frequently interview Christian Drosten, a clinical Virologist who is basically "Mr. Corona" in germany. They go quite in depth - the interviewers are also have backgrounds in science - and I one of the most recent shows they also talked about the astrazeneca vaccine where he basicaly said that in his view the bad reputation as a vaccine is not deserved, an he elaborated how this developed.
 
yeah, they set off on the wrong foot with some murky test statistics
but confidence is everything in a vaccine, see russian and chinese variants
 
Absolutely, they should probably have hired a better PR team
But I'm really gateful for that podcast, as this is really qutie a humble but clear guy. They actually did one every day at the start of the pandemic just to clear up misconceptions and things that were spread by the press, many times without much context.
I'm not sure if there are actually any translations now
Aparently not no
So really its always great to have a good source compared to the shit show in my own and probably many other countries.
 
 
1 hour later…
10:17 PM
@flawr Good to know :-) Anyway I don't trust stories of side effects being worse than for other vaccines. I was only thinking that its effectiveness figure is lower
 
@LuisMendo from what I've heard those figures are not really comparable as they had quite different time frames/methdos/populations
 
I don't think side-effects matter at all. That's an O(1) issue whereas efficacy is O(N), so to speak.
 
Pretty sure for @Luis it's N=327.
 
@flawr do you use windows?
 
for looking outside or on my computer?:)
(yes in both cases)
 
10:25 PM
1. shame on you! 2. could you please tell me what np.array([1]).dtype is?
also np.array([1.0]).dtype while we're at it
 
>>> np.array([1]).dtype
dtype('int32')
>>> np.array([1.0]).dtype
dtype('float64')
 
Excellent, I wasn't going crazy. Thanks!
 
What was the deal?
 
Well, exactly what those types are. On linux the default numpy int is int64 as it should be.
The problem is that this is what the numpy user guide says:
> The default NumPy behavior is to create arrays in either 64-bit signed integers or double precision floating point numbers, int64 and float, respectively. If you expect your arrays to be a certain type, then you need to specify the dtype while you create the array.
Which is infamously bullshit. I'll have to raise that on the issue tracker.
 
This is stupid. But let me update python and check again. (I mostly use python on linux.)
 
10:34 PM
It's stupid, but it's historically stuck in numpy.
everyone wants to change it but there's too much code probably relying on it
Even the possibility of people relying on it is enough to veto changes, and this is so fundamental that it's a no-go to change. At least not easily.
 
there is a lot that could be changed about numpy, in my opinion. I really feel that at some point they should create an new version that does not have to be backward compatible
 
there should be an easy opt-in way to say "I want all my int arrays to be int64 by default" even on windows, but there's no machinery for now to make that possible
 
absolutely
 
@flawr they really can't. They are the base of the scipy ecosystem. They are critical infrastructure. You can't just swap out the plumbing of an entire city.
And you might say "just start a new library that does things right" but nobody in their right mind would try to pull that off in python of all places
 
But didn't they introduce some breaking changes in python3 too?
 
10:38 PM
that's the point
They say that python 3.3-3.4 were definitely perfectly usable, and 3.4 came out 7 years ago. Python 2 is EOLed and people are still crying for support.
((70% because they don't want to use parentheses in their prints))
 
uh yes, that is critical
 
so especially in python "make a breaking change and people will just switch" won't really fly
And if you start a new library that breaks, people will keep using the old one with crappy forks. And the community will fracture once again.
 
I remember when I first tried to get my feet wet with python, and I think 3.2 or 3.3 was out or so. And I thought cool let's start with the most recent version right? And whenever I encountered problems people started telling me I should use 2.7 instead^^
 
you did right
 
@AndrasDeak Do you feel like it really fractured it? I had the impression that it i just a going to be a matter of time.
 
10:44 PM
@flawr for a long time it did, and there are still cults dug deep in trenches refusing to budge, with hilariously terrible excuses
but by the time I started with python it was obvious that 3 is where it's at and 2 will be gone soon
I mean, obvious once I started talking to people who knew about python stuff
 
maybe they just tried to be all backward compatible for way too long so peple expected it would remain that way forever
 
yeah, the official guidance has always been "just switch already"
but the first few versions of 3 had some issues, which didn't help
But a lot of companies said "well yeah, python 2 will go away, but we won't spend time porting our code now because we still have python 2". And then it was suddenly "you can't stop supporting python 2, we need time to port our code to 3!"
 
11:10 PM
@AndrasDeak have you already added this issue?
 
no, not yet
 
could you let me know if you've done so? I'd be interested to see updates/responses
and of course I'd like to get 50% of the royalties!
 
Well, they'll fix the documentation
but sure
 
11:33 PM
@flawr Huh. This is messy :-)
@AndrasDeak Exactly. I don't get why people care about minor side-effects such as headache. If the side-effects were not minor that would be a different story, of course
 
Yeah, but with severe side-effects it can only be administered to people if the vaccine is Chinese or Russian the traditional, careful, scientific and transparent clinical trials are missing.
@flawr this part in the docs was added/edited two weeks ago
 

« first day (2072 days earlier)      last day (1146 days later) »