hi

1.3K posts

hi banner
hi

hi

@schitzoided

Присоединился Aralık 2023
21 Подписки19 Подписчики
hi
hi@schitzoided·
@LukasHozda Thought this was an actual photo you took for a sec
English
0
0
1
5
hi
hi@schitzoided·
@BrendanEich @LukasHozda My point is, the error you get is the smallest error you can possibly get with floats. If your arr[i] data has any kind of error it probably is more important than this.
English
1
0
0
23
hi
hi@schitzoided·
@BrendanEich @LukasHozda yeah i didnt mean to annoy you i guess we just had a misunderstanding. The error, relatively, is not big. 17925 / (17925-17924.998) = e-8, which is consistent with relative spacing of float values (2^-23 relative)
English
1
0
0
34
BrendanEich
BrendanEich@BrendanEich·
@schitzoided @LukasHozda If arr[i] for any i is 56313 and the divisor is 3.14159f, then float gives 17925 while int gives 17924. Why did you write e-16? We're talking floating point here, not fixed point! Please think twice before replying.
English
1
0
2
233
hi
hi@schitzoided·
@BrendanEich @LukasHozda about the e-16, its just the machine epsilon (of f64, not f32, my bad). Just meant to make a point that the error is relatively small in normal cases (if the numbers arent very big or small). Whether the small error gets amplified by you truncating it to an integer is irrelevant
English
0
0
0
23
hi
hi@schitzoided·
@BrendanEich @LukasHozda Yes i dont even know what we are arguing about. the error between the two values is relatively small (17925.0 vs 17924.998) and it gets amplified by the int truncation. all im trying to say that in many cases the tradeoff is ok to make. You get error with floats inherently
English
1
0
0
202
hi
hi@schitzoided·
@BrendanEich @LukasHozda ok there might be a misunderstanding. i read your reply again and i am a bit lost at what you are trying to say? > float gives 17925 while int gives 17924. what are we talking again? i thought we were comparing division with recip multiplication? where's float/int coming from?
English
1
0
1
180
BrendanEich
BrendanEich@BrendanEich·
@schitzoided @LukasHozda You didn't answer why you said anything about 1e-16. Please explain or Imma mute you. This is a significant error in general and the example strongly implied arr was float[]. If int[] then all the types and literals should be int and no difference. So your last reply was wrong.
English
1
0
1
198
hi
hi@schitzoided·
@MatRopert not sure if youre implying that the compiler automatically does this with -O1 or hinting at the existance of flags such as -freciprocal-math
English
0
0
11
1.3K
hi
hi@schitzoided·
@BrendanEich @LukasHozda if by 1 you mean you can get a neighbor float (error usually in the order of e-16) then yes, that's the tradeoff, which in many cases is simply insignificant
English
1
0
1
135
hi
hi@schitzoided·
@BrendanEich @LukasHozda Not sure what you mean. Floats inherently have limited precision, for me this seems like just a simple choice: either you want more precision, or faster execution. Its not like you are ruining your "pure perfectly precise" floats by replacing division with multiplication
English
1
0
2
155
BrendanEich
BrendanEich@BrendanEich·
@schitzoided @LukasHozda What goes wrong? If you can’t say then the code is not safely general. If you can restrict domain, then use int.
English
1
0
1
174
hi
hi@schitzoided·
@BrendanEich @LukasHozda Its simpler with ints, dividing is equiv to multiplying with recipr, but thats why the compiler already picks the best option for you. No need to think about it. But with floats, its a real tradeoff and you can either make the optimization and sacrifice precision or not
English
1
0
1
468
hi
hi@schitzoided·
@godspeed_aflame yeah but unfortunately i dont care
English
0
0
4
494
Moonstruck❤️‍🔥
Moonstruck❤️‍🔥@godspeed_aflame·
they don't tell you this but its really not that hard to learn the basic pronunciation rules of most of the major languages and then you'll never have to be worried about mispronouncing a name or embarrassing yourself at a restaurant
English
10
26
1.1K
19.3K
Rift Rat
Rift Rat@themxdnoob·
@SonicForcesFam It’s insane to me that this old ass meme is getting a resurgence like this
English
1
0
18
5.7K
Steven
Steven@ptr_steve·
@saltjsx I'm laughing over here at the responses saying it's for reviewability. Who is reviewing a million lines of code? It takes me a good chunk of time to review 100 lines of changes in a decent sized codebase.
English
1
0
34
11.9K
hi
hi@schitzoided·
hi tweet media
ZXX
0
0
0
20
hi
hi@schitzoided·
@francoisfleuret Before AI, it was questionable whether something like a P zombie could exist, and now we made it in real life and it works
English
0
0
0
8
François Fleuret
François Fleuret@francoisfleuret·
Hot take: machine learning and AI did more to understand the nature of knowledge, and our relation to reality than 20 centuries of philosophy. I am ready to kind of defend this hill.
English
361
110
1.5K
130.2K
hi
hi@schitzoided·
@dpc_pw Not all traits are object safe
English
0
0
0
208
dpc
dpc@dpc_pw·
This whole "dynamic dispatch is slow" making people avoid `dyn Trait` in Rust is absurd and needs to die. "Geee. I'm going to sprinkle my code with generics everywhere, which will cause binaries and compilation times to explode; while the extra monomorphised code is going to kill my ICache usage, but at least I avoided the super scary dynamic dispatch which I heard somewhere is not zero-cost, so I'm awesome and my software is now blazingly fast." People are dumb and ignorant, and Rust devs are not excluded.
English
17
5
171
28.3K
hi
hi@schitzoided·
@rob_mcrobberson @thejesterhead9 If Lot already knew they were messengers of God then yes I think. The text doesn't make that clear though. What is your point anyway? That God is evil?
English
3
0
0
29
rob🏴
rob🏴@rob_mcrobberson·
@schitzoided @thejesterhead9 are you telling me that there is some missing context in which it is righteous to offer up your virgin daughters to a mob in order to protect two adult strangers from the same fate. explain it to me lol
English
2
0
2
32
rob🏴
rob🏴@rob_mcrobberson·
i love how the bible is like “thou shall not kill” and also “you should definitely have your disobedient child stoned to death at the city gates”
English
5
0
15
733
hi
hi@schitzoided·
@rob_mcrobberson @thejesterhead9 Righteous != perfect And its easy to judge without fully understanding the situation and context. For me its difficult to even imagine a situation where mob is outside your house trying to rape your visitors. The incest thing is completely unrelated and obviously wrong though
English
1
0
0
27