Conversation
Notices
-
Embed this notice
:blobcatflower: (methyltheobromine@netzsphaere.xyz)'s status on Friday, 20-Sep-2024 09:58:54 JST :blobcatflower: > the IEEE 754 standard for floating-point arithmetic specifies that NaN is not equal to any value, including itself
computers where a mistake ngl-
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:06:49 JST The MILF Messiah @lucy isn't this good behaviour? Theres no guarantee that a NAN produced from a float and some operands is the same NAN produced from the same or different float and different or same operands?
Division by zero and sqrt(-1) are both interpreted as NAN but are vastly inequal -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:14:54 JST The MILF Messiah @lucy since a floating point number is incapable of complexity, I would personally prefer sqrt(1) to not be equal to sqrt(1) than have sqrt(1) be equal to 1/0.
Floating points are really just a way of denoting scalar values in a single dimension (I think those are the only requirements). There are some good reasons not to include a complex component to them, which I leave as an exercise for the reader..
What's a situation where this isn't what you want? -
Embed this notice
:blobcatflower: (methyltheobromine@netzsphaere.xyz)'s status on Friday, 20-Sep-2024 10:14:55 JST :blobcatflower: @lunarised i don't see this as valid reasoning since different operands can produce the same result in other cases -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:17:45 JST The MILF Messiah @cine @lucy i was waiting for the lisp-tists or eigen-tards to show up :P -
Embed this notice
cinerion (cine@cawfee.club)'s status on Friday, 20-Sep-2024 10:17:46 JST cinerion @lunarised @lucy
> sqrt(-1) is NaN
Skill issue -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:26:03 JST The MILF Messiah @lucy I care more that my value has overflowed its space to usefully denote anything. isNaN is a great guard for this imo, and it allows me to write better code and not persist data until I'm sure I can handle it. (Thanks eigen) -
Embed this notice
:blobcatflower: (methyltheobromine@netzsphaere.xyz)'s status on Friday, 20-Sep-2024 10:26:05 JST :blobcatflower: @lunarised why add this weird complexity around equation checks for floats? all you'd have to do is check "are the bits equal" and not "are either all the bits equal, or is in either 16/32/64 bits or whatever size your float is this specific combination used to denote for some reason it's non-equal to anything including itself?" it's useless complexity. if for some reason you want that, write an operator overload ig. name a scenario where that behaviour actually serves any purpose. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:27:41 JST The MILF Messiah @cine @lucy
The usefulness of complex numbers in 99% of programming doesn't warrant them coming baked in. I'd rather have more efficient arithmetic. If I wanna do complex numbers, il use eigen -
Embed this notice
cinerion (cine@cawfee.club)'s status on Friday, 20-Sep-2024 10:27:42 JST cinerion @lunarised @lucy I honestly thought it was common to have the standard library include a sqrt function that handled complex numbers. But I've tried python and no luck. I wondered if it was just common lisp, so I fired guile up and lo and behold, they too handle complex numbers. Maybe you're right, it's only lisps that do things right. Not even R, which is often used in sciency stuff. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 10:39:33 JST The MILF Messiah @gentoobro @lucy based and correct take graphics bro -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Friday, 20-Sep-2024 10:39:34 JST gentoobro isFinite() is often more useful, if you have infinities turned on, depending on your situation. In 3D graphics, for example, anything that's not finite is useless and should either get zeroed manually or should change control flow around it.
-
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Friday, 20-Sep-2024 10:41:10 JST iced depresso @cine @lucy @lunarised or just give the programmers tools to have nice things like nim does.
zig and others are stupid as hell as soon as you need something you go from a + b to ohfuck_sum(a, b) -
Embed this notice
cinerion (cine@cawfee.club)'s status on Friday, 20-Sep-2024 10:41:11 JST cinerion @lunarised @lucy Fair. The use cases for complex numbers already required specialized software most of the time anyways :thinkbird:
Still, skill issue :smug1: -
Embed this notice
cinerion (cine@cawfee.club)'s status on Friday, 20-Sep-2024 11:06:06 JST cinerion @icedquinn @lucy @lunarised
>Nim generates native dependency-free executables
>It is well-suited for embedded, hard-realtime systems.
>Nim has a powerful macro system which allows direct manipulation of the AST, offering nearly unlimited opportunities.
Interesting. Do you use it frequently? -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Friday, 20-Sep-2024 11:06:06 JST iced depresso @cine @lucy @lunarised when i programmed i did -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 11:30:36 JST The MILF Messiah @icedquinn @cine @lucy it's unusual to see someone rate nim over zig tbf -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 11:31:48 JST The MILF Messiah @icedquinn @cine @lucy which was a rude way of asking, what do you like about nim? -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 11:33:16 JST The MILF Messiah @lucy @icedquinn @cine I'm a rust/zig zealot tbf, and it seems there's a fair few of us around these days -
Embed this notice
:blobcatflower: (methyltheobromine@netzsphaere.xyz)'s status on Friday, 20-Sep-2024 11:33:18 JST :blobcatflower: @lunarised @icedquinn @cine i think nim is much better than zig too -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Friday, 20-Sep-2024 11:44:48 JST iced depresso @lunarised @cine @lucy i strongly disagree with the ethos of "don't let people do something because someone will do it wrong" and this is zig's excuse for not allowing operator overloading. -
Embed this notice
The MILF Messiah (lunarised@whinge.town)'s status on Friday, 20-Sep-2024 23:35:11 JST The MILF Messiah @icedquinn @cine @lucy its a fair disagreement. Maybe I'm too corporate pilled since I want code to do exactly what I think it will do, which the guard rails in Rust and Zig offer -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Saturday, 21-Sep-2024 03:00:56 JST iced depresso @lunarised @cine @lucy it becomes nice when you need to start doing something like complex numbers, geometric algebra, matrix math libs etc, because multiplying values is exactly what you are doing with the multiply operator you're just doing it without permission of the language committee.
i would actually like to have little to no bureaucracy involved in formulas, even, like i would prefer if the crypto code or math code showed what it actually means and then just lets me run a filter stack to get the executable code from it.
-
Embed this notice