00:45:22 | FromDiscord | <System64 ~ Flandre Scarlet> Does Nim hae float128? |
00:53:02 | FromDiscord | <bostonboston> https://gist.github.com/apense/d7afe800ecb32b877059 |
00:53:10 | FromDiscord | <bostonboston> Not in system |
00:57:11 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @bostonboston "https://gist.github.com/apense/d7afe800ecb32b877059": Is it even supported on Intel CPUs? |
01:04:40 | FromDiscord | <System64 ~ Flandre Scarlet> Should I use the treshold everytime a module outputs? |
01:34:19 | FromDiscord | <bostonboston> That particular code snippet? No idea. |
01:34:36 | FromDiscord | <bostonboston> But I do believe modern x86 Intel CPUs have 128 bit floating point instructions somewhere |
01:36:52 | FromDiscord | <bostonboston> Maybe that's a lie |
01:37:53 | FromDiscord | <bostonboston> But gcc msvc and clang seem to implement 128 bit floats somehow |
01:37:58 | FromDiscord | <Elegantbeef> SIMD has a bunch of extensions and larger than 64bit registers↵(@bostonboston) |
01:38:57 | FromDiscord | <Elegantbeef> They're likely in software |
01:39:13 | FromDiscord | <bostonboston> I was aware of that, but I didn't know if it supported 128bit instructions, rather than just the vector instructions |
01:39:28 | FromDiscord | <bostonboston> Operations I should say |
02:09:20 | FromDiscord | <determiedmech1> hey guys↵quick question↵↵ive been messing around with using [KubeJS](https://kubejs.com) with nim but i've not gotten super into all the backend stuff yet so i was wondering how i'd do [this](<https://kubejs.com/wiki/tutorials/block-registry#:~:text=StartupEvents.registry(%27block%27%2C%20event%20%3D%3E%20%7B%0A%20%20event.create(%27example_block%27)%20//%20Create%20a%20new%20block%20with%20ID%20%27kubejs%3Aexample_block%27 |
02:09:47 | FromDiscord | <determiedmech1> (edit) "[this](<https://kubejs.com/wiki/tutorials/block-registry#:~:text=StartupEvents.registry(%27block%27%2C%20event%20%3D%3E%20%7B%0A%20%20event.create(%27example_block%27)%20//%20Create%20a%20new%20block%20with%20ID%20%27kubejs%3Aexample_block%27%0A%7D>)" => "[this](https://kubejs.com/wiki/tutorials/block-registry#:~:text=StartupEvents.registry(%27block%27%2C%20event%20%3D%3E%20%7B%0A%20%20event.create(%27example_block%27)%20// |
02:09:51 | FromDiscord | <determiedmech1> https://kubejs.com |
02:10:29 | FromDiscord | <determiedmech1> (edit) "hey guys↵quick question↵↵ive been messing around with using [KubeJS](https://kubejs.com) with nim but i've not gotten super into all the backend stuff yet so i was wondering how i'd do [this](https://kubejs.com/wiki/tutorials/block-registry#:~:text=StartupEvents.registry(%27block%27%2C%20event%20%3D%3E%20%7B%0A%20%20event.create(%27example_block%27)%20//%20Create%20a%20new%20block%20with%20ID%20%27kubejs%3Aexample_b |
02:10:34 | FromDiscord | <determiedmech1> (edit) "https://pasty.ee/jsDtFKXg" => "https://pasty.ee/YNSIwCnO" |
02:10:51 | FromDiscord | <determiedmech1> but like |
02:10:52 | FromDiscord | <determiedmech1> in nim |
02:16:16 | FromDiscord | <Elegantbeef> A lot of wrapping of the JS code |
02:17:02 | FromDiscord | <determiedmech1> fearful |
02:27:57 | FromDiscord | <Elegantbeef> You can always cheat and just write some JS that you then import and skip the middle man |
02:27:58 | FromDiscord | <Elegantbeef> People do that with C++ aswell so it's totally a legit way |
02:32:13 | FromDiscord | <determiedmech1> oh true |
03:01:15 | FromDiscord | <Robyn [She/Her]> In reply to @determiedmech1 "hey guys quick question": tbf `(args, more) => { ... }` is just sugar for `function(args, more) { ... }` |
03:09:46 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=UyAvaFXu |
03:09:50 | FromDiscord | <Robyn [She/Her]> @determiedmech1 |
03:10:04 | FromDiscord | <determiedmech1> oh |
03:10:09 | FromDiscord | <determiedmech1> yeha lemme try that |
03:10:10 | FromDiscord | <Robyn [She/Her]> In reply to @battery.acid.bubblegum "So you could just": Obviously you want to add more type safety lol, this is just a pseudoimpl |
03:10:19 | FromDiscord | <Robyn [She/Her]> i doubt it even works as is |
03:11:08 | FromDiscord | <Robyn [She/Her]> Look at https://github.com/nim-lang/Nim/wiki/Nim-for-TypeScript-Programmers#JavaScript-Interoperability and https://nim-lang.org/docs/jsffi.html to see how you can go about this |
03:17:38 | FromDiscord | <determiedmech1> In reply to @battery.acid.bubblegum "Obviously you want to": yeah i get this error https://media.discordapp.net/attachments/371759389889003532/1325302161718120468/image.png?ex=677b4b52&is=6779f9d2&hm=b52789cec0a35d7c8ec7b0db0bb5a71bc531a043f8f78b8e5a7255c82702f585& |
03:20:34 | FromDiscord | <Robyn [She/Her]> In reply to @determiedmech1 "yeah i get this": I have no idea what the JS looks like + I'm not in a position to test it myself stm |
03:20:55 | FromDiscord | <Robyn [She/Her]> you're gonna either have to experiment using the links I sent as a reference or just cheat, like Beef said |
03:21:23 | FromDiscord | <determiedmech1> ok |
03:21:37 | FromDiscord | <determiedmech1> thanks tho goats 🙏 |
03:21:49 | FromDiscord | <determiedmech1> (edit) removed "tho" |
03:23:06 | FromDiscord | <determiedmech1> sent a code paste, see https://play.nim-lang.org/#pasty=hzOkETxW |
03:43:14 | * | Onionhammer left #nim (The Lounge - https://thelounge.chat) |
03:44:56 | FromDiscord | <Robyn [She/Her]> In reply to @determiedmech1 "oh also this is": huh, that looks fine |
03:45:14 | FromDiscord | <Robyn [She/Her]> well |
03:45:19 | FromDiscord | <Robyn [She/Her]> hm... |
03:45:33 | FromDiscord | <Robyn [She/Her]> bind null? idk what that means |
03:48:15 | FromDiscord | <determiedmech1> im pretty sure this is where its getting StartupEvents from https://media.discordapp.net/attachments/371759389889003532/1325309864032862279/message.txt?ex=677b527e&is=677a00fe&hm=39464ec1be4feebac4d9f2d91515fbea1538ab0be11f66e50c0b754e710f3525& |
03:51:56 | FromDiscord | <Robyn [She/Her]> that looks fine |
03:59:31 | FromDiscord | <Robyn [She/Her]> In reply to @determiedmech1 "oh also this is": oh wait this looks bad |
03:59:36 | FromDiscord | <Robyn [She/Her]> huh... |
04:02:45 | FromDiscord | <Robyn [She/Her]> not sure how to fix it tho |
04:05:43 | * | krux02 quit (Quit: Leaving) |
05:34:25 | FromDiscord | <thebiglebobsky_> sent a long message, see https://pasty.ee/erYxqwOO |
05:35:58 | FromDiscord | <Elegantbeef> Seems absurd to aim a language specifically at making malware |
05:39:56 | FromDiscord | <thebiglebobsky_> im not really saying that with these features this should be a almost goto pick for many malware creators. it just seems to me like a glorfied soon to be better version of something like rust ( though rust is really fast and has almost no memory mishaps |
05:40:43 | FromDiscord | <Elegantbeef> > though rust is really fast↵Opposed to what? |
05:41:32 | FromDiscord | <thebiglebobsky_> going off of the benchmarks and ratings of rust so opposed to most languages |
05:48:57 | FromDiscord | <Elegantbeef> Ah programming language benchmarks the astrology in programming circles |
05:50:51 | FromDiscord | <bostonboston> As long as it isn't python your language is fast enough |
05:59:54 | * | xet7 joined #nim |
06:07:04 | * | xet7 quit (Remote host closed the connection) |
06:08:21 | * | xet7 joined #nim |
07:23:24 | * | SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev) |
07:24:49 | * | SchweinDeBurg joined #nim |
08:54:50 | FromDiscord | <myxi> https://github.com/nim-lang/Nim/blob/e8bf6af0da52ce91dd0b5a7474d386d9a66809b9/lib/pure/osproc.nim#L720↵↵i'm trying to figure out how to create child processes with a custom environment block in windows using `createProcessW` and that's the only example I could find. Does anybody know what's `env` and where to find it? |
08:57:32 | FromDiscord | <Elegantbeef> `env` is a prameter |
08:57:32 | FromDiscord | <Elegantbeef> parameter\ |
08:57:41 | FromDiscord | <Elegantbeef> `StringTableRef` so just your env variable |
09:00:47 | FromDiscord | <myxi> where to find an example for making `StringTableRef`? |
09:00:57 | FromDiscord | <Elegantbeef> \`std/strtabs |
09:20:35 | * | ntat joined #nim |
10:30:01 | * | coldfeet joined #nim |
11:51:50 | FromDiscord | <aintea> In reply to @shalokshalom "Nim does not have": If transducers are just currying then no Nim doesn't have that by default but you can implement it easily |
11:54:51 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=BTPateYS |
12:19:24 | FromDiscord | <fabric.input_output> In reply to @aintea "If transducers are just": honestly the `->>` looks like `dup` from `std/sugar` |
13:16:29 | * | krux02 joined #nim |
13:25:45 | FromDiscord | <aintea> the `->>` from what ? |
13:53:13 | * | ntat quit (Quit: Leaving) |
14:03:52 | FromDiscord | <jimb007> sent a code paste, see https://play.nim-lang.org/#pasty=NiqeVcIG |
14:05:29 | FromDiscord | <jimb007> (edit) "https://play.nim-lang.org/#pasty=cZFvzchY" => "https://play.nim-lang.org/#pasty=VgxkSHTC" |
14:05:47 | FromDiscord | <jimb007> (edit) "https://play.nim-lang.org/#pasty=ZILsBbHt" => "https://play.nim-lang.org/#pasty=QDPVYZkx" |
14:11:29 | FromDiscord | <michaelb.eth> sent a long message, see https://pasty.ee/TgJRqjrl |
15:22:36 | FromDiscord | <fabric.input_output> In reply to @aintea "the `->>` from what": from the transducers link |
15:23:19 | FromDiscord | <fabric.input_output> In reply to @michaelb.eth "transducers are sort of": aren't they like rust iterators and java streams? |
15:25:12 | FromDiscord | <lainlaylie> In reply to @jimb007 "Help needed please in": You should probably first parse it with "d/M/YYYY" or something then call getIsoWeekAndYear |
15:30:21 | FromDiscord | <michaelb.eth> In reply to @fabric.input_output "aren't they like rust": kind of |
15:50:03 | FromDiscord | <System64 ~ Flandre Scarlet> How can I remove those floats rounding errors please? I should have zero, just zero... https://media.discordapp.net/attachments/371759389889003532/1325491513819660421/image.png?ex=677bfbab&is=677aaa2b&hm=1470808a27bae4242bbf1f830461577eb0f132e94b53ededabe07f66a4c1785a& |
15:56:56 | om3ga | System64 ~ Flandre Scarlet: use formatFloat |
16:03:13 | * | beholders_eye joined #nim |
16:08:09 | * | beholders_eye quit (Ping timeout: 276 seconds) |
16:08:35 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @om3ga "System64 ~ Flandre Scarlet:": What is that? |
16:09:38 | * | beholders_eye joined #nim |
16:12:24 | FromDiscord | <odexine> In reply to @sys64 "How can I remove": I think you effectively can’t |
16:14:34 | * | beholders_eye quit (Ping timeout: 265 seconds) |
16:15:57 | * | beholders_eye joined #nim |
16:28:25 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "I think you effectively": I guess I have to flush very small values to zero |
16:35:34 | FromDiscord | <dwe7500> Has anyone gotten the basic Pixels example to work on a Mac using the `libSDL2.dylib`? |
16:36:21 | FromDiscord | <dwe7500> In reply to @dwe7500 "Has anyone gotten the": Tried to ask this question on the nim forum but appears that os not accepting new registrations after 2 email addresses being told an email could not be sent during registration |
16:36:42 | Amun-Ra | yes, but my example uses my bindings, but it shouldn't be hard to convert that to standard bindings |
16:37:26 | Amun-Ra | dwe7500: https://github.com/amnr/nsdl2/blob/master/examples/randompixels.nim |
16:40:19 | FromDiscord | <dwe7500> In reply to @Amun-Ra "dwe7500: https://github.com/amnr/nsdl2/blob/master/": OK so interesting but just using an entirely different library as a SDL abstraction rather than the Pixels library I was referring to |
16:41:00 | Amun-Ra | dwe7500: ah, sorry, Pixels… I focused on libsdl2 and missed the context entirely |
16:45:27 | FromDiscord | <odexine> In reply to @sys64 "I guess I have": It shouldn’t matter in practice? |
16:55:37 | FromDiscord | <dwe7500> In reply to @Amun-Ra "dwe7500: ah, sorry, Pixels…": I tried the examples in this repo you provided and still getting the same error so is more an install issue with SDL 2 as a framework on a mac or how to get nim to compile a program and point to the location of the framework |
17:00:52 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "It shouldn’t matter in": Until THIS happens https://media.discordapp.net/attachments/371759389889003532/1325509331336298506/image.png?ex=677c0c43&is=677abac3&hm=9c18ceff84f02f07c7820d5e4870c0c52df3356a8867622a4747aca4e38b02de& |
17:01:06 | FromDiscord | <odexine> In reply to @sys64 "Until THIS happens": That’s the same image |
17:01:22 | FromDiscord | <odexine> I don’t see what exactly the problem is because I don’t know what these values are |
17:02:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "I don’t see what": Normally both sines should cancel out (that gives zero)↵But then I apply some rounding to convert to integer↵But it's not exactly zero, which gives this error |
17:02:28 | Amun-Ra | dwe7500: what's the error? |
17:02:41 | FromDiscord | <System64 ~ Flandre Scarlet> Even C has this issue https://media.discordapp.net/attachments/371759389889003532/1325509786988580956/image.png?ex=677c0caf&is=677abb2f&hm=1353d935409481ec42e0712d6dc6400b7515e1960555f97f4d3115060705120e& |
17:02:52 | FromDiscord | <odexine> This is natural from how floats work |
17:03:09 | FromDiscord | <odexine> How are you applying rounding |
17:03:40 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=TBUQhVgU |
17:04:07 | Amun-Ra | if x - y < epsilon: # zero |
17:04:23 | FromDiscord | <dwe7500> In reply to @Amun-Ra "dwe7500: what's the error?": `Failed to load SDL 2.0 library: dlopen(libSDL2.dylib, 0x0002): tried: 'libSDL2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibSDL2.dylib' (no such file), '/usr/lib/libSDL2.dylib' (no such file, not in dyld cache), 'libSDL2.dylib' (no such file)` |
17:04:23 | FromDiscord | <odexine> Doesn’t work if there’s DC offset |
17:04:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "if x - y": epsilon? wdym? |
17:04:51 | FromDiscord | <odexine> Epsilon is “rounding constant” used for float comparison |
17:05:01 | Amun-Ra | System64: https://en.wikipedia.org/wiki/Machine_epsilon |
17:05:04 | FromDiscord | <odexine> Generally just a somewhat small float |
17:06:50 | FromDiscord | <odexine> Nim has an almost equal procedure in the math module |
17:07:01 | FromDiscord | <odexine> And an epsilon procedure as well if you want to manually calculate |
17:07:18 | FromDiscord | <odexine> (edit) "And an epsilon procedure ... as" added "in fenv" |
17:09:26 | * | beholders_eye quit (Ping timeout: 252 seconds) |
17:13:52 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=PXgtjMBd |
17:13:52 | FromDiscord | <odexine> https://www.cs.cmu.edu/~rbd/papers/cmj-float-to-int.html↵@System64 ~ Flandre Scarlet FYI Nim round is the same as C round, it’s direct import |
17:15:16 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "https://www.cs.cmu.edu/~rbd/papers/cmj-float-to-int": So maybe this function has an issue? |
17:15:40 | FromDiscord | <odexine> Probably round is not appropriate for your use case |
17:16:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Probably round is not": What should I use then? |
17:16:42 | FromDiscord | <System64 ~ Flandre Scarlet> ceil or floor? it's not ideal either |
17:17:21 | FromDiscord | <odexine> Reimplementation of round to do round to zero |
17:19:13 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Reimplementation of round to": Isn't that floor? |
17:19:31 | FromDiscord | <odexine> No |
17:20:11 | FromDiscord | <odexine> Floor is↵-0.5 -> -1↵0.5 -> 0 |
17:20:19 | FromDiscord | <odexine> You want these to be the same |
17:20:46 | FromDiscord | <odexine> Wait fuck lol |
17:21:17 | FromDiscord | <odexine> You want the range (-0.5, 0.5) to be the same value is more accurate |
17:21:24 | FromDiscord | <odexine> (edit) "You" => "“You" | "value" => "value”" |
17:21:28 | FromDiscord | <aintea> Well Nuh huh |
17:21:31 | FromDiscord | <aintea> Maths says- |
17:21:42 | FromDiscord | <odexine> I made a mistake lol |
17:22:08 | FromDiscord | <System64 ~ Flandre Scarlet> Usually the synthesis uses the -1, 1 range |
17:22:53 | FromDiscord | <odexine> Well what I mean is that you want the area around 0 to be balanced |
17:23:16 | FromDiscord | <System64 ~ Flandre Scarlet> Isn't that some kind of flush to zero? |
17:23:25 | FromDiscord | <odexine> What is flush to zero |
17:23:40 | FromDiscord | <odexine> Generally this is called rounding towards zero |
17:23:55 | FromDiscord | <System64 ~ Flandre Scarlet> if the number is very very close to zero, just set to zero |
17:25:44 | Amun-Ra | right, that's why you almost never should use == for float comparison |
17:26:10 | FromDiscord | <odexine> Wait no I need to think |
17:26:15 | FromDiscord | <odexine> In reply to @odexine "Well what I mean": I’m wrong here |
17:27:56 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=ULTLylhd |
17:28:10 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#pasty=RndjovGP |
17:28:15 | FromDiscord | <System64 ~ Flandre Scarlet> yes |
17:28:20 | FromDiscord | <System64 ~ Flandre Scarlet> float64 |
17:28:59 | FromDiscord | <System64 ~ Flandre Scarlet> well, some settings are float32, but shouldn't cause issues |
17:29:16 | * | coldfeet quit (Quit: Lost terminal) |
17:30:12 | FromDiscord | <odexine> In reply to @sys64 "Until THIS happens": and I assume the flickering is a 32 bit integer going from 1 to 0 or similar |
17:30:38 | FromDiscord | <System64 ~ Flandre Scarlet> yeah, because of those very small values |
17:31:20 | FromDiscord | <System64 ~ Flandre Scarlet> That kind of values https://media.discordapp.net/attachments/371759389889003532/1325516999077658675/image.png?ex=677c1367&is=677ac1e7&hm=bdbab339a1dd56242e83aef85799c87f1e43deaf85c187607052b4e0723f24bb& |
17:32:12 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#pasty=ijiEAvox |
17:32:37 | FromDiscord | <odexine> Change the 3rd parameter to 14 or so |
17:32:46 | FromDiscord | <odexine> (edit) "Change the 3rd parameter ... to" added "on the almost equal" |
17:34:37 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Change the 3rd parameter": wdym? I'm confused |
17:45:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Change the 3rd parameter": Oh just understood, there is 3 parameters!↵What is the third for? |
17:52:35 | FromDiscord | <System64 ~ Flandre Scarlet> Lol https://media.discordapp.net/attachments/371759389889003532/1325522346450354226/image.png?ex=677c1862&is=677ac6e2&hm=df5b2869f4bc4801592072aea7d41d4592c224f0d3a816c59bdb3bf27abeb419& |
18:37:26 | FromDiscord | <dedraiaken> sent a code paste, see https://play.nim-lang.org/#pasty=uRXdXvaj |
18:40:33 | FromDiscord | <jimb007> In reply to @lainlaylie "You should probably first": getIsoWeekAndYear() causes an error "undeclared identifier"↵Any ideas how to get this recognised?↵I have import std/[times] in my code |
18:46:09 | FromDiscord | <dedraiaken> sent a code paste, see https://play.nim-lang.org/#pasty=XFJdHENr |
18:46:12 | FromDiscord | <lainlaylie> Are you using a very old Nim? |
18:46:51 | FromDiscord | <lainlaylie> I had to go all the way back to 1.6 to reproduce the behavior you describe |
18:48:51 | FromDiscord | <dedraiaken> Yeah, looks like it was added in 2022. |
18:56:48 | FromDiscord | <saint._._.> In reply to @sys64 "Lol": wow |
18:56:53 | FromDiscord | <saint._._.> Looks awesome! |
19:00:12 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint._._. "Looks awesome!": Oh, thanks!↵The only issue is floating point precision |
19:02:13 | FromDiscord | <saint._._.> In reply to @sys64 "Oh, thanks! The only": Gotcha btw do u have the repo for this again? |
19:02:20 | FromDiscord | <saint._._.> I'd love to take a look and potentially contribute! |
19:03:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint._._. "I'd love to take": Oh thanks! Gotta put it online then↵Please wait a few minutes |
19:04:37 | FromDiscord | <saint._._.> Sure! |
19:10:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint._._. "Sure!": https://github.com/system64MC/Kurumi-XP |
19:29:20 | FromDiscord | <System64 ~ Flandre Scarlet> If you have trouble to build, maybe considering using Docker |
19:38:29 | * | junbug joined #nim |
19:41:09 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/mackron/miniaudio↵I'm thinking of using this for sound preview |
19:46:00 | FromDiscord | <saint._._.> In reply to @sys64 "https://github.com/system64MC/Kurumi-XP": Awesome thank you!! |
19:46:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint._._. "Awesome thank you!!": You're welcome!↵Don't hesitate to do suggestions too! |
19:46:33 | FromDiscord | <saint._._.> In reply to @sys64 "If you have trouble": Will definitely try docker haha keeps everything easier |
19:46:51 | FromDiscord | <System64 ~ Flandre Scarlet> Oh but you're in the Audio Programmer Discord too! |
19:47:59 | FromDiscord | <saint._._.> In reply to @sys64 "Oh but you're in": Yup! |
19:48:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @saint._._. "Yup!": Oh nice! I'm here too |
19:53:10 | * | junbug quit (Quit: junbug) |
20:15:11 | * | kotrcka joined #nim |
21:30:10 | * | beholders_eye joined #nim |
21:41:34 | * | kotrcka quit (Remote host closed the connection) |
21:51:02 | FromDiscord | <bostonboston> In reply to @sys64 "Lol": Is each output represented by an equation, or like a sequence of samples |
22:00:18 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see https://pasty.ee/KvJNeilm |
22:02:17 | FromDiscord | <michael.lenz.> That may be probably aliasing artifacts |
22:02:29 | FromDiscord | <michael.lenz.> Or harmonics |
22:02:50 | FromDiscord | <michael.lenz.> Or accumulated rounding errors |
22:04:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michael.lenz. "That may be probably": My case is so simple that I think it's a float thing |
22:04:44 | FromDiscord | <bostonboston> The answer to the badly worded question is it's a sequence of samples. ↵↵My thoughts being if you completely flipped the architecture of the app on its head and stored the equation representation from each module, or the operations to make the equation you'd eliminate the errors |
22:05:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @bostonboston "The answer to the": I think we can't do simpler than this↵If this is already errored, my synth is errored https://media.discordapp.net/attachments/371759389889003532/1325586050684551280/image.png?ex=677c53b6&is=677b0236&hm=544cb3f61efb9caca15cf1a0c30af3d5b55f481e1a5d696ee541db23f3d27091& |
22:05:58 | FromDiscord | <System64 ~ Flandre Scarlet> JS has the same issue↵C too↵Nim |
22:06:22 | FromDiscord | <michael.lenz.> You’re summing two signals? |
22:06:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michael.lenz. "You’re summing two signals?": yes↵sine + sine(x + PI)↵They should cancel each other |
22:07:25 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "yes↵sine" => "yes↵sine(x)" |
22:08:01 | FromDiscord | <michael.lenz.> Probably here happens these extra numbers you get |
22:08:30 | FromDiscord | <michael.lenz.> Pi is not finite, so it has precision limit |
22:08:56 | FromDiscord | <bostonboston> Worse than that, create a sin and cos type with like amplitude, phase, angular velocity fields and do math on those, then compute the output once |
22:09:54 | FromDiscord | <System64 ~ Flandre Scarlet> Even Desmos https://media.discordapp.net/attachments/371759389889003532/1325587102808805438/image.png?ex=677c54b1&is=677b0331&hm=5cb2c2759ca86205eccd5563189e7d5ef6d747110bbfeeef850a4a39141a41a9& |
22:12:00 | * | xet7 quit (Quit: Leaving) |
22:14:04 | FromDiscord | <System64 ~ Flandre Scarlet> Conclusion : Computers suck at math |
22:14:44 | FromDiscord | <michael.lenz.> Noo ))) that’s ok |
22:15:42 | FromDiscord | <michael.lenz.> Round the resulting number |
22:15:56 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=IEymJwAJ |
22:17:15 | FromDiscord | <Elegantbeef> Eh 1e-15 is practically 0 |
22:18:53 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @sys64 "That kind of values": This occurs and can lead to problems |
22:19:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @sys64 "Until THIS happens": To this for example |
22:22:26 | FromDiscord | <michael.lenz.> sent a code paste, see https://play.nim-lang.org/#pasty=AYmBotXb |
22:24:48 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michael.lenz. "This is not really": I should not round to the next integer value |
22:26:06 | FromDiscord | <michael.lenz.> https://nim-lang.org/docs/strutils.html#formatFloat%2Cfloat%2CFloatFormatMode%2Crange%5B%5D%2Cchar |
22:26:53 | FromDiscord | <System64 ~ Flandre Scarlet> It's for strings |
22:27:03 | FromDiscord | <michael.lenz.> But this maybe not the best proc for your code |
22:28:38 | FromDiscord | <michael.lenz.> And if we convert it back to the float, the resulting number may be not like .0 |
22:32:22 | FromDiscord | <Elegantbeef> What they're doing is mostly fine as it is just a hard stop for an epsilon |
22:32:24 | FromDiscord | <Elegantbeef> Though I imagine more ideally would be to make a low pass and a high pass filter node to set the floor |
22:33:54 | FromDiscord | <Elegantbeef> I might be wrong with the proper term |
22:36:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "What they're doing is": My flush to zero function? |
22:36:55 | FromDiscord | <michael.lenz.> In reply to @sys64 "It's for strings": https://play.nim-lang.org/#pasty=MtaDfNlQ |
22:38:03 | FromDiscord | <Elegantbeef> Lol you're kidding right? |
22:38:22 | FromDiscord | <System64 ~ Flandre Scarlet> The string method looks inefficient |
22:39:05 | FromDiscord | <Elegantbeef> Using string formatting to hard stop an epsilon has got to be a joke, right? |
22:39:44 | FromDiscord | <System64 ~ Flandre Scarlet> He looked serious |
22:40:20 | FromDiscord | <michael.lenz.> Well it works as we see it))) |
22:40:57 | FromDiscord | <michael.lenz.> Btw 100% cancellation is not possible in analog too |
22:41:10 | FromDiscord | <Elegantbeef> Sure it works but so does `if x < epsilon: x = 0` 😄 |
22:41:24 | FromDiscord | <Elegantbeef> Or if we really want to be fancy `x = x < epsilon.float32` |
22:41:53 | FromDiscord | <Elegantbeef> Whoops `>` |
22:42:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Or if we really": Ah yeah I can avoid branching by converting the bool to float, right? |
22:43:06 | FromDiscord | <Elegantbeef> No clue if it branches to convert a bool to a float |
22:43:07 | FromDiscord | <Elegantbeef> I imagine it might |
22:43:23 | FromDiscord | <michael.lenz.> I would use the “mute” proc. If I understand it correctly you hear the noise? |
22:46:24 | FromDiscord | <michael.lenz.> In reply to @Elegantbeef "Sure it works but": Actually this is a mute proc, only multiplication may be replaced with assignment, like x = 0.0 |
22:49:11 | FromDiscord | <System64 ~ Flandre Scarlet> 🤔 https://media.discordapp.net/attachments/371759389889003532/1325596989530046494/image.png?ex=677c5de6&is=677b0c66&hm=32fcad084831905a4ef1cbac73fec78a391489af63d93d34332e87b0da8dd88f& |
22:49:37 | FromDiscord | <michael.lenz.> Btw, Why you need to cancel one sine with -180 degrees sine? |
22:49:59 | FromDiscord | <Elegantbeef> You didn't `exportc, dynlib` the proc |
22:50:21 | FromDiscord | <Elegantbeef> They're trying to resolve the issue with floats in destructive interference |
22:52:23 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/1325597794748334090/image.png?ex=677c5ea6&is=677b0d26&hm=5eb49a955cf7504143c09c957f2cfdeed52d36ff9fa2b9c6b91c18ad54fe053c& |
22:52:35 | FromDiscord | <michael.lenz.> Hmm, but this will not result the absolute silence. In real world with analog gear is the same |
22:52:42 | FromDiscord | <System64 ~ Flandre Scarlet> ja is branching I guess? |
22:56:42 | * | anddam quit (Quit: WeeChat 4.1.1) |
22:56:43 | FromDiscord | <michael.lenz.> Muting specific frequency also could be done with notch filter |
23:00:25 | FromDiscord | <System64 ~ Flandre Scarlet> I added flushing to zero. It's simpler and the performances impact shouldn't be big |
23:11:58 | FromDiscord | <michael.lenz.> In reply to @sys64 "I added flushing to": So, it works as expected? |
23:14:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michael.lenz. "So, it works as": Yeah |
23:25:00 | * | beholders_eye quit (Ping timeout: 260 seconds) |