« first day (1734 days earlier)      last day (1479 days later) » 

6:11 AM
More interesting to read the notes on the side... figma.com/proto/2t44qjxWBPVxTXudWuAcAz/…
I see how that could work...
 
6:34 AM
Also, victory is mine (kinda)! (meta.stackoverflow.com/q/295776/3372061)
 
 
2 hours later…
8:40 AM
@Dev-iL ugh, I am starting to be not sane. I need some sports/go out
 
9:11 AM
@AnderBiguri e-sports count? :)
 
no :(
I already do some videogaming, but doesnt help
I want climbing, a beer in a pub, some out, in general
 
@AnderBiguri agreed. I luckily have a forest (well, sort of, a small one) at 200m from home. I like to do night walks there. But I do sorely miss cycling from work, stopping at the pub next to house, and drinking a Guinness or two whilst reading a book.
We can still go walking/cycling luckily, so we did 70km on our bicycle last Saturday
Speaking about cycling: @AnderBiguri you happen to know who operates trains between Newcastle and Aberdeen? Me and the missus plan to cycle Kirkwall-Edinburgh
 
whoever the local train company is
why you want to know?
likely 2 separate companies in fact
 
Because we're planning to cycle from Kirkwall to Edinburgh, and need to get to Kirkwall :P
I presume Edinburgh - Aberdeen to be operated by ScottRail?
 
just check thetrainline
or nationalrail
both webpages will give you all options and you can buy tickets for good price (often cheaper than in the day)
I generally use trainline
 
9:19 AM
Cool, thanks.
What?!? 123 FRANCS to go less than four hours?!?
 
Not sure how much is that
 
Ah, you can get 30-ish pound tickets about 3 months in advance.
@AnderBiguri 100 pounds, or thereabouts
 
but UK trains are not cheap, at all
also check times. "peak time" is generally x3 the price
I could buy London Bristol for 30 to 150, depending on the time of day
I used to fly from Southampton to Edibourgh because it was significantly cheaper than taking the train
 
Maybe they should institute differential ticket pricing here as well....
 
they have a oligarchy here in the UK, the train companies
 
9:24 AM
Problem is that we're taking bicycles. Ferry IJmuiden - Newcastle, then train to Aberdeen and another ferry to Kirkwall
 
@Dev-iL problem is that then you isolate a large amount of the population.
 
@Adriaan Sounds like it's cheaper to rent a car for a day
 
Much cheaper def
Renting a car in the UK is like, 30£/day
 
@Dev-iL Mwoah. With bicycles, and pick-up point different from delivery point?
 
@Adriaan It could be possible, just something to consider
different pickup/dropoff is not that unusual
@AnderBiguri Do you no longer think in Euros?
 
9:28 AM
6 years here
 
@Dev-iL cost us 40 quid on Iceland, but Iceland's notoriously expensive for car hire
@AnderBiguri poor sod. You starting to like that foamless ale, don't you?
 
I do.... I do.....
For coronavirus reasons, I bought 2 crates of craft beer :D
the end of the world will come, but I will have beer to enjoy it all going down
 
@AnderBiguri Sounds reasonable
Craft beer comes in smaller bottles, no?
 
cans and bottles both
but some are big
"flabourly" is the company I used
 
The student union here does a digital beer tasting. You order your own box (12 beers minimum), including the 6 beers specified, and then you join the online-stream for the tasting :P
 
9:32 AM
I means smaller "quantities"
@Adriaan Yurop....
 
@AnderBiguri I probably told you this several times, try Black Isle Brewery. It was glorious back when I tried it in 2015 (or 2016)
 
Do they use the same logo as the game company?
 
@Dev-iL Black Mesa
 
To be honest, I irdered the crates from where it was cheaper. I was not being picky
 
9:36 AM
As far as alcohol and respiratory illnesses are concerned, my parents decided to stick to the age-old folk medicine of drinking a shot of vodka in the morning and evening
 
Damn, zooming into Scotland on Google maps is hard for me. Everywhere you look are distilleries
 
@Dev-iL hahahaha
killing coronavirus with vodka, bold move
 
@AnderBiguri not killing coronavirus - merely prophylactically
 
10:33 AM
I need your help interpreting some result I'm getting
I have some function from R3 to C1
The gradient of this function is therefore in C3
Now suppose I find the phase angle of the output, s.t. φ = mod( angle(H), 2π) (H is the name of the output of R3->C1)
Clearly, φ here is a real value (represents an angle in radians). If I evaluate the gradient of φ using finite differences, I obviously also get real values.
So the question is as follows - suppose I know the gradient of the function symbolically, I can evaluate it to get 3 complex values, but how do I get from them to the real gradient computed before? I suppose the crux of the issue is the differentiation of the angle operator (atan2?)
 
"the real gradient" as in, the gradient of the angle, real valued. Right?
 
yeah
 
Ultimately you are describing some function f: R3->C1->R1
 
yeah
 
Can you describe this function and take its gradient? Is the atan2 the problem?
 
10:44 AM
The function is known analytically and is differentiable (analytically), if that's what you're asking
atan+mod are the problem, I suppose
 
Yes, bu can you make f2: f1->R1 ?
 
@AnderBiguri No comprendo, isn't this just φ = mod( angle(H), 2π)?
 
yes yes, can you not take the derivative of f2 ?
 
BTW congrats on message #48980000 ;)
 
hahaha
try forgetting the mod for a sec, only with angle(H)
 
10:47 AM
I suppose it comes down to the derivative of atan2, no?
maybe I should just stay with complex numbers
The function atan2 ⁡ ( y , x ) {\displaystyle \operatorname {atan2} (y,x)} or arctan2 ⁡ ( y , x ) {\displaystyle \operatorname {arctan2} (y,x)} (from "2-argument arctangent") is defined as the angle in the Euclidean plane, given in radians, between the positive x axis and the ray to the point (x, y) ≠ (0, 0). The function atan2 ⁡ ( y , x )...
 
hum, I think you can imagine that you have f: R3->R2
 
@AndrasDeak is this simply a typo because OP uses square brackets instead of double parentheses (())?
 
@Adriaan yes
 
kk. I already voted as no MCVE, OP wasn't happy about that.
Ah no it's not. the entire syntax of that function is wrong.
It needs parenthesis and commas, not square brackets and colons
If my Python serves me
 
Do you see what I mean @Dev-iL ? If you make a function C1->R2 (simply take C1 and make it Real+Imag) then you can define your function as R3->R2, which then you can ignore complex numbers as a whole (not really necesary, but likely useful to keep better mental track of the problem). Then you have R2->R1 (angle()) so you have f2:R3->R1, which sounds differenciable
particularly if that C1->R2 does always map to the unit circle (or just circle, depedns if you want to normalize, which you can in your case, if you onyl want the angle), you don't need mod()
 
10:58 AM
the reason I have mod there is because by default the result of atan2 is in [-π,π] but I need (?) it in [0, 2π]
 
is that +pi?
 
What else would it be? :)
 
mod([-π,π],2π) will only give you π as maximum value
 
why abs?
 
let me rephrase
if you want that range change you just want to add +π, instead of mod, right?
 
11:01 AM
>> mod ( linspace (-pi, pi, 10), 2*pi)
ans =
    3.1416    3.8397    4.5379    5.2360    5.9341    0.3491    1.0472    1.7453    2.4435    3.1416
looks pretty [0, 2π] to me
 
huh it is
 
@AnderBiguri Absolutely not, because that changes the angle by 180 degrees
the only way is to add 2pi to negative numbers, then those values end up being >=1*pi
 
11:36 AM
Sorry was in a meeting
my question really here would be: how relevant is really that range?
Can you not ignore that change for now? for the erivative purposes
 
@Dev-iL the gradient of atan2 is actually quite simple!
grad atan2 (x, y) = (-y, x) / (x^2 + y^2)
(note that in most languages the y part comes before x, so you'd have to flip these two tuples)
 
@flawr yeah, I saw it in the link... I need to see if I can get the same result as in the numeric gradient
 
@Dev-iL wouldn't a complex step derivative be nice here :)
 
@flawr Isn't that just for improving precision...?
 
Yes
but it is one of the coolest things I learned here:)
 
11:43 AM
It's just cheating
if MATLAB had quad precision a way to increase the bit depth of numbers, you wouldn't need it
 
unlucky me with my quarter precision floats
 
quarter is what? 8 bit?
 
you could also use pytorch with its autograd if you want to compare numerical results
@Dev-iL yes
how complex is your function?
 
@flawr at least 5 complex
 
@flawr not very
 
11:47 AM
if it is not too much work I can try to implement it!
 
No need, I have it already
but thanks for offering, really!
 
@Dev-iL that looks a lot like it's coming form a CAS:)
 
(A is A(x,y) ; B is B(y,z) ; so the gradient is [dHdx, dHdy dHdz] )
What's a CAS?
I have no idea where this comes from... This is just the task I got
 
computer algebra system
 
Ah, sure. That screenshot is from Maple
 
12:00 PM
so is your problem solved now?
 
Not really... I need to figure out how `[0.000262403258150469; 7969.94929568350
-1991.17530762973]` is related to `[9.40143300600827e-05 + 3.08497891788974e-05i; 986.742856094563 - 3012.78448842457i; -246.215642373340 + 753.350371052036i]`
where the top vector contains numerical derivatives of the real value, and the bottom values are the derivatives of the complex value.. They should be somehow related through atan2 or derivatives thereof
I'll think about this some more....
 
and you map the complex to the real by taking the angle?
 
yes, when it comes to H, but these are its derivatives
 
so you have a function f(x) = complex_to_real( r3_to_c1(x)), and the first vector is gradient of f(x), and the second is the gradient of r3_to_c1
(where the complex_to_real = angle or atan2 or something like that)
is taht correct?
 
φ = angle(H(x,y,z)) -> [dφ/dx, dφ/dy, dφ/dz] = f ( [dH/dx, dH/dy, dH/dz] ) -> f = ?
 
12:13 PM
so r3_to_c1 = H
 
f = d(angle)/dH whatever that means :)
 
ok your f and my f don't match
in your case f is indeed dangle/dH (evaluated in H(x,y,z)) which is a matrix (if you consider the complex numbers as two real components)
dphi/d(x,y,z) = dangle/d H * dH/d(x,y,z)
so what you're missing is the dangle/dH
 
of so if angle(H) == atan2( imag(H), real(H) )... suppose I want to use the chain rule here, wth is the definition of d( imag(H) )/ dH ??
 
that does get messy, I'd recommend just considering the output of H as two real numbers
(the complex derivative of imag(H) and real(H) doesn't exist)
 
@flawr yeah, that's probably best
OTOH, splitting this problem into a real and imaginary part early on complicates the equations considerably
 
12:22 PM
ah, but thats ok I think. especially if you are going to number crunch that
 
that's atan( imag(H) / real(H) )
 
@flawr +1, this is what I suggested
 
(note that "angle" also doesn't have a complex derivative)
 
@Dev-iL my question here was: do you need imag/real, or can you add an extra thing to your fucntion that maps imag/real to the unit circle? i.e., normalize it
 
@AnderBiguri the issue is that A and B are some nasty expressions, resulting in something I'd rather avoid (just a sec, will show image)
 
12:23 PM
the angle will be the same
 
@AnderBiguri but atan2 automaticaly does that for you, hence the x^2+y^2 in the denominator of the gradient
 
@AnderBiguri I am not sure, perhaps only the angle matters
 
@flawr ah yes
 
so again you have phi(x,y,z) = angle(H(x,y,z)) where H is a function from R3->R2
 
and the derivatives quickly get out of hand:
 
12:27 PM
I'd say that is still quite OK
 
well do you want asingle formula without substitutions??? (tha tis gonna be numerically disadventageous)
 
that is why you are using a computer
its bulky, but its all sqrt(2)sqrt(w)*L thing
if almost all those are constants, this is just verbose, but not too long
 
There are two competing considerations here: human-readability of the expressions involved vs. computability
 
Do you need the first one?
 
just a sec, I'll explain
 
12:30 PM
@Dev-iL in both cases I'd avoid explicitly evaluating the compositions
 
The code for computing phi using complex variable is shorter but uses more memory than two alternatives I explored with Im/Re separation
(not surprising)
at the end of the day I need the 4-quadrant angle of H and its gradient/jacobian
 
that doesnt work on my side
 
now the problem is, the entries in the right part are d Real(H(x,y,z))/dx etc
this product ends up being 1x3
and d Real(H(x,y,z))/dx cannot be computed using the complex derivative of H(x,y,z)
 
right, sorry
so there's nothing I can do with the complex derivatives?
 
12:40 PM
yes I think that is the issue
does a complex derivative even make sense in this case?
 
12:54 PM
¯\_(ツ)_/¯
 
 
My intuition is very weak when it comes to complex derivatives
1 message moved to friendly bin
 
1:10 PM
@Dev-iL haha same here. I have to say I'm not sure whether it is really not possible to use the complex derivative, but I think that depends on how well behaved A and B are
it has been too long since my functional analysis classes:)
 
@flawr same here
 
@Dev-iL I guess a little bit longer in your case though:)
 
A and B are positive real numbers
I did it in the spring of 2008 😬
 
@Dev-iL hm, when was I born??? :D
@Dev-iL yes but I mean how they depend on x,y,z (or in other words whether x |-> A(x,y,z) is analytic or not)
 
should I test the cauchy-riemann equations?
 
1:20 PM
numerically? :)
 
symbolically of course
 
I'm not sure, I'd probably have to dive deeper into it than i have time for right now:)
 
I want to play around with the complex derivative a bit more to see if I can use it somehow
It's a good exercise I think
 
so you'd have to test if dRe(H(x,y,z))/dx = Re(dH(x,y,z)/x), right (where we use the complex derivative in the RHS)?
 
That is the conclusion I will have to reach, but how to do it is the question
I suppose Maple can take care of it
 
1:24 PM
poor maple
at least first you could test it numerically just to see whether they are close enough
 
 
1 hour later…
2:29 PM
I have it on good authority that d/dx and Re() should be swappable. So now, in order to evaluate the dPhi I need to figure out what exactly to put in the derivatives of the tan
to be continued...
now I have 3 equations and 2 unknowns so it's easy to see if the equations work :)
 
3:00 PM
y is usually the imaginary value, x the real one
so we had grad atan2 (x, y) = (-y, x) / (x^2 + y^2), therefore you'd want to evaluate atan2(re(...), im(..))
why don't you use quaternions? :P
@AndrasDeak do you know the "right" way to reorder columns in a pandas dataframe?
d'oh
df = df[['new','column','order']]
not googling the wrong things helps a lot
 
yup
 
3:17 PM
thanks:)
 
 
3 hours later…
6:29 PM
Dark mode \o/
(Now I'm not sure if I'll get used to it...)
 
its weird
but I activated it
 
should probably add rlemon's dark chat theme
 
7:35 PM
where can you do that
 
8:25 PM
@AndrasDeak thx
 
caveat: both rlemon and Madara have left SO :(
not sure if and how long they'll maintain those
then again it's not like anything is going to change in chat
 
8:51 PM
@AndrasDeak I like the idea, but why all those coloured thick horizontal lines?
 
Do the colours correspond to users? They probably do
 
Yep
And it's an option
I removed it
Still, it's too much contrast for me
Font should be less light
Thanks for the hint anyway!
Similarly for the SO dark mode, I think
 
no problem, I haven't been using it myself, I'm also unhappy with how it looks overall. Although partly because SO was light anyway. Now it might be better. I haven't checked yet
 

« first day (1734 days earlier)      last day (1479 days later) »