| 00:06:03 | FromDiscord | <dom96> hah, yeah, the publisher is the winner here ๐ |
| 00:06:56 | FromDiscord | <dom96> but really, it's also about making the publisher aware that there is demand which makes Nim more successful. |
| 00:09:08 | FromDiscord | <nikki> yeah a big reason i got it was to be supportive toward nim |
| 00:10:29 | FromDiscord | <nikki> anyone familiar with how to cast a closure to a void pointer so that you can retrieve it and call it from a classic C func ptr + void context? |
| 00:10:54 | FromDiscord | <nikki> ah need to maybe use `ptr` to the proc |
| 00:12:58 | FromDiscord | <nikki> think i got it |
| 00:27:36 | ForumUpdaterBot | New thread by Mrhdias: This brings down the forum!, see https://forum.nim-lang.org/t/7079 |
| 00:30:47 | FromDiscord | <exelotl> spicy |
| 00:45:53 | FromDiscord | <exelotl> someone should try it on youtube |
| 00:48:28 | * | Tanger quit (Quit: Leaving) |
| 01:04:23 | * | xet7 quit (Ping timeout: 272 seconds) |
| 01:04:51 | jonjitsu[m] | How would I make combiner work here: https://play.nim-lang.org/#ix=2DQE |
| 01:06:40 | * | bunbunbu1bunny joined #nim |
| 01:07:45 | FromDiscord | <shadow.> hmm |
| 01:07:50 | FromDiscord | <shadow.> im making a library to deal with wave files |
| 01:07:50 | * | bunbunbu1bunny quit (Read error: Connection reset by peer) |
| 01:07:57 | FromDiscord | <shadow.> but for some reason when im applying gain to the samples |
| 01:08:00 | FromDiscord | <shadow.> the audio goes tinny asf |
| 01:08:05 | FromDiscord | <shadow.> didnt do that in c++ im a bit confused lmao |
| 01:08:20 | FromDiscord | <shadow.> pretty sure samples are stored as 16 bits but im just using float64's for- some reason |
| 01:08:40 | FromDiscord | <shadow.> if i apply no gain and rewrite its equal to the previous audio |
| 01:08:42 | FromDiscord | <shadow.> but with gain it flips out |
| 01:08:42 | * | xet7 joined #nim |
| 01:08:52 | Axiomatic | The most important question is: what can Nim do to make sure YouTube outages never happen like this again? |
| 01:08:53 | * | bunbunbunbunny quit (Ping timeout: 260 seconds) |
| 01:09:33 | jonjitsu[m] | use odysee.com |
| 01:11:04 | FromDiscord | <ElegantBeef> the hell is this jonjitsu |
| 01:13:38 | FromDiscord | <shadow.> sir beef |
| 01:13:41 | FromDiscord | <shadow.> hello |
| 01:13:46 | FromDiscord | <ElegantBeef> Hello |
| 01:13:52 | FromDiscord | <shadow.> any ideas on my wave file predicament lol |
| 01:14:11 | FromDiscord | <ElegantBeef> use float 16 and have it work better |
| 01:14:17 | Axiomatic | LBRY I do like using |
| 01:14:24 | FromDiscord | <shadow.> i was going to do that but i did not think float 16 existed |
| 01:14:44 | FromDiscord | <shadow.> how do i get a float16 lmfao |
| 01:15:28 | jonjitsu[m] | ElegantBeef, a youtube alternative that's opensource using the same underlying tech as lbry.tv/lbry.com |
| 01:15:42 | FromDiscord | <ElegantBeef> I mean your code |
| 01:15:49 | FromDiscord | <shadow.> hm? |
| 01:16:14 | FromDiscord | <shadow.> i dont see a float16 type-- |
| 01:16:16 | FromDiscord | <shadow.> correct me if im wrong |
| 01:16:21 | FromDiscord | <ElegantBeef> Why not just have an sequence of your procs the iterate over them |
| 01:16:31 | FromDiscord | <ElegantBeef> Yes it's not apart of native nim, but you can implement it |
| 01:16:36 | FromDiscord | <ElegantBeef> Or possibly find implementations |
| 01:16:40 | FromDiscord | <shadow.> as a array[2, byte] lol? |
| 01:16:43 | FromDiscord | <shadow.> (edit) "a" => "an" |
| 01:17:09 | FromDiscord | <shadow.> im just confused bc double works fine in other languages lol |
| 01:17:36 | FromDiscord | <ElegantBeef> Well if doubles work fine in other langauges it'd work here |
| 01:17:48 | FromDiscord | <shadow.> yeah |
| 01:17:56 | * | bunbunbunbunny joined #nim |
| 01:17:59 | FromDiscord | <ElegantBeef> Wouldnt you need to make the sampleRate 4 as fast for 64 bit floats |
| 01:18:06 | FromDiscord | <shadow.> well im converting them on write |
| 01:18:07 | FromDiscord | <shadow.> lol |
| 01:18:20 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DQI |
| 01:18:20 | FromDiscord | <shadow.> idk if this is lossy |
| 01:18:23 | FromDiscord | <ElegantBeef> Well that's dumb |
| 01:18:26 | FromDiscord | <shadow.> probably yes |
| 01:18:32 | FromDiscord | <ElegantBeef> buffer being a float64? |
| 01:18:36 | FromDiscord | <shadow.> yes |
| 01:18:40 | FromDiscord | <ElegantBeef> well yes there is your problem |
| 01:18:43 | FromDiscord | <shadow.> hmm |
| 01:18:47 | FromDiscord | <shadow.> sounds about right lol |
| 01:18:47 | FromDiscord | <ElegantBeef> Casting is just taking the first 2 bytes and pasting them in |
| 01:18:51 | FromDiscord | <shadow.> OH |
| 01:18:54 | FromDiscord | <shadow.> it doesnt shift? |
| 01:18:56 | FromDiscord | <shadow.> ASHDASOJDOASJD |
| 01:19:03 | FromDiscord | <ElegantBeef> Why would it shift, it's a float |
| 01:19:08 | FromDiscord | <shadow.> ah yes |
| 01:19:08 | FromDiscord | <shadow.> true |
| 01:19:27 | FromDiscord | <shadow.> hmm |
| 01:19:39 | FromDiscord | <shadow.> time to learn how to chop off float precision because i dont understand floats |
| 01:19:41 | FromDiscord | <shadow.> :BigBrain: |
| 01:21:01 | FromDiscord | <shadow.> oh i would just round it correct |
| 01:21:21 | FromDiscord | <ElegantBeef> No... |
| 01:21:36 | FromDiscord | <shadow.> ๐ช๐โโ๏ธ |
| 01:21:38 | FromDiscord | <shadow.> time to go learn floats |
| 01:21:38 | FromDiscord | <ElegantBeef> You need to convert it to a 16bit float, which means seperating the exponent, the sigdigs and sign |
| 01:21:54 | FromDiscord | <ElegantBeef> They have proper terms but i dont recall them |
| 01:22:01 | FromDiscord | <shadow.> so i can reduce to a 16 bit float and then to write im assuming i can then cast to a 2 byte array bc i wont lose any bytes |
| 01:22:02 | FromDiscord | <shadow.> ? |
| 01:22:07 | FromDiscord | <shadow.> or am i still being dumdum |
| 01:22:18 | FromDiscord | <ElegantBeef> Casting doesnt do anything but reinterpret the data as a different type |
| 01:22:22 | FromDiscord | <shadow.> smart |
| 01:22:24 | FromDiscord | <shadow.> lol |
| 01:22:53 | FromDiscord | <ElegantBeef> you can make a `toFloat16(f: float64): float16` which converts from float64 to 16 |
| 01:23:09 | FromDiscord | <shadow.> which would include implementing a float16 type lol? |
| 01:23:11 | FromDiscord | <ElegantBeef> @Rika made a float16 recently so there |
| 01:23:15 | FromDiscord | <shadow.> oh dang |
| 01:23:17 | FromDiscord | <shadow.> ty |
| 01:23:47 | FromDiscord | <ElegantBeef> The issue is this though https://media.discordapp.net/attachments/371759389889003532/776255888389570620/1920px-IEEE_754_Double_Floating_Point_Format.png |
| 01:23:51 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/776255904920109066/1920px-IEEE_754r_Half_Floating_Point_Format.png |
| 01:24:03 | FromDiscord | <ElegantBeef> You're getting the first 16 bits of the float 64 |
| 01:24:10 | FromDiscord | <shadow.> yeah i see why thats bad lmfao |
| 01:24:41 | FromDiscord | <Rika> I donโt have the code right now lol |
| 01:24:45 | FromDiscord | <shadow.> f |
| 01:24:47 | FromDiscord | <ElegantBeef> tsk tsk |
| 01:24:56 | FromDiscord | <Rika> I didnโt upload it either because itโs kinda useless other than conversions |
| 01:25:00 | FromDiscord | <shadow.> f |
| 01:25:08 | FromDiscord | <ElegantBeef> Which is sorta just what they need ๐ |
| 01:25:14 | FromDiscord | <Rika> Bruh |
| 01:25:16 | FromDiscord | <shadow.> rip me |
| 01:25:22 | * | Tanger joined #nim |
| 01:25:25 | FromDiscord | <shadow.> ima just do some research on reducing a float64 to 2 bytes ig lol |
| 01:25:28 | FromDiscord | <shadow.> i dont rly need a type |
| 01:25:48 | FromDiscord | <ElegantBeef> I know how to get the sign ๐ |
| 01:25:59 | FromDiscord | <shadow.> wh? |
| 01:26:29 | FromDiscord | <ElegantBeef> it's just the first bit so it's just `0xa or castedInt64` |
| 01:26:35 | FromDiscord | <ElegantBeef> i mean and |
| 01:26:40 | FromDiscord | <ElegantBeef> I fuck up the bit ops too much |
| 01:26:49 | FromDiscord | <shadow.> smart |
| 01:26:59 | FromDiscord | <shadow.> first bit is just pos or neg basically lol? |
| 01:27:05 | FromDiscord | <shadow.> fair enoguh |
| 01:27:22 | FromDiscord | <shadow.> you can cast from float64 to float32 in nim right? |
| 01:27:26 | FromDiscord | <shadow.> wish there was a builtin float16 lol |
| 01:27:30 | FromDiscord | <shadow.> would be perfect for audio |
| 01:27:33 | FromDiscord | <ElegantBeef> Well go make it |
| 01:27:36 | FromDiscord | <ElegantBeef> I believe in you |
| 01:28:05 | FromDiscord | <shadow.> i would believe in me too if i understood how floats worked lmfao but ive really only dabbled with ints |
| 01:28:09 | FromDiscord | <shadow.> time to go look stuff up |
| 01:28:29 | FromDiscord | <shadow.> oh wait i suppose i could look inside of the old c++ audiofile lib i used |
| 01:29:24 | FromDiscord | <ElegantBeef> https://github.com/gwbpt/float16 |
| 01:29:26 | FromDiscord | <ElegantBeef> There is that |
| 01:30:49 | FromDiscord | <shadow.> lol genius me looking in the c++ program |
| 01:30:56 | FromDiscord | <shadow.> `sample = clamp (sample, -1., 1.);` |
| 01:30:59 | FromDiscord | <shadow.> so helpful :D |
| 01:31:12 | FromDiscord | <shadow.> actually wait would that work LMAO |
| 01:32:32 | FromDiscord | <shadow.> oo lemme check out that package ty |
| 01:33:41 | FromDiscord | <Rika> Oh someone else made one already nice |
| 01:33:58 | FromDiscord | <Rika> Ah it was two months ago no wonder I didnโt use that |
| 01:34:11 | FromDiscord | <Rika> Needed mine like half a year ago or something |
| 01:34:43 | FromDiscord | <ElegantBeef> I feel like i need to add operators to it |
| 01:35:22 | FromDiscord | <shadow.> welp thats simple enough |
| 01:35:27 | FromDiscord | <shadow.> float16(float64) |
| 01:35:37 | FromDiscord | <shadow.> but now i needa figure out how to get the bytes out bc that did not work |
| 01:35:45 | FromDiscord | <ElegantBeef> uhh |
| 01:35:49 | FromDiscord | <ElegantBeef> it's a uint16 |
| 01:35:57 | FromDiscord | <ElegantBeef> so just write that |
| 01:36:10 | FromDiscord | <shadow.> ah fair |
| 01:36:26 | FromDiscord | <ElegantBeef> Although even if you were casting it'd be fine |
| 01:36:32 | FromDiscord | <shadow.> silence |
| 01:36:36 | FromDiscord | <shadow.> wonderful audio |
| 01:36:38 | FromDiscord | <shadow.> lol |
| 01:36:43 | FromDiscord | <shadow.> OH |
| 01:36:43 | FromDiscord | <shadow.> OH WAIT |
| 01:36:46 | FromDiscord | <shadow.> I THINK IM DOING A PEPEGA |
| 01:36:54 | FromDiscord | <shadow.> yes im being a pepega |
| 01:36:57 | FromDiscord | <ElegantBeef> I really wish english wasnt spoken so dumbly |
| 01:37:00 | FromDiscord | <shadow.> (edit) "PEPEGA" => "BAD DECISION" |
| 01:37:02 | FromDiscord | <shadow.> shut |
| 01:37:09 | FromDiscord | <ElegantBeef> the up fuck |
| 01:37:14 | FromDiscord | <shadow.> (edit) "I THINK IM DOING A BAD DECISION" => "i think im writing code in an inefficient manner" |
| 01:37:19 | FromDiscord | <shadow.> (edit) "im" => "i am" | "a pepega" => "of low intellect" |
| 01:37:21 | FromDiscord | <shadow.> happy? |
| 01:37:32 | FromDiscord | <ElegantBeef> Nah cause you just spammed irc with edits |
| 01:37:38 | FromDiscord | <shadow.> damn i forgot abt that |
| 01:37:40 | FromDiscord | <shadow.> whoopsies |
| 01:38:09 | FromDiscord | <shadow.> ok no its not me still silence whew |
| 01:38:40 | FromDiscord | <shadow.> hmm |
| 01:38:42 | ForumUpdaterBot | New post on r/nim by DankPessimist: Nim is featured on the Ubuntu Wiki for WSL!, see https://www.reddit.com/r/nim/comments/jslgap/nim_is_featured_on_the_ubuntu_wiki_for_wsl/ |
| 01:40:09 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/776260009419341844/unknown.png |
| 01:40:16 | FromDiscord | <shadow.> im going to assume theres an issue with the library or im misunderstanding it |
| 01:40:20 | FromDiscord | <shadow.> as those are the conversions it is doing |
| 01:42:19 | FromDiscord | <nikki> yeah if you're getting 0 for every other thing, there's probably a size mismatch |
| 01:42:22 | * | rockcavera quit (Remote host closed the connection) |
| 01:42:26 | FromDiscord | <nikki> eg. 32 vs 64 or 16 vs 32 |
| 01:42:54 | FromDiscord | <shadow.> hm |
| 01:42:57 | FromDiscord | <ElegantBeef> yea it's clearly not working propery it returns 15872 for `1.5` |
| 01:42:58 | FromDiscord | <Rika> Itโs probably too small to store in float16 |
| 01:43:12 | FromDiscord | <Rika> Lol |
| 01:43:18 | FromDiscord | <shadow.> i wonder what'll happen if i just keep it all in float16 one sec |
| 01:43:19 | FromDiscord | <nikki> do you need float16 cuz a lib takes float16? |
| 01:43:20 | FromDiscord | <Rika> So youโre telling me my library still wins |
| 01:43:28 | FromDiscord | <nikki> or are you just tryna use float16 yourself |
| 01:43:31 | FromDiscord | <ElegantBeef> Your imaginary non existant library ๐ |
| 01:43:33 | FromDiscord | <shadow.> well samples are stored as 16 bits |
| 01:43:37 | FromDiscord | <shadow.> and i need to write as 16 bits |
| 01:43:37 | FromDiscord | <Rika> Hey itโs not nonexistent |
| 01:43:44 | FromDiscord | <Rika> Itโs just that I donโt have it |
| 01:43:44 | FromDiscord | <shadow.> so i need a way to convert a float to 16 bits lmao |
| 01:43:49 | FromDiscord | <Rika> Itโs on my desktop |
| 01:43:54 | FromDiscord | <shadow.> so float16 seems the best way @nikki |
| 01:44:13 | FromDiscord | <nikki> what's the thing that is taking the float16s and what does it say about their format |
| 01:44:14 | FromDiscord | <ElegantBeef> Seems they just snag 5 bits of the extension and the first bits of the mantisa |
| 01:44:34 | FromDiscord | <ElegantBeef> that doesnt feel correct to me though |
| 01:44:53 | FromDiscord | <ElegantBeef> By extension i mean exponent but was not thinking |
| 01:45:02 | * | bunbunbunbunny quit (Quit: Lost terminal) |
| 01:45:25 | FromDiscord | <shadow.> @nikki wdym |
| 01:45:40 | FromDiscord | <nikki> "samples are stored as 16 bits" who is imposing this restriction? |
| 01:45:46 | FromDiscord | <nikki> some library you're sending the samples to or? |
| 01:45:49 | FromDiscord | <nikki> oh or is it like a file format |
| 01:45:49 | FromDiscord | <shadow.> FUCK ME |
| 01:45:53 | FromDiscord | <shadow.> I USED ALL FLOAT 16'S |
| 01:45:54 | FromDiscord | <shadow.> and static |
| 01:45:56 | FromDiscord | <shadow.> my ears just died |
| 01:45:57 | FromDiscord | <shadow.> fml |
| 01:46:12 | FromDiscord | <shadow.> i probably shouldnt be testing random audio programming on full volume |
| 01:46:18 | FromDiscord | <nikki> https://github.com/x448/float16/blob/e05feda6110a1a856d5e652ddadf51b54b7c9e0a/float16.go#L255 |
| 01:46:19 | FromDiscord | <ElegantBeef> This kids is why you use speakers or set the volume really low when doing audio programming |
| 01:46:21 | FromDiscord | <nikki> just impl this logic? |
| 01:46:32 | FromDiscord | <shadow.> @nikki in the wave file format |
| 01:46:36 | FromDiscord | <shadow.> the typical bits per sample is 16 |
| 01:46:46 | FromDiscord | <shadow.> im reading from a file where each sample is 16 bits |
| 01:46:51 | FromDiscord | <shadow.> so ig it makes sense to write as 16 bits too? |
| 01:47:14 | FromDiscord | <nikki> when you read what type are you reading samples to |
| 01:47:53 | FromDiscord | <ElegantBeef> Comically nikki i think that's the impl this library uses |
| 01:48:01 | FromDiscord | <ElegantBeef> but i guess they fucked the bit ops somewhere |
| 01:48:24 | FromDiscord | <shadow.> alr lemme try this lol |
| 01:48:31 | FromDiscord | <shadow.> wait a minute |
| 01:48:38 | FromDiscord | <shadow.> i think i might be being dumb one sec |
| 01:49:38 | FromDiscord | <shadow.> nvm |
| 01:49:52 | FromDiscord | <shadow.> lemme try that function |
| 01:51:48 | FromDiscord | <nikki> the go one? just make sure that when you cast to uint32 and so on you're doing a bit reinterpretation, and that you're not actually rounding the number to the nearest integer |
| 01:52:01 | FromDiscord | <shadow.> ye ofc |
| 01:53:25 | FromDiscord | <shadow.> time to convert |
| 01:53:32 | * | Jesin quit (Quit: Leaving) |
| 01:54:01 | * | Jesin joined #nim |
| 01:55:21 | FromDiscord | <shadow.> i think i did it? |
| 01:56:31 | FromDiscord | <shadow.> fuck they used tabs |
| 01:56:46 | FromDiscord | <ElegantBeef> Did you just copy pasta it and replace the `:=`? |
| 01:56:51 | FromDiscord | <shadow.> no |
| 01:56:55 | FromDiscord | <shadow.> well |
| 01:56:57 | FromDiscord | <shadow.> i replaced all operators |
| 01:56:58 | FromDiscord | <shadow.> and braces |
| 01:57:00 | FromDiscord | <ElegantBeef> ah |
| 01:57:03 | FromDiscord | <shadow.> and used var blocks |
| 01:57:09 | FromDiscord | <shadow.> lol ik go too so its not that much of an issue |
| 01:57:38 | FromDiscord | <shadow.> this is hell i have to respace every line LOL |
| 01:57:43 | FromDiscord | <nikki> `%s/\t/ /g` |
| 01:58:12 | FromDiscord | <shadow.> smart |
| 01:59:42 | FromDiscord | <shadow.> lol |
| 01:59:44 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DQN |
| 02:00:14 | FromDiscord | <ElegantBeef> wait... string multiplication works |
| 02:00:32 | FromDiscord | <ElegantBeef> Whew you scared me |
| 02:00:43 | FromDiscord | <shadow.> wdym |
| 02:00:47 | FromDiscord | <shadow.> in python it does |
| 02:00:50 | FromDiscord | <shadow.> ye |
| 02:00:55 | FromDiscord | <ElegantBeef> I thought that was nim |
| 02:00:59 | FromDiscord | <shadow.> LOL NAHG |
| 02:01:00 | FromDiscord | <shadow.> (edit) "NAHG" => "NAH" |
| 02:01:08 | FromDiscord | <shadow.> cant u use like cycle() for that |
| 02:01:09 | FromDiscord | <shadow.> i forget |
| 02:01:19 | FromDiscord | <ElegantBeef> I briefly looked at it seen the replace `" " 4` and was scared |
| 02:01:23 | FromDiscord | <ElegantBeef> I mean we have `repeat` |
| 02:02:20 | FromDiscord | <nikki> replace all identifiers with operators and you get APL |
| 02:02:24 | FromDiscord | <shadow.> lol |
| 02:02:36 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/776265655925342248/unknown.png |
| 02:02:37 | FromDiscord | <shadow.> fuck |
| 02:02:39 | FromDiscord | <shadow.> more work lool |
| 02:03:18 | FromDiscord | <nikki> could help if we can see the code ;o |
| 02:03:25 | FromDiscord | <nikki> `0'uint32` maybe |
| 02:03:27 | FromDiscord | <shadow.> nah its just bc there's differing types |
| 02:03:28 | FromDiscord | <shadow.> ye |
| 02:03:30 | FromDiscord | <shadow.> i just have to convert them |
| 02:03:38 | FromDiscord | <shadow.> just means more typing lol |
| 02:03:40 | FromDiscord | <nikki> `0'uint32` has no conversion, it's just a literal |
| 02:03:46 | FromDiscord | <shadow.> cant you just do 0u32 |
| 02:03:56 | FromDiscord | <nikki> !eval echo 0u32 |
| 02:03:59 | NimBot | 0 |
| 02:04:04 | FromDiscord | <nikki> ๐ฎ |
| 02:04:06 | FromDiscord | <shadow.> :o |
| 02:04:08 | FromDiscord | <shadow.> lol |
| 02:04:15 | FromDiscord | <shadow.> !eval echo 10i32 |
| 02:04:18 | NimBot | 10 |
| 02:04:21 | FromDiscord | <shadow.> ye |
| 02:06:28 | FromDiscord | <ElegantBeef> !eval echo 0xffu32 |
| 02:06:31 | NimBot | 255 |
| 02:06:59 | FromDiscord | <ElegantBeef> We talked about this yesterday comically around the same topic of float16 |
| 02:07:08 | FromDiscord | <nikki> !eval echo 0f7u12 |
| 02:07:10 | NimBot | Compile failed: /usercode/in.nim(1, 7) Error: invalid number: '0f7u12' |
| 02:07:17 | FromDiscord | <nikki> fffffffuuuuuuuuuuuu |
| 02:07:28 | FromDiscord | <shadow.> f |
| 02:07:39 | FromDiscord | <ElegantBeef> !eval echo 0xff'f32 |
| 02:07:41 | NimBot | 3.573311084028284e-43 |
| 02:07:49 | FromDiscord | <shadow.> !eval echo 0x00'f16 |
| 02:07:50 | FromDiscord | <shadow.> LOL |
| 02:07:51 | NimBot | Compile failed: /usercode/in.nim(1, 10) Error: invalid number: '0x00'f16' |
| 02:07:54 | FromDiscord | <shadow.> f |
| 02:08:00 | FromDiscord | <shadow.> hmm |
| 02:08:06 | FromDiscord | <nikki> f16 isn't a thing right |
| 02:08:08 | FromDiscord | <shadow.> yes |
| 02:08:10 | FromDiscord | <shadow.> it is not |
| 02:08:10 | FromDiscord | <shadow.> a thing |
| 02:08:21 | FromDiscord | <shadow.> im going to assume clamp isnt a thing in nim |
| 02:08:26 | FromDiscord | <shadow.> or there isnt a lib with it |
| 02:08:29 | FromDiscord | <shadow.> bc thats how they did it in c++ |
| 02:08:36 | FromDiscord | <shadow.> but standard clamp would just- cut it off |
| 02:08:37 | FromDiscord | <shadow.> so idk how |
| 02:08:38 | FromDiscord | <nikki> clam is p simple tho |
| 02:08:41 | FromDiscord | <shadow.> ye ik |
| 02:08:42 | FromDiscord | <ElegantBeef> clamp is in nim |
| 02:08:45 | FromDiscord | <shadow.> so it musta been something dif |
| 02:08:47 | FromDiscord | <ElegantBeef> Just not in the system library |
| 02:08:50 | FromDiscord | <shadow.> bc they couldnt have just clamped at -1 1 |
| 02:08:57 | FromDiscord | <shadow.> that would just cut off the samples, right? |
| 02:08:58 | FromDiscord | <nikki> max(low, min(val, high)) |
| 02:09:01 | FromDiscord | <Rika> clam |
| 02:09:03 | FromDiscord | <ElegantBeef> Oh actually it is |
| 02:09:22 | FromDiscord | <nikki> u could check the system lib docs instead of assuming @shadow. ;o |
| 02:09:38 | FromDiscord | <nikki> main thing tho is whether it's present for the type in question |
| 02:09:41 | FromDiscord | <nikki> and yeah it just cuts off |
| 02:09:41 | FromDiscord | <shadow.> ye |
| 02:09:45 | FromDiscord | <ElegantBeef> I was thinking of ceil/floor not being in the system library |
| 02:09:45 | FromDiscord | <shadow.> hmm |
| 02:10:09 | FromDiscord | <shadow.> lemme see if i can find any other libraries |
| 02:10:20 | FromDiscord | <shadow.> for float16 |
| 02:10:23 | FromDiscord | <ElegantBeef> Just reimplement the go code |
| 02:10:30 | FromDiscord | <shadow.> i did |
| 02:10:34 | FromDiscord | <shadow.> error |
| 02:10:35 | FromDiscord | <shadow.> one sec |
| 02:10:39 | FromDiscord | <shadow.> lemme go get it |
| 02:10:44 | FromDiscord | <nikki> if you're reading the file into float16s |
| 02:10:48 | FromDiscord | <nikki> what are you using the repr the float16 |
| 02:10:54 | FromDiscord | <shadow.> im reading it into float64's |
| 02:10:58 | FromDiscord | <shadow.> even tho its stored as float16 lol |
| 02:10:59 | FromDiscord | <ElegantBeef> Why.. |
| 02:11:01 | FromDiscord | <shadow.> idk |
| 02:11:02 | FromDiscord | <shadow.> dont ask |
| 02:11:05 | FromDiscord | <ElegantBeef> That's not going to work |
| 02:11:14 | FromDiscord | <nikki> it depends on whether you want your stuff to work haha |
| 02:11:19 | FromDiscord | <shadow.> wait - |
| 02:11:39 | FromDiscord | <shadow.> am i small braining rn |
| 02:11:46 | FromDiscord | <nikki> there's a certain bit repr of float16. you need sth that looks at the file data and is able to parse the number that way |
| 02:11:56 | FromDiscord | <nikki> nothing in nim does that out of the box afaict |
| 02:12:05 | FromDiscord | <ElegantBeef> well that's what that nim library was supposed to do nikki, but apparently it's borked |
| 02:12:21 | FromDiscord | <nikki> ah word. sry what was the nim lib? (link) |
| 02:12:23 | FromDiscord | <nikki> i could also just scroll |
| 02:12:29 | FromDiscord | <ElegantBeef> cause 1.5 is certainly not 15847 |
| 02:12:38 | FromDiscord | <ElegantBeef> https://github.com/gwbpt/float16 |
| 02:12:50 | FromDiscord | <ElegantBeef> I forked it as i was going to add operators, but yea shit dont work |
| 02:13:33 | FromDiscord | <nikki> @shadow. we can probably help you debug better if we can actually see the code |
| 02:13:49 | FromDiscord | <nikki> full codepath from reading file to echoing the floats |
| 02:14:00 | FromDiscord | <shadow.> alr sure |
| 02:14:09 | FromDiscord | <Rika> one day ill post my library and prove that it exists... |
| 02:14:10 | FromDiscord | <shadow.> lemme go put it on hastebin |
| 02:14:15 | FromDiscord | <Rika> for now im stuck in a hotel XD |
| 02:14:37 | FromDiscord | <nikki> not if i post it first >:D |
| 02:14:50 | FromDiscord | <nikki> jk i don't have ur lib |
| 02:14:52 | FromDiscord | <nikki> :/ |
| 02:15:16 | FromDiscord | <shadow.> one sec brave is stalling |
| 02:15:25 | FromDiscord | <shadow.> https://hastebin.com/puxuzuzimu.kotlin |
| 02:15:29 | * | abm quit (Read error: Connection reset by peer) |
| 02:15:36 | FromDiscord | <nikki> kotlin lmao |
| 02:15:50 | FromDiscord | <shadow.> loool |
| 02:16:00 | FromDiscord | <shadow.> so line 51 is the todo |
| 02:16:16 | FromDiscord | <nikki> `.add(cast[float64](buffer))` |
| 02:16:18 | FromDiscord | <Rika> "imagine using brave as a browser" |
| 02:16:23 | FromDiscord | <nikki> um yeah so that doesn't interpret them as float16 |
| 02:16:33 | FromDiscord | <shadow.> which part |
| 02:16:40 | FromDiscord | <shadow.> line |
| 02:16:53 | FromDiscord | <shadow.> no thats reading |
| 02:17:02 | FromDiscord | <nikki> also why're you tryna do 0.uint32 |
| 02:17:08 | FromDiscord | <nikki> yeah like it has to be read as float16 right |
| 02:17:11 | FromDiscord | <shadow.> no |
| 02:17:14 | FromDiscord | <shadow.> i can read as a float 64 |
| 02:17:19 | FromDiscord | <shadow.> i just need a way to write that float 64 back |
| 02:17:23 | FromDiscord | <nikki> no what i mean is is the file in float16 format |
| 02:17:24 | FromDiscord | <nikki> that you're reading |
| 02:17:33 | FromDiscord | <shadow.> well im reading as array[2, byte] |
| 02:17:44 | FromDiscord | <nikki> what is the format of the file |
| 02:17:47 | FromDiscord | <shadow.> wave |
| 02:17:48 | FromDiscord | <shadow.> (edit) "wave" => "wav" |
| 02:17:48 | FromDiscord | <nikki> the file is not an array[2, byte] |
| 02:17:52 | FromDiscord | <shadow.> lmfao well |
| 02:17:57 | FromDiscord | <nikki> ok is it 16 bit floats in the file |
| 02:18:05 | FromDiscord | <shadow.> here one sec |
| 02:18:08 | FromDiscord | <shadow.> http://soundfile.sapp.org/doc/WaveFormat/ |
| 02:18:10 | FromDiscord | <Rika> wav isnt necessarily not float16s |
| 02:18:18 | FromDiscord | <shadow.> yeah im reading 16 bit per sample waves |
| 02:18:26 | FromDiscord | <Rika> but those are prolly int16s |
| 02:18:32 | FromDiscord | <nikki> ah ok "bits per sample" |
| 02:18:33 | FromDiscord | <Gyllou> can anyone give me hand with an error I'm getting |
| 02:18:38 | * | apahl quit (Ping timeout: 264 seconds) |
| 02:18:47 | FromDiscord | <Rika> do you know what kind of samples they are if theyre floats or ints |
| 02:18:57 | FromDiscord | <nikki> ok @shadow. you need to read in a uint16 |
| 02:19:02 | FromDiscord | <Rika> because usually theyre ints |
| 02:19:04 | FromDiscord | <nikki> and then use that nim lib, to convert that to a float |
| 02:19:10 | FromDiscord | <shadow.> @nikki read as a uint16? |
| 02:19:11 | FromDiscord | <shadow.> ok |
| 02:19:15 | FromDiscord | <shadow.> lemme try that |
| 02:19:18 | FromDiscord | <nikki> yeah just so that you work with 16 bits at a time |
| 02:19:19 | FromDiscord | <Rika> tfw not being listened to |
| 02:19:19 | FromDiscord | <Rika> smh |
| 02:19:23 | FromDiscord | <nikki> sry @Rika |
| 02:19:37 | FromDiscord | <nikki> i think they were implying that they know it's float16 in the file |
| 02:19:45 | FromDiscord | <nikki> @ElegantBeef i'm not sure the issue is in the float16 nim lib |
| 02:19:53 | FromDiscord | <shadow.> sorry rika |
| 02:19:54 | FromDiscord | <shadow.> well |
| 02:19:57 | FromDiscord | <shadow.> i believe they are floats |
| 02:19:58 | FromDiscord | <Rika> i would like to confirm that |
| 02:20:09 | FromDiscord | <ElegantBeef> Oh they dont override stringification |
| 02:20:12 | FromDiscord | <nikki> yeah we should confirm thta they are float16 |
| 02:20:14 | FromDiscord | <ElegantBeef> God damn it |
| 02:20:16 | FromDiscord | <shadow.> when you write to a wave file you have to use sin functions |
| 02:20:20 | FromDiscord | <shadow.> and those commonly return floats |
| 02:20:22 | FromDiscord | <shadow.> lmao |
| 02:20:26 | FromDiscord | <shadow.> just because of how digital sound works yk |
| 02:20:26 | * | apahl joined #nim |
| 02:20:30 | FromDiscord | <nikki> none of this confirms the format of the file |
| 02:20:34 | FromDiscord | <shadow.> wdym |
| 02:20:48 | FromDiscord | <shadow.> plop it in a hex editor if you'd like lmao https://media.discordapp.net/attachments/371759389889003532/776270237103292476/music.wav |
| 02:20:48 | FromDiscord | <nikki> the question was: are you sure this file contains float16 samples ๐
|
| 02:20:49 | FromDiscord | <Rika> not all wavs have the same codec |
| 02:20:52 | FromDiscord | <shadow.> yes |
| 02:20:53 | FromDiscord | <shadow.> i made the file |
| 02:20:55 | FromDiscord | <nikki> kk |
| 02:20:59 | FromDiscord | <Rika> okay |
| 02:21:03 | FromDiscord | <shadow.> i made it with a c++ synth lol |
| 02:21:03 | FromDiscord | <nikki> https://github.com/gwbpt/float16/blob/master/float16.nim you can use this thing after reading into uint16 |
| 02:21:08 | FromDiscord | <shadow.> isnt that the one that |
| 02:21:10 | FromDiscord | <shadow.> was bugging out |
| 02:21:23 | FromDiscord | <shadow.> @ElegantBeef |
| 02:21:24 | FromDiscord | <nikki> well, until we're sure we're reading properly we don't know if the bug was in the lib or in teh reading |
| 02:21:24 | FromDiscord | <nikki> or both |
| 02:21:28 | FromDiscord | <shadow.> ah fair enough |
| 02:21:38 | FromDiscord | <ElegantBeef> I dont think it was bugging out |
| 02:21:42 | FromDiscord | <nikki> that's the main thing: let's get the reading right |
| 02:21:52 | FromDiscord | <ElegantBeef> I think the stringification is just wrong |
| 02:22:02 | FromDiscord | <Gyllou> O.O |
| 02:22:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 02:22:05 | FromDiscord | <shadow.> ok lemme do reading first |
| 02:22:08 | FromDiscord | <shadow.> ye |
| 02:22:10 | FromDiscord | <Rika> @Gyllou ill try helping you |
| 02:22:12 | FromDiscord | <Rika> whats the error |
| 02:22:13 | FromDiscord | <Gyllou> lol |
| 02:22:24 | FromDiscord | <Gyllou> kk ill post a small blurb in here one sec |
| 02:22:42 | FromDiscord | <shadow.> alright reading worked |
| 02:22:44 | FromDiscord | <nikki> i'm just quite sure that reading to array[2, byte] and then doing cast[float64] of that array seems ... like it doesn't do the right thing |
| 02:22:48 | * | rockcavera joined #nim |
| 02:22:55 | FromDiscord | <nikki> @shadow. can we see a code update |
| 02:22:56 | FromDiscord | <shadow.> lmfao |
| 02:22:58 | FromDiscord | <shadow.> well the thing was |
| 02:23:00 | FromDiscord | <shadow.> before i could read and write |
| 02:23:02 | FromDiscord | <shadow.> make no changes |
| 02:23:05 | FromDiscord | <shadow.> and it would make a perfect audio file |
| 02:23:21 | FromDiscord | <nikki> right that part makes sense. the bits are the same |
| 02:23:24 | FromDiscord | <shadow.> fair |
| 02:23:27 | FromDiscord | <shadow.> ok ye i gotchu |
| 02:23:28 | FromDiscord | <nikki> the main thing is to interpret the float right, if you want to do math on 'em |
| 02:23:39 | FromDiscord | <shadow.> im just writing as uint16 for now bc yk, havent tried the float16 lib yet |
| 02:23:51 | FromDiscord | <shadow.> https://hastebin.com/belupomaga.kotlin |
| 02:23:51 | * | leorize joined #nim |
| 02:24:01 | FromDiscord | <shadow.> also since im reading as uint16 i just did div 2 instead of = 0.5 lmao |
| 02:24:04 | FromDiscord | <Gyllou> sent a long message, see http://ix.io/2DQS |
| 02:24:05 | jonjitsu[m] | If I have a list of m urls to fetch and I want to use asynchttpclient to keep n concurrent fetches going at once how would I do it? |
| 02:24:15 | FromDiscord | <Gyllou> sry O.O |
| 02:24:21 | FromDiscord | <ElegantBeef> Oh yea i was right, it's not a `distinct uint16` |
| 02:24:26 | FromDiscord | <Rika> doesnt work as in how |
| 02:24:35 | FromDiscord | <ElegantBeef> @Gyllou drop it here https://play.nim-lang.org/ |
| 02:24:46 | FromDiscord | <nikki> i also think @shadow. you can just use a seq of Float16 or uint16 |
| 02:24:51 | FromDiscord | <nikki> don't need a seq of seqs |
| 02:24:56 | FromDiscord | <shadow.> seq for channels |
| 02:24:59 | FromDiscord | <shadow.> imo its simpler |
| 02:25:10 | FromDiscord | <nikki> oh i see i misread. yeah cool |
| 02:25:10 | FromDiscord | <Rika> okay i see how it doesnt work, you have to pass in a tuple not a seq |
| 02:25:12 | FromDiscord | <shadow.> samples[0] = channel 1โตsamples[1] = channel 2 |
| 02:25:12 | FromDiscord | <shadow.> ye |
| 02:25:17 | FromDiscord | <Gyllou> https://play.nim-lang.org/#ix=2DQT |
| 02:25:26 | FromDiscord | <shadow.> i suppose i should try using all Float16? |
| 02:25:38 | FromDiscord | <nikki> yeah worth a shot, then make sure you stringify the stuff properly |
| 02:25:42 | FromDiscord | <shadow.> kk |
| 02:25:48 | FromDiscord | <nikki> eg. convert to float64 using the lib, then echo the float64 |
| 02:26:09 | FromDiscord | <Gyllou> just working on a naive graph implementation with arraymancer for gpu processing |
| 02:26:24 | FromDiscord | <Gyllou> so try a tuple? for the index? |
| 02:26:27 | FromDiscord | <Rika> i think |
| 02:26:53 | FromDiscord | <ElegantBeef> Yea almost certainly needs tuple |
| 02:27:03 | FromDiscord | <ElegantBeef> `(int, int)` as an index for the matrix |
| 02:27:06 | FromDiscord | <Rika> if it doesnt work then you have to pass the numbers individually |
| 02:27:09 | FromDiscord | <shadow.> https://play.nim-lang.org/#ix=2DQU |
| 02:27:14 | FromDiscord | <shadow.> thats the code so far just using float16 |
| 02:27:22 | FromDiscord | <shadow.> what do you want me to do with float64's? |
| 02:27:29 | FromDiscord | <shadow.> wait |
| 02:27:29 | FromDiscord | <shadow.> one sec |
| 02:27:30 | FromDiscord | <ElegantBeef> also dont use `seq` use `seq[int]` |
| 02:27:31 | FromDiscord | <Gyllou> i tried doing just two int args but that broke too |
| 02:27:32 | FromDiscord | <shadow.> i did an oopsy |
| 02:27:42 | FromDiscord | <Gyllou> okay gotcha |
| 02:27:59 | FromDiscord | <Gyllou> idk why im so slow at getting nim's typing system |
| 02:28:02 | FromDiscord | <ElegantBeef> But you're replacing it so that doesnt matter, just so much better to explictly state the type unless it can be generic |
| 02:28:07 | FromDiscord | <Rika> dont worry about it |
| 02:28:09 | FromDiscord | <Rika> its kinda weird |
| 02:28:40 | FromDiscord | <ElegantBeef> Well it's a little weird in the fact it's super easy to declare generic logic, but it's not that big of a monster |
| 02:28:41 | FromDiscord | <Gyllou> https://play.nim-lang.org/#ix=2DQW |
| 02:28:52 | FromDiscord | <Gyllou> thats the console output only in that one |
| 02:29:05 | FromDiscord | <nikki> @shadow. where did `readfloat16` on files come from |
| 02:29:14 | FromDiscord | <shadow.> lmfao i didnt |
| 02:29:17 | FromDiscord | <shadow.> i did a search and replace |
| 02:29:19 | FromDiscord | <shadow.> for uint16 |
| 02:29:19 | FromDiscord | <shadow.> i fixed |
| 02:29:20 | FromDiscord | <shadow.> dw |
| 02:29:21 | FromDiscord | <Gyllou> brb heading to vm to try a couple more things |
| 02:29:24 | FromDiscord | <nikki> ook, so you posted broken code, got it |
| 02:29:27 | FromDiscord | <nikki> i thought it was working xD |
| 02:29:27 | FromDiscord | <shadow.> yes |
| 02:29:30 | FromDiscord | <shadow.> lol ok well |
| 02:29:31 | FromDiscord | <nikki> for a second i was like "is this magic" |
| 02:29:34 | FromDiscord | <shadow.> ASHHDOJASDASd |
| 02:29:36 | FromDiscord | <shadow.> yk just uh |
| 02:29:38 | FromDiscord | <shadow.> in my modified version of |
| 02:29:42 | FromDiscord | <shadow.> the float 16 package |
| 02:29:45 | FromDiscord | <shadow.> i included a readfloat16 |
| 02:29:46 | FromDiscord | <shadow.> yeye |
| 02:29:46 | FromDiscord | <nikki> hahaha |
| 02:29:48 | FromDiscord | <ElegantBeef> Well the `stream.read[:float16]` would work |
| 02:29:48 | FromDiscord | <shadow.> definitely |
| 02:29:51 | FromDiscord | <Rika> > i thought it was working xDโตall of us when we write code be like |
| 02:30:08 | FromDiscord | <ElegantBeef> Oh shit nvm the read needs a var iirc |
| 02:30:14 | FromDiscord | <shadow.> welp i tried only float16's but its just static |
| 02:30:16 | FromDiscord | <nikki> i would say read into a uint16 and then set from that, just to be sure re: endianness and so on, but maybe it's fine this way |
| 02:30:25 | FromDiscord | <shadow.> volume warning https://media.discordapp.net/attachments/371759389889003532/776272661957181470/music2.wav |
| 02:30:29 | FromDiscord | <ElegantBeef> Well it's a uint 16 under the hood |
| 02:30:49 | FromDiscord | <shadow.> ye |
| 02:30:49 | FromDiscord | <nikki> yeah just in case file read handles uint16 specifically differently but yeah maybe is fine |
| 02:30:58 | FromDiscord | <nikki> hold on so, do you know what the first 20 samples are in floats or w/e |
| 02:30:58 | FromDiscord | <shadow.> hm |
| 02:31:10 | FromDiscord | <shadow.> i mean i can check using my c++ program prolly? |
| 02:31:22 | FromDiscord | <nikki> can you just echo blah.float32 |
| 02:31:25 | FromDiscord | <nikki> i think that would be super helpful |
| 02:31:25 | FromDiscord | <shadow.> oh sure |
| 02:31:33 | FromDiscord | <nikki> it's hard to recognize that values are same by hearing, easier by reading |
| 02:31:34 | FromDiscord | <nikki> probs |
| 02:31:52 | FromDiscord | <nikki> and yeah have your c++ prog echo the first 20 samples or w/e |
| 02:31:56 | FromDiscord | <nikki> just so we can check that it comes out as those |
| 02:32:00 | FromDiscord | <nikki> then at least we know reading works |
| 02:32:06 | FromDiscord | <shadow.> thats in nim |
| 02:32:08 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DQX |
| 02:32:10 | FromDiscord | <shadow.> i just echoed the float16's as float32 lmao |
| 02:32:16 | FromDiscord | <nikki> rip irc |
| 02:32:20 | FromDiscord | <shadow.> damn sorry |
| 02:32:30 | FromDiscord | <ElegantBeef> Nah it sends a link to nim playground |
| 02:32:34 | FromDiscord | <ElegantBeef> @Gyllou https://play.nim-lang.org/#ix=2DQY |
| 02:32:34 | FromDiscord | <nikki> ah right |
| 02:32:36 | FromDiscord | <shadow.> smart |
| 02:32:49 | FromDiscord | <nikki> yeah so until we see the c++ output |
| 02:32:53 | FromDiscord | <nikki> no idea if this worked |
| 02:32:53 | FromDiscord | <nikki> lmao |
| 02:32:57 | FromDiscord | <ElegantBeef> Two issues, one you didnt use `var Graph` which is required for mutating a parameter, secondly need x,y coords |
| 02:33:03 | FromDiscord | <shadow.> fair enough |
| 02:33:05 | FromDiscord | <shadow.> lemme try c++ |
| 02:34:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 02:34:51 | FromDiscord | <ElegantBeef> Guess we lost gyllou |
| 02:35:14 | FromDiscord | <shadow.> fml package says audio file is malformed |
| 02:35:17 | FromDiscord | <Gyllou> im here lol |
| 02:35:29 | * | leorize joined #nim |
| 02:35:33 | FromDiscord | <shadow.> but i can play it in media playeer? |
| 02:35:35 | FromDiscord | <shadow.> this is confusing |
| 02:35:41 | FromDiscord | <shadow.> (edit) "playeer?" => "player?" |
| 02:35:41 | FromDiscord | <nikki> i'm waiting for the c++ numbers |
| 02:35:46 | FromDiscord | <shadow.> c++ package says malformed wav |
| 02:35:47 | FromDiscord | <shadow.> LMAO |
| 02:35:51 | FromDiscord | <nikki> wat |
| 02:35:57 | FromDiscord | <nikki> what does the c++ pkg do |
| 02:35:58 | FromDiscord | <shadow.> > ERROR: this doesn't seem to be a valid .WAV file |
| 02:35:59 | FromDiscord | <nikki> i thought it was a synth? |
| 02:36:00 | FromDiscord | <shadow.> reads wavs |
| 02:36:02 | FromDiscord | <Rika> lol |
| 02:36:04 | FromDiscord | <shadow.> well i made a synth using it |
| 02:36:06 | FromDiscord | <shadow.> but |
| 02:36:10 | FromDiscord | <shadow.> considering i made the wav using the package |
| 02:36:13 | FromDiscord | <Gyllou> (graph: Graph, u: int, v: int) i tried this too and it didnt work |
| 02:36:15 | FromDiscord | <shadow.> if it says the wave is malformed |
| 02:36:15 | FromDiscord | <Rika> can you send the wav again ill put it through mediainfo |
| 02:36:16 | FromDiscord | <shadow.> thats slightly odd |
| 02:36:17 | FromDiscord | <nikki> huh. oh i was saying like, run ur synth, make it print the nums in ur own code that you own |
| 02:36:22 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/776274161970053120/music.wav |
| 02:36:30 | FromDiscord | <shadow.> ohh |
| 02:36:32 | FromDiscord | <shadow.> you mean print the actual |
| 02:36:36 | FromDiscord | <shadow.> things its outputting |
| 02:36:36 | FromDiscord | <shadow.> hmm |
| 02:36:41 | FromDiscord | <nikki> ya haha. straight from the horse's mouth |
| 02:36:44 | FromDiscord | <shadow.> that code is archaic idk if i wanna go back there... |
| 02:36:46 | FromDiscord | <shadow.> LOL |
| 02:36:47 | FromDiscord | <nikki> lulz |
| 02:36:48 | FromDiscord | <shadow.> ok i will |
| 02:36:56 | FromDiscord | <nikki> well, up to u. was just an idea. idk if it makes sense |
| 02:37:01 | FromDiscord | <shadow.> nah ur right |
| 02:37:03 | FromDiscord | <shadow.> its just a sin function |
| 02:37:08 | FromDiscord | <shadow.> and some other shit |
| 02:37:09 | FromDiscord | <nikki> that way the test is: c++ said it outputted 0.5. did we read 0.5 |
| 02:37:12 | FromDiscord | <nikki> seems simple enough |
| 02:37:12 | FromDiscord | <ElegantBeef> That float16 library will output ints when printed |
| 02:37:21 | FromDiscord | <ElegantBeef> So dont use that ... ๐ |
| 02:37:25 | FromDiscord | <nikki> @ElegantBeef they're doing echo blah.float32 |
| 02:37:26 | FromDiscord | <shadow.> f |
| 02:37:30 | FromDiscord | <ElegantBeef> Yea i know |
| 02:37:36 | FromDiscord | <nikki> idk why it's called float32 and not toFloat32, but that's another story |
| 02:37:54 | FromDiscord | <shadow.> alr one sec |
| 02:37:54 | FromDiscord | <ElegantBeef> cause typeconversion is done with `.T` |
| 02:38:23 | FromDiscord | <nikki> !eval echo (0.32).toInt |
| 02:38:24 | FromDiscord | <ElegantBeef> If you have an inheritance tree and want to convert to parent you can just do `child.Parent` |
| 02:38:26 | NimBot | 0 |
| 02:38:40 | FromDiscord | <nikki> i thought the common idiom was toBlah yeah for numerics |
| 02:38:48 | FromDiscord | <nikki> for inheritance spaghetti i agree |
| 02:39:07 | FromDiscord | <shadow.> hm |
| 02:39:07 | FromDiscord | <ElegantBeef> Well also just in general since it gets turned into `toInt(a)` it looks a little off |
| 02:39:13 | FromDiscord | <shadow.> i dont remember the original scale i used but |
| 02:39:18 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DR5 |
| 02:39:19 | FromDiscord | <ElegantBeef> For UFCS it's fine, but if you use the general function call it's off |
| 02:39:19 | FromDiscord | <shadow.> fuck my bad |
| 02:39:19 | FromDiscord | <shadow.> irc |
| 02:39:21 | FromDiscord | <ElegantBeef> Again |
| 02:39:25 | FromDiscord | <shadow.> thats for c4 d4 e4 f4 g4 |
| 02:39:26 | FromDiscord | <ElegantBeef> They get a link of that entire message |
| 02:39:29 | FromDiscord | <shadow.> whew |
| 02:39:31 | FromDiscord | <Gyllou> ill probably try back later guys lol |
| 02:39:33 | FromDiscord | <Gyllou> ttyl |
| 02:39:35 | FromDiscord | <nikki> lolol it's also we don't actually need to see the numbers. just saying you can compare the nums. but also yeah good to see 'em |
| 02:39:36 | FromDiscord | <ElegantBeef> Why? |
| 02:39:40 | FromDiscord | <ElegantBeef> I solved your issue gyllou |
| 02:40:02 | FromDiscord | <ElegantBeef> If i wanted to get ignored, i go speak to my friends |
| 02:40:09 | FromDiscord | <ElegantBeef> (edit) "i" => "i'd" |
| 02:40:10 | FromDiscord | <shadow.> what friends? |
| 02:40:14 | FromDiscord | <shadow.> we're programmers |
| 02:40:17 | FromDiscord | <shadow.> computers dont count |
| 02:40:19 | FromDiscord | <nikki> @shadow. ok so now it printed + also wrote a .wav right? |
| 02:40:22 | FromDiscord | <shadow.> yes |
| 02:40:23 | FromDiscord | <nikki> time to read that .wav and print the nums |
| 02:40:27 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/776275185347067904/music.wav |
| 02:40:28 | FromDiscord | <shadow.> yup |
| 02:40:28 | FromDiscord | <shadow.> gotchu |
| 02:40:34 | FromDiscord | <nikki> moment of truth man |
| 02:40:39 | FromDiscord | <shadow.> yes |
| 02:40:56 | FromDiscord | <shadow.> questionable |
| 02:40:57 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DR6 |
| 02:41:04 | FromDiscord | <Rika> i checked |
| 02:41:05 | * | xet7 quit (Ping timeout: 240 seconds) |
| 02:41:06 | FromDiscord | <Rika> just now |
| 02:41:09 | FromDiscord | <shadow.> mhm? |
| 02:41:11 | FromDiscord | <Rika> pcm is int |
| 02:41:16 | FromDiscord | <shadow.> oop |
| 02:41:18 | FromDiscord | <Rika> you then divide it by the range |
| 02:41:19 | FromDiscord | <shadow.> am i |
| 02:41:23 | FromDiscord | <Rika> https://stackoverflow.com/questions/15087668/how-to-convert-pcm-samples-in-byte-array-as-floating-point-numbers-in-the-range#15094612 |
| 02:41:31 | FromDiscord | <nikki> great. gonna go buy my time back at the time store |
| 02:41:33 | FromDiscord | <Rika> mediainfo says its pcm |
| 02:41:46 | FromDiscord | <shadow.> ah |
| 02:41:46 | FromDiscord | <shadow.> well |
| 02:41:50 | FromDiscord | <shadow.> i suppose i owe you guys all an hour now |
| 02:42:00 | FromDiscord | <nikki> it's k i actually coded on my own thing in the bgr lol |
| 02:42:00 | FromDiscord | <Rika> lol |
| 02:42:03 | FromDiscord | <nikki> and it works |
| 02:42:06 | FromDiscord | <shadow.> fr? |
| 02:42:08 | FromDiscord | <shadow.> lol |
| 02:42:13 | FromDiscord | <ElegantBeef> Nikki was playing with physics |
| 02:42:15 | FromDiscord | <nikki> yeah just had some silly refactoring things to do |
| 02:42:40 | FromDiscord | <ElegantBeef> Is that your own aabb physics or chipmunk? |
| 02:42:46 | FromDiscord | <shadow.> lol |
| 02:42:56 | FromDiscord | <shadow.> @Rika signed or unsigned ints |
| 02:43:06 | FromDiscord | <shadow.> ah wait unsigned im going to assume |
| 02:43:07 | FromDiscord | <shadow.> lol |
| 02:43:13 | FromDiscord | <shadow.> wait- |
| 02:43:14 | FromDiscord | <nikki> @ElegantBeef in #gamedev ? chipmunk yeah. i just wrapped the part of chipmunk i need for this particular game |
| 02:43:16 | FromDiscord | <ElegantBeef> probably signed assuming you want to represent a sign wave |
| 02:43:21 | FromDiscord | <shadow.> ah right |
| 02:43:22 | FromDiscord | <shadow.> lemme try that |
| 02:43:27 | FromDiscord | <ElegantBeef> sine |
| 02:43:31 | FromDiscord | <ElegantBeef> I'm not dumb you are |
| 02:43:51 | FromDiscord | <ElegantBeef> A sign wave is similar to a sine wave but it's a square wave ๐ |
| 02:44:18 | FromDiscord | <nikki> i guess a sign wave would'n't be periodic haha |
| 02:44:22 | FromDiscord | <nikki> -1 before 0, and 1 after 0 |
| 02:44:24 | FromDiscord | <nikki> O_o |
| 02:45:06 | FromDiscord | <Rika> signed |
| 02:45:21 | FromDiscord | <shadow.> alr |
| 02:45:25 | FromDiscord | <shadow.> lemme try messin with that |
| 02:45:29 | FromDiscord | <shadow.> im prolly gonna sign off for today then lol |
| 02:45:36 | FromDiscord | <Rika> how does unsigned audio work |
| 02:45:38 | FromDiscord | <shadow.> i dont wanna just keep askin for help w every little change |
| 02:45:41 | FromDiscord | <shadow.> @Rika it doesnt |
| 02:45:52 | FromDiscord | <nikki> maybe you just subtract some constant value lol |
| 02:45:56 | FromDiscord | <shadow.> lol |
| 02:45:57 | FromDiscord | <Rika> afaik yeah but |
| 02:45:58 | FromDiscord | <ElegantBeef> You offset the value by int.max/2 ๐ |
| 02:46:01 | FromDiscord | <shadow.> ye |
| 02:46:03 | FromDiscord | <Rika> thats not any easier than signed ints |
| 02:46:05 | FromDiscord | <shadow.> just subtract signed max |
| 02:46:09 | FromDiscord | <shadow.> from unsigned value |
| 02:46:11 | FromDiscord | <ElegantBeef> It's literally the same |
| 02:46:15 | FromDiscord | <nikki> that's actually how two's completemtn works |
| 02:46:15 | FromDiscord | <shadow.> lol ik its me being dumb |
| 02:46:16 | FromDiscord | <nikki> xD |
| 02:46:18 | FromDiscord | <shadow.> lool |
| 02:46:39 | FromDiscord | <ElegantBeef> @nikki There you go https://media.discordapp.net/attachments/371759389889003532/776276744906473522/unknown.png |
| 02:47:04 | FromDiscord | <nikki> that's not sign(x) is it |
| 02:47:15 | FromDiscord | <nikki> lolol |
| 02:47:18 | FromDiscord | <shadow.> alr well |
| 02:47:21 | FromDiscord | <nikki> i thought the joke was about sign waves |
| 02:47:26 | FromDiscord | <shadow.> ima head off for tonight then |
| 02:47:28 | FromDiscord | <shadow.> thanks for all the help guys |
| 02:47:32 | FromDiscord | <nikki> ttyl! |
| 02:47:37 | FromDiscord | <nikki> i should afk for a bit too |
| 02:47:40 | FromDiscord | <shadow.> peace |
| 02:48:16 | FromDiscord | <Rika> lmao |
| 02:48:24 | FromDiscord | <Rika> this is why i asked if you're sure its a float!!! |
| 02:48:28 | FromDiscord | <Rika> s m h |
| 02:48:50 | FromDiscord | <Rika> i know no wav codec that stores in float |
| 02:49:08 | FromDiscord | <nikki> well at least it parsed 0 correctly ๐ |
| 02:50:10 | FromDiscord | <Rika> well of course it would (maybe shit itself when it encounters -0) |
| 02:50:34 | FromDiscord | <nikki> yea was just a joke pointing at the of-course-ness |
| 02:50:41 | FromDiscord | <nikki> @Rika do you do audio stuff? |
| 02:50:51 | FromDiscord | <Rika> no im just a big audio nerd |
| 02:51:04 | FromDiscord | <Rika> i guess i do audio stuff, ive made an adpcm decoder before |
| 02:51:14 | FromDiscord | <nikki> i'm looking forward to playing with vcvrack, discovered it from clybber mentioning it |
| 02:51:25 | FromDiscord | <Rika> oh that |
| 02:51:49 | FromDiscord | <Rika> eh im still figuring out a use for a daw other than fucking around with it as i dont really do voice recording or music prod |
| 02:52:20 | FromDiscord | <ElegantBeef> @nikki it's sign of sine X |
| 02:52:23 | FromDiscord | <Rika> the one im most familiar with is audition but im trying to transition to something else, maybe reaper or cubase, but i was eyeing renoise |
| 02:52:42 | FromDiscord | <nikki> pretty sure sign is https://en.wikipedia.org/wiki/Sign_function |
| 02:52:47 | FromDiscord | <Rika> signum |
| 02:52:58 | FromDiscord | <Rika> people use signum usually for the sign function |
| 02:53:21 | FromDiscord | <nikki> the daw i've used most is renoise lol |
| 02:53:23 | FromDiscord | <nikki> i find trackers fun |
| 02:53:35 | FromDiscord | <nikki> bc. initially i was making kinda breakcorey stuff which it helps with for intricate drum hax |
| 02:54:00 | FromDiscord | <ElegantBeef> I mean the joke is i accidently wrote sign instead of sine |
| 02:54:06 | FromDiscord | <ElegantBeef> So i just fed sine into sign to resolve it ๐ |
| 02:54:36 | FromDiscord | <Rika> sinegn |
| 02:54:42 | FromDiscord | <Rika> or signne |
| 02:55:27 | FromDiscord | <ElegantBeef> signasodial |
| 02:55:49 | FromDiscord | <Rika> i hate this |
| 02:56:05 | FromDiscord | <nikki> @ElegantBeef i'm getting to the fun bit in the engine now |
| 02:56:07 | FromDiscord | <Rika> its signusoidal btw |
| 02:56:14 | FromDiscord | <nikki> the metaprogramming stuff to register component types |
| 02:56:17 | FromDiscord | <nikki> ๐ |
| 02:56:25 | FromDiscord | <ElegantBeef> Dont tell me to spell properly, as i can barely spell improperly |
| 02:56:27 | FromDiscord | <nikki> ground work of graphics, events, physics api is in |
| 02:56:30 | FromDiscord | <ElegantBeef> Ah nice |
| 02:56:45 | FromDiscord | <nikki> so yeah the idea is to let you do `type MyComp {.rememberMe.} = object ...` |
| 02:56:54 | FromDiscord | <Rika> why is misspell so easy to misspell i wonder |
| 02:56:55 | FromDiscord | <nikki> idk what to call `rememberMe` yet lol |
| 02:57:10 | FromDiscord | <ElegantBeef> serialized? |
| 02:57:16 | FromDiscord | <Rika> memorize xdd |
| 02:58:42 | FromDiscord | <nikki> lolol |
| 03:03:44 | FromDiscord | <ElegantBeef> irreplacable |
| 03:03:47 | FromDiscord | <nikki> i was thinking {.component.} maybe it's long or innacurate tho |
| 03:04:10 | FromDiscord | <shadow.> !eval echo 42f64 |
| 03:04:14 | NimBot | 42.0 |
| 03:04:24 | FromDiscord | <shadow.> :o |
| 03:08:07 | FromDiscord | <nikki> the engine part is called 'ng' for now so also considering just `{.ng.}` but then it reads stuff on the type / proc or on has `{.ng(foo = "bar").}` for more options |
| 03:08:16 | FromDiscord | <nikki> or has |
| 03:08:35 | FromDiscord | <Rika> no good |
| 03:08:37 | FromDiscord | <Rika> lmao |
| 03:13:50 | FromDiscord | <nikki> hahaha |
| 03:13:56 | FromDiscord | <nikki> i actually really like that |
| 03:14:26 | FromDiscord | <ElegantBeef> what are the options for? |
| 03:15:19 | FromDiscord | <nikki> idk if any options will come up like that tbh. but maaaayybe for one-off flags like "browseable = false" or sth |
| 03:15:46 | FromDiscord | <nikki> but it's likely all those cases are better handles in another way |
| 03:15:56 | FromDiscord | <nikki> (edit) "handles" => "handled" |
| 03:26:13 | FromDiscord | <tinygiant> Is there a goto method for storing persistent data such as key value pairs/tables/etc.? Text stream to a file? Redis? |
| 03:27:26 | FromDiscord | <tinygiant> (edit) "Is there a goto method for storing persistent data such as key value pairs/tables/etc.? Text stream to a file? Redis? ... " added "Json?" |
| 03:28:00 | * | NimBot joined #nim |
| 03:28:09 | FromDiscord | <ElegantBeef> Depending on the end goal, you could just use flatty or frosty, or just json |
| 03:30:41 | FromDiscord | <tinygiant> Most likely just plain-text key-value pairs like (string, T), values that are constant changed/ added/ deleted. No idea what flatty or frosty is. |
| 03:30:55 | FromDiscord | <tinygiant> (edit) "constant" => "constantly" |
| 03:31:18 | FromDiscord | <Rika> libraries |
| 03:31:39 | FromDiscord | <Rika> there seems to be a lot of nim libraries with names that end with -y |
| 03:31:54 | * | vicfred quit (Quit: Leaving) |
| 03:31:59 | FromDiscord | <ElegantBeef> Treeform really likes those verbys |
| 03:32:14 | FromDiscord | <Gyllou> hii |
| 03:32:15 | FromDiscord | <Rika> one day youll make a library called beefy lmao |
| 03:32:19 | FromDiscord | <Rika> even if it aint a verb |
| 03:32:21 | FromDiscord | <ElegantBeef> Flippy, Bumpy, Flatty, Netty... and so on |
| 03:32:29 | FromDiscord | <Rika> these arent verbs beef |
| 03:32:46 | FromDiscord | <Gyllou> Can you help me a bit more beef ๐ |
| 03:32:52 | FromDiscord | <ElegantBeef> What's the problem now? |
| 03:32:55 | FromDiscord | <Rika> tfw im not helpful |
| 03:32:59 | FromDiscord | <Gyllou> same deal, had to take a break |
| 03:33:00 | FromDiscord | <Rika> :KannaKMS: |
| 03:33:01 | FromDiscord | <Gyllou> https://play.nim-lang.org/#ix=2DRd |
| 03:33:16 | FromDiscord | <ElegantBeef> Well Rika close enough to verbs |
| 03:33:27 | FromDiscord | <ElegantBeef> If you look at the compiler error |
| 03:33:36 | FromDiscord | <ElegantBeef> It shows that it wants a `var Graph` |
| 03:33:54 | FromDiscord | <Gyllou> is that not what G is at that point? |
| 03:33:59 | FromDiscord | <ElegantBeef> You cannot modify an `object` with a proc unless you pass it with `var` |
| 03:34:04 | FromDiscord | <ElegantBeef> Or it's a `ref object` |
| 03:34:17 | FromDiscord | <Gyllou> sent a long message, see http://ix.io/2DRe |
| 03:34:23 | FromDiscord | <ElegantBeef> Parameters are implictly not modifiable |
| 03:34:46 | FromDiscord | <ElegantBeef> it needs to be `graph: var Graph` in the proc decl |
| 03:34:55 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2DRf |
| 03:34:59 | FromDiscord | <ElegantBeef> Look at the error on that one |
| 03:35:11 | FromDiscord | <ElegantBeef> And look at the `add/removeedge` procs |
| 03:35:18 | FromDiscord | <tinygiant> I guess another way to look at it would be, if I'm storing key value pairs, is there a library optimized to find and return values from the saved file, or would you pretty much have to load the entire file every time? |
| 03:35:43 | FromDiscord | <ElegantBeef> I'd assume database libraries would be made for this, but it depends on the scale of what you're doing |
| 03:35:50 | FromDiscord | <Rika> depends |
| 03:35:50 | FromDiscord | <Rika> yeah |
| 03:35:56 | FromDiscord | <Rika> a lot of things are dependent on what you need |
| 03:36:07 | FromDiscord | <ElegantBeef> If you are saving 100 KVPs there isnt much reason to use a DB |
| 03:36:23 | FromDiscord | <Gyllou> ty! |
| 03:36:43 | FromDiscord | <Gyllou> i didnt realize parameters were immutable in the proc context |
| 03:36:57 | FromDiscord | <ElegantBeef> Yep nim attempts to default immutable everywhere it can |
| 03:37:27 | FromDiscord | <ElegantBeef> Hence why it's `const` -> `let` -> `var` |
| 03:37:52 | FromDiscord | <Gyllou> thats actually awesome, despite my current little experiment here i prefer something like functional paradigm |
| 03:37:53 | FromDiscord | <ElegantBeef> If you cant do it with a const use a let, if you cant do it in let, use a var ๐ |
| 03:38:05 | FromDiscord | <Gyllou> thanks for answering my retarded question lol |
| 03:38:19 | FromDiscord | <Rika> nim errors are kinda obtuse at times tho |
| 03:38:20 | FromDiscord | <ElegantBeef> Lol the compiler answered it, i just read it |
| 03:38:33 | FromDiscord | <Gyllou> yea i didnt understand it unfortunately |
| 03:38:38 | FromDiscord | <tinygiant> I would imagine the largest number of kvp would be around 10k or so. |
| 03:38:42 | FromDiscord | <Gyllou> prolly cuz i dont have my programming socks on |
| 03:38:46 | FromDiscord | <Gyllou> that would have helped |
| 03:38:53 | FromDiscord | <ElegantBeef> Yea i have my programming/snow shovelling socks on |
| 03:38:58 | FromDiscord | <Gyllou> lol |
| 03:39:23 | FromDiscord | <Gyllou> god i forgot to change my stupid 'merica avatar back whoops |
| 03:39:47 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=2DRh |
| 03:39:54 | FromDiscord | <ElegantBeef> The mismatch is fairly visible, just requires looking |
| 03:40:13 | FromDiscord | <Gyllou> i figured it was that line, but i was confused by varargs |
| 03:40:48 | FromDiscord | <ElegantBeef> it's cause it uses a macro for it, due to the way the matrix `Tensor` object works |
| 03:40:52 | FromDiscord | <Rika> i ordered some gelato pique socks because i heard they feel really good ๐ |
| 03:41:06 | FromDiscord | <ElegantBeef> socks specifically for gelato? |
| 03:41:07 | FromDiscord | <ElegantBeef> Shit |
| 03:41:14 | FromDiscord | <Gyllou> gotcha yea this is my first time messing wilth them |
| 03:41:32 | FromDiscord | <Rika> it says right below the macro line that "first mismatched parameter 0 |
| 03:41:33 | FromDiscord | <Rika> or smth |
| 03:41:34 | FromDiscord | <ElegantBeef> Do they go on the bowl or your feet |
| 03:41:37 | FromDiscord | <Gyllou> everything is better with thigh high socks on |
| 03:41:41 | FromDiscord | <Gyllou> duh |
| 03:41:48 | FromDiscord | <Gyllou> geesh boys are so dumb |
| 03:41:55 | FromDiscord | <ElegantBeef> ~~I highly doubt most people would like seeing me with thigh high socks~~ |
| 03:42:00 | FromDiscord | <Gyllou> lmao |
| 03:42:22 | FromDiscord | <Rika> https://duckduckgo.com/?q=gelato+pique+socks&t=ffab&iar=images&iax=images&ia=images |
| 03:42:29 | FromDiscord | <ElegantBeef> I doubt most people would like seeing me with normal socks ๐ |
| 03:42:46 | FromDiscord | <ElegantBeef> ah fuzzy socks |
| 03:42:55 | FromDiscord | <Rika> @ElegantBeef ftfy |
| 03:43:03 | FromDiscord | <ElegantBeef> That was the implication |
| 03:43:14 | FromDiscord | <Rika> theres a no socks option tho |
| 03:43:28 | FromDiscord | <Gyllou> lol |
| 03:44:09 | FromDiscord | <Gyllou> itd be nice to get some more love than i do. everybody loves the big titty goth girls, nobody likes the little titty goth girls. |
| 03:44:17 | FromDiscord | <Gyllou> #strugglebus |
| 03:44:26 | FromDiscord | <Rika> theres plenty of people who like small breasts |
| 03:44:34 | FromDiscord | <Rika> i cant believe i typed that out in this server |
| 03:44:38 | FromDiscord | <Gyllou> lmao |
| 03:45:12 | FromDiscord | <Gyllou> got my socks on now, im ready |
| 03:45:28 | FromDiscord | <Gyllou> gonna get back to it, that stuff isn't even the complicated part lol |
| 03:45:41 | FromDiscord | <ElegantBeef> I dont know if i'd be fishing for attention in a programming community |
| 03:46:02 | FromDiscord | <ElegantBeef> Software developers stereotypically are neckbeards afterall |
| 03:46:15 | FromDiscord | <Rika> theres a few horny dudes in the programming community though |
| 03:46:36 | FromDiscord | <ElegantBeef> a few ๐ |
| 03:46:52 | FromDiscord | <ElegantBeef> The entire neckbeard sterotype implies most |
| 03:46:55 | FromDiscord | <Gyllou> very true, not really looking for attention too much on discord, thats what insta is for |
| 03:47:05 | FromDiscord | <Rika> insta is much better yeah |
| 03:47:11 | FromDiscord | <ElegantBeef> gyllou outing themselves as an instathot? |
| 03:47:11 | Prestige | I mean, half of our ancestors were horny dudes |
| 03:47:13 | FromDiscord | <Gyllou> and tbh its mainly to show off to other girls |
| 03:47:28 | FromDiscord | <Gyllou> @ElegantBeef hes onto me |
| 03:47:35 | FromDiscord | <Rika> no thots allowed |
| 03:47:36 | FromDiscord | <ElegantBeef> The lurkers are franticly searching |
| 03:47:40 | FromDiscord | <Rika> lmao |
| 03:47:45 | FromDiscord | <Gyllou> gl with that |
| 03:47:48 | FromDiscord | <Rika> gyllou searches on instagram skyrocket |
| 03:47:58 | FromDiscord | <ElegantBeef> it takes a genius to reverse their name |
| 03:48:06 | FromDiscord | <Rika> uollyg |
| 03:48:10 | FromDiscord | <Gyllou> damn |
| 03:48:12 | FromDiscord | <Rika> am i a genius now |
| 03:48:21 | FromDiscord | <Gyllou> my secret encoding |
| 03:49:01 | FromDiscord | <Gyllou> hey no shame, i mainly use insta to look at girls too tho |
| 03:49:16 | FromDiscord | <ElegantBeef> I mean there should be shame, but that's besides the point |
| 03:49:17 | FromDiscord | <Gyllou> its just the way of life |
| 03:49:40 | FromDiscord | <Rika> didnt you wear your socks already? get back to programming smh |
| 03:49:41 | FromDiscord | <Rika> lol |
| 03:49:53 | FromDiscord | <Gyllou> yea i mean social media is pretty cringe, i dabble and then get bored |
| 03:50:00 | FromDiscord | <Gyllou> >_< |
| 03:50:06 | FromDiscord | <Gyllou> lol alright ttyl |
| 03:50:21 | FromDiscord | <ElegantBeef> Excuse me whilst a photoshop a 6 pack, and cause the door behind me to curve |
| 03:50:36 | FromDiscord | <Rika> you want to have abs and a big ass? |
| 03:50:37 | FromDiscord | <Gyllou> lmao accurate |
| 03:50:50 | FromDiscord | <Rika> thats a unique combination |
| 03:51:17 | FromDiscord | <ElegantBeef> Hey i'm an ass and need an ass equally as large |
| 03:51:42 | FromDiscord | <Rika> double the ass |
| 03:52:21 | FromDiscord | <ElegantBeef> More like cube it, based off the area vs volume ๐ |
| 03:52:40 | FromDiscord | <Rika> a^3s^6 |
| 03:52:43 | FromDiscord | <ElegantBeef> Anywho, that nim is cool eh? |
| 03:53:13 | FromDiscord | <Rika> is nim cool or hot |
| 04:00:42 | * | muffindrake quit (Ping timeout: 260 seconds) |
| 04:01:07 | FromDiscord | <Gyllou> anybody play and cool games lately? |
| 04:01:13 | FromDiscord | <Gyllou> (edit) "and" => "any" |
| 04:01:35 | FromDiscord | <Gyllou> been thinking of trying GTFO |
| 04:01:45 | FromDiscord | <Gyllou> but its early access, been burned so many times |
| 04:01:52 | FromDiscord | <ElegantBeef> GTFO is interesting but you really need 4 people, plus this is more #offtopic |
| 04:02:13 | FromDiscord | <Gyllou> oh didnt realize you guys were strict about it |
| 04:02:27 | FromDiscord | <Gyllou> no worries ๐ |
| 04:02:36 | * | muffindrake joined #nim |
| 04:02:36 | FromDiscord | <ElegantBeef> Well i'm sure IRC and the like dont like the filling up of garbage ๐ |
| 04:02:48 | FromDiscord | <Gyllou> fair lol |
| 04:02:58 | FromDiscord | <ElegantBeef> Offtopic is bridge aswell, so they can opt out of "useless garbage" |
| 04:03:26 | FromDiscord | <Gyllou> i gotcha, np i understand |
| 04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
| 04:06:36 | * | supakeen joined #nim |
| 04:06:54 | FromDiscord | <Rebel> Is there a trivial way to slice an openarray? |
| 04:09:03 | FromDiscord | <ElegantBeef> `a[0..2]` |
| 04:10:12 | FromDiscord | <Rebel> ah yeah was using ^ ๐คฆโโ๏ธ forgot that just returns one element. |
| 04:17:35 | FromDiscord | <Rebel> If you are doing a proc that takes in an arbitrary amount of bytes with an openarray but needs to return a seq since you can't return an openarray is it evne worth passing in the data as an openarray if you need to convert it to a seq at the end of the day? |
| 04:21:23 | FromDiscord | <ElegantBeef> Well the point of the openarray is to support seqs and arrays of T |
| 04:21:59 | FromDiscord | <Rika> You will be able to return open arrays soon |
| 04:24:20 | FromDiscord | <nikki> that's gonna be great |
| 04:26:18 | FromDiscord | <Rebel> ok just curious as it's for padding |
| 04:26:42 | FromDiscord | <Rebel> When Nimble crypto packages don't have support for padding just convert from Go or C lol |
| 04:26:58 | FromDiscord | <Rebel> (edit) "When Nimble crypto packages don't have support for padding ... just" added "(vital component for any block based crypto system lol)" |
| 04:36:43 | FromDiscord | <Rika> i dont understand what you mean |
| 04:37:35 | ForumUpdaterBot | New post on r/nim by 0xSMT: Templates and Anonymous Procs, see https://www.reddit.com/r/nim/comments/jsoa0k/templates_and_anonymous_procs/ |
| 04:41:41 | FromDiscord | <Rika> someone send the dude ^ that he has to inject the parameter `(proc(x: int): int = (let x {.inject.} = x; body))` |
| 04:42:24 | Yardanico | there's a simpler way nowadays |
| 04:42:33 | Yardanico | you can inject in the arguments themselves, check my answer |
| 04:42:57 | Yardanico | this is only allowed on 1.4+ |
| 04:43:03 | Yardanico | (pragmas for routine arguments) |
| 04:43:17 | FromDiscord | <Rika> well yeah did you say tat in the answer? |
| 04:43:29 | FromDiscord | <Rika> you should note that |
| 04:43:34 | Yardanico | i'll edit to add that, but if the person didn't specify the nim version, we should always assume latest :) |
| 04:52:47 | * | vicfred joined #nim |
| 04:55:24 | FromDiscord | <Rebel> You don't understand what I mean Rika? I just meant that when life doesn't give you the padding methods you want just convert them from other languages to Nim. Now just need to figure if I want to try integrating it with nimcrypto or nimaes. Just ported over PKCS#7 padding at least in theory need to test it. |
| 04:58:26 | FromDiscord | <Rika> ah i see |
| 04:58:27 | FromDiscord | <Rika> yeah |
| 04:58:38 | FromDiscord | <Rika> if no existing thing works just ocnvert from c |
| 04:59:18 | FromGitter | <gogolxdong> Is there any limitation of string add operation? 800+ readFile and add content to a string has been truncated at many places. |
| 05:03:44 | FromGitter | <gogolxdong> many were truncated at the first double quote mark " |
| 05:05:38 | FromDiscord | <nikki> add works pretty regularly i think. maybe some issue in parsing / reading? |
| 05:05:58 | FromGitter | <gogolxdong> like `_tcscpy(wdir + sz, TEXT("/*"));` vs `_tcscpy(wdir + sz, TEXT("` |
| 05:06:02 | FromDiscord | <nikki> got a code sample? |
| 05:12:14 | FromDiscord | <j-james> Is it possible to use a for loop while concatenating a string? |
| 05:13:42 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=2DRv |
| 05:17:49 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2DRx |
| 05:25:21 | * | j-james joined #nim |
| 05:27:21 | FromDiscord | <j-james> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2DRv |
| 05:38:04 | FromDiscord | <j-james> Nim then thinks the string after the first `else` is on its own: |
| 05:38:22 | FromDiscord | <Rika> oh i didnt see that |
| 05:38:30 | FromDiscord | <Rika> what's that "]" supposed to be |
| 05:38:58 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=2DRD |
| 05:39:07 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2DRE |
| 05:39:16 | * | bung joined #nim |
| 05:39:36 | FromDiscord | <Rika> ok; i misunderstood |
| 05:39:43 | FromDiscord | <Rika> okay i see what you want |
| 05:40:24 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2DRG |
| 05:40:52 | FromDiscord | <j-james> the `"]"` could go after the ending `)`, just putting it directly after the for loop gave me less errors |
| 05:41:10 | FromDiscord | <Rika> i think the temp.var is unavoidable |
| 05:43:06 | FromDiscord | <j-james> oh well, but at least that's a nice way of doing it |
| 05:43:08 | FromDiscord | <j-james> thanks a bunch |
| 05:44:12 | * | j-james quit (Quit: Leaving.) |
| 05:57:41 | FromDiscord | <MSDOSPrompt> sent a code paste, see https://play.nim-lang.org/#ix=2DRJ |
| 05:58:04 | FromDiscord | <MSDOSPrompt> (edit) "https://play.nim-lang.org/#ix=2DRJ" => "https://play.nim-lang.org/#ix=2DRK" |
| 06:07:33 | FromDiscord | <Varriount> It looks... Inelegant |
| 06:08:22 | FromDiscord | <Varriount> I wouldn't worry about temporary variables unless they are strings or sequences |
| 06:09:42 | FromDiscord | <Varriount> @MSDOSPrompt @j-james Also, keep in mind that a string can be mutated |
| 06:19:27 | FromDiscord | <j-james> Yeah, I'm mostly doing this to try and to conform to someone else's general coding style here |
| 06:19:51 | * | habamax joined #nim |
| 06:20:41 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=2DRQ |
| 06:24:35 | bung | what's int32(X) called in code generation ? |
| 06:37:23 | * | leorize quit (Ping timeout: 240 seconds) |
| 06:37:35 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
| 06:40:07 | * | leorize joined #nim |
| 06:40:52 | * | leorize quit (Remote host closed the connection) |
| 06:41:14 | * | leorize joined #nim |
| 06:44:14 | * | narimiran joined #nim |
| 06:58:23 | * | leorize quit (Ping timeout: 240 seconds) |
| 07:15:53 | * | leorize joined #nim |
| 07:20:46 | * | solitudesf joined #nim |
| 07:29:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 07:30:47 | * | leorize joined #nim |
| 07:31:25 | * | oculux joined #nim |
| 07:32:16 | * | oculuxe quit (Ping timeout: 265 seconds) |
| 07:37:35 | * | bung quit (Ping timeout: 265 seconds) |
| 08:08:53 | * | bung joined #nim |
| 08:14:03 | * | bung quit (Ping timeout: 260 seconds) |
| 08:15:28 | * | PMunch joined #nim |
| 08:15:49 | Oddmonger | a new int32 ? |
| 08:17:10 | Oddmonger | but it will be lost if not stored in a variable |
| 08:19:29 | * | tane_ joined #nim |
| 08:34:27 | * | bung joined #nim |
| 08:35:13 | FromGitter | <bung87> ah, sorry it's a compiler related question. |
| 08:50:03 | * | Tanger quit (Remote host closed the connection) |
| 09:07:52 | PMunch | The Python fibonacci thing is still running -_- |
| 09:12:57 | FromDiscord | <ElegantBeef> Pmunch you really need a hobby ๐ |
| 09:13:51 | * | fredrikhr joined #nim |
| 09:22:29 | FromDiscord | <Vindaar> Nah, I love PMunch's "let's try to compute random things" ๐ |
| 09:23:58 | * | Leaf34 joined #nim |
| 09:24:02 | Leaf34 | hi |
| 09:25:07 | Leaf34 | PMunch: we talked on tuesday about the fib and I found very simple and faster way |
| 09:25:45 | Leaf34 | in the gmp ilb (original) is fib as mpz_fib_ui |
| 09:25:53 | Leaf34 | ilb = lib |
| 09:26:32 | Leaf34 | I tested it first with c++ and is over 50% faster. |
| 09:26:51 | FromGitter | <bung87> https://github.com/nim-lang/Nim/blob/5515804e65e67d6a44088c24f9c65e09da2e8200/lib/pure/hashes.nim#L95 can this part not fallback to 64? |
| 09:28:37 | PMunch | ElegantBeef, I have plenty of hobbies, one of them just happen to be "lets see if I can run/compile this" :P |
| 09:29:11 | PMunch | Leaf34, ah right, well that doesn't really show you the speed of the language though, so it's pretty useless as a benchmark |
| 09:29:28 | PMunch | Or where you actually interested in the massive fibonacci numbers themselves? |
| 09:29:51 | Leaf34 | yes, and it's simple to call with nim |
| 09:30:02 | Leaf34 | proc fib1*(z: Int, x: culong): Int = ## Sets `z` to the fibonacci of `x` and returns `z`. result = z mpz_fib_ui(result[], x) |
| 09:30:02 | PMunch | By the way, right before you joined I updated the others on the Python implementation trying to solve fib 10_000_000_000 |
| 09:30:08 | PMunch | It's been running for two days now :P |
| 09:30:17 | PMunch | The Nim version took 2-3 minutes to complete |
| 09:30:32 | Leaf34 | time ./fib 10_000_000_000 # proc fib1real 0m58,162suser 0m56,311ssys 0m1,643s |
| 09:30:43 | Leaf34 | with nim and the gmp caall |
| 09:30:45 | Leaf34 | call |
| 09:30:52 | PMunch | Oh nice |
| 09:31:06 | PMunch | And yeah, one of the strengths of Nim is the easy C interop :) |
| 09:31:19 | FromDiscord | <windowsboy111> hi, help. what is the meaning of `identifier expected` |
| 09:31:30 | Leaf34 | https://play.nim-lang.org/#ix=2DSE |
| 09:31:39 | Leaf34 | fib2 is from tuesday |
| 09:32:34 | FromDiscord | <windowsboy111> basically I see this and I am confused https://media.discordapp.net/attachments/371759389889003532/776378894764736522/unknown.png |
| 09:32:49 | Leaf34 | in gmp other fuctions too: https://www.cymatics.cc/Number-Theoretic-Functions.html#index-Factorial-functions |
| 09:33:50 | Leaf34 | factorial in c++ (I think in nim the same): 2020 Nov 11int n = 10000000; // 10 000 000real 0m53,997suser 0m12,641ssys 0m0,568s |
| 09:34:05 | Leaf34 | mpz_fac_ui |
| 09:35:19 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
| 09:35:31 | PMunch | @windowsboy111, seems like you might have a stray character somewhere |
| 09:35:45 | PMunch | Do you have an actual text snippet you could post to the playground? |
| 09:36:48 | PMunch | Leaf34, that's cool |
| 09:36:58 | Leaf34 | https://www.cymatics.cc/Other-Algorithms.html#Other-Algorithms |
| 09:37:06 | PMunch | What are you actually trying to achieve with these fibonacci things? |
| 09:37:54 | FromDiscord | <windowsboy111> @PMunch Ah, totally accurate. It is out of my screen. What a silly mistake! |
| 09:38:30 | Leaf34 | PMunch: higher better faster .... |
| 09:38:45 | Leaf34 | only to find the best... |
| 09:39:38 | Leaf34 | I think gmp is good enough ... to help someone, if he ask: I need a big number....:] |
| 09:40:28 | FromDiscord | <ElegantBeef> Oh pmunch i think i figured out what i wanted to ask |
| 09:40:28 | Leaf34 | it needs so long ( in weeks) to find the way to simple use gmp |
| 09:40:35 | FromDiscord | <ElegantBeef> It was about LSP |
| 09:42:03 | Araq | can we finally remove the master branch? |
| 09:42:05 | FromDiscord | <ElegantBeef> Not that i remember exactly, but that's the topic it was ๐ |
| 09:42:06 | Araq | https://github.com/nim-lang/Nim/pull/15926 |
| 09:42:07 | disbot | โฅ Add activeElement and documentElement to document. |
| 09:42:11 | Araq | yet another mistake |
| 09:45:11 | narimiran | i guess it is not large enough.... https://github.com/nim-lang/Nim/blob/master/readme.md |
| 09:55:02 | * | krux02 joined #nim |
| 09:57:12 | * | dv^_^ quit (Ping timeout: 256 seconds) |
| 10:11:38 | * | lritter joined #nim |
| 10:17:41 | FromDiscord | <Rika> Why havenโt yโall removed the master branch |
| 10:19:55 | narimiran | somebody somewhere might have some script depending on it |
| 10:20:26 | * | apahl quit (Ping timeout: 264 seconds) |
| 10:21:10 | * | apahl joined #nim |
| 10:25:24 | FromDiscord | <Idefau> that somebody should change it right now! |
| 10:26:32 | PMunch | @Elegant, ah NimLSP, many people have questions about that |
| 10:31:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 10:38:04 | bung | please check https://github.com/nim-lang/Nim/pull/15933 later, about hashWangYi1 |
| 10:38:05 | disbot | โฅ test for issue #15624 and PR #15915 for patch #13823 |
| 10:42:47 | Zevv | Does anyone know https://gobyexample.com/ and has an opinon about this? This got me started making usefull stuff in minutes. |
| 10:43:21 | Zevv | This style of docs is very easy entry. Not quite a tutorial, not quite a manual. |
| 10:43:58 | FromDiscord | <Rika> Donโt we already have that |
| 10:44:17 | FromDiscord | <lqdev> we do |
| 10:44:19 | FromDiscord | <lqdev> https://nim-by-example.github.io/ |
| 10:48:34 | * | Leaf34 quit (Remote host closed the connection) |
| 10:48:35 | * | leorize joined #nim |
| 10:52:45 | bung | @c-blake need take a look back to his PR hashWangYi1 |
| 10:57:39 | * | dv^_^ joined #nim |
| 11:01:25 | * | abm joined #nim |
| 11:05:39 | Araq | narimiran, these scripts are likely broken anyway tho |
| 11:05:54 | Araq | please remove the branch and let's see what happens |
| 11:06:20 | narimiran | ok |
| 11:32:23 | * | xet7 joined #nim |
| 11:37:32 | narimiran | master is no more |
| 11:38:03 | FromDiscord | <lqdev> goodbye, master |
| 11:38:22 | FromDiscord | <lqdev> i won't miss you |
| 11:52:44 | FromDiscord | <ache of head> We did it boiz |
| 11:52:49 | FromDiscord | <ache of head> Racism is no more |
| 11:54:24 | FromDiscord | <lqdev> yessssssssssss |
| 11:58:19 | FromDiscord | <dom96> oooh, in all seriousness, that is pretty awesome that we removed the `master` branch |
| 11:59:38 | FromDiscord | <lqdev> it was like a tumor |
| 11:59:42 | FromDiscord | <lqdev> a very confusing tumor |
| 12:00:09 | FromDiscord | <lqdev> i checked out to `master` once by accident and was wondering why the last commit was like, a few years ago |
| 12:00:59 | FromDiscord | <Rika> youre in a dream nim has been abandoned for years |
| 12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
| 12:06:34 | * | supakeen joined #nim |
| 12:11:26 | Zevv | lqdev: wow I never knew we have that |
| 12:49:14 | PMunch | New stream tonight at 18 UTC, it's time for re-implementing the layouting algorithm using the Kiwi cassowary solver, so that'll be fun |
| 12:49:24 | PMunch | Also trying to find some music for you Zevv :P |
| 12:56:18 | * | opal quit (Read error: Connection reset by peer) |
| 12:57:26 | * | opal joined #nim |
| 13:06:32 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2DTU |
| 13:11:04 | FromDiscord | <lqdev> a uint16 is implicitly convertible to both uint32 and uint64 because widening integer conversions are implicit |
| 13:11:11 | FromDiscord | <lqdev> thus, it matches both overloads |
| 13:11:52 | FromDiscord | <shadow.> ah ok sounds abt right |
| 13:12:05 | FromDiscord | <shadow.> im just using 0u32 for now, im guessing thats the easiest way? |
| 13:12:39 | FromDiscord | <lqdev> yeah either that or `0..<this.samplesPerChannel.uint32` |
| 13:12:56 | FromDiscord | <lqdev> there's absolutely no difference between those two |
| 13:13:37 | FromDiscord | <shadow.> ah fair enough lol |
| 13:23:26 | * | Jjp137 quit (Ping timeout: 264 seconds) |
| 13:32:00 | * | letto quit (Quit: Konversation terminated!) |
| 13:37:50 | ForumUpdaterBot | New thread by Wilypomegranate: Use xmlparser/xmltree in macro with --os:standalone, see https://forum.nim-lang.org/t/7081 |
| 13:38:51 | PMunch | Hmm, that is actually an annoying issue I've run into multiple times |
| 13:40:10 | PMunch | A macro using a procedure that works on both compile-time and runtime, the procedure has a switch to make sure it can't be used on illegal targets, e.g. --os:standalone. But the macro isn't really running on --os:standalone, it's running in the NimScript VM and shouldn't really care, but it does. |
| 13:49:53 | * | letto joined #nim |
| 13:51:06 | PMunch | :o |
| 13:51:12 | PMunch | Python finished! |
| 13:51:22 | PMunch | python fib.py 144560.58s user 107.16s system 99% cpu 40:13:40.46 total |
| 13:51:51 | Araq | PMunch, yep. --gc:arc mitigates the problems somewhat though |
| 13:55:11 | FromDiscord | <lqdev> does `owned` do anything in ARC/ORC? |
| 13:55:21 | PMunch | Oh it does? |
| 13:56:00 | FromDiscord | <lqdev> i mean, it was part of --newruntime but that got abandoned in favor of destructors |
| 13:56:19 | FromDiscord | <lqdev> so i'm wondering whether there is any point in using it |
| 13:56:38 | FromDiscord | <lqdev> cc Araq |
| 13:56:42 | FromDiscord | <Clyybber> Nope |
| 13:56:53 | FromDiscord | <Clyybber> Its ignored for non --newruntime |
| 13:57:06 | FromDiscord | <lqdev> alrighty then |
| 14:00:35 | Araq | well |
| 14:01:07 | Araq | in theory owned() is pretty sweet for my optimizers |
| 14:01:31 | Araq | we shouldn't abandon it too quickly |
| 14:04:22 | * | synthmeat quit (Quit: WeeChat 3.0) |
| 14:10:38 | * | synthmeat joined #nim |
| 14:16:34 | notchris | o/ |
| 14:29:14 | * | dv^_^ quit (Ping timeout: 260 seconds) |
| 14:39:13 | FromDiscord | <tinygiant> Having a small aneurysm. I know I've done this before, but can't get the right sytax. It's just one of those days. If I have a seq of tuples `var myList: seq[tuple[filename: string, file: Type1]]`, how to do I check if a random file is on the list --> `if file in myList(filename)` |
| 14:42:32 | * | dv^_^ joined #nim |
| 14:44:36 | FromDiscord | <Rika> if a what? |
| 14:44:38 | FromDiscord | <Rika> random file? |
| 14:44:46 | FromDiscord | <Rika> so you're picking a random entry on the seq? |
| 14:44:57 | FromDiscord | <tinygiant> No, I have a filename and want to see if it's on the list. |
| 14:45:32 | FromDiscord | <Rika> import sequtils; if file in myList.mapIt(it.filename):... |
| 14:45:45 | Zevv | sequtils.any? |
| 14:46:07 | FromDiscord | <Rika> oh that wrosk too |
| 14:46:27 | FromDiscord | <Rika> myList.anyIt(it.filename == file) |
| 14:46:34 | FromDiscord | <tinygiant> The aneurysm is fading. Thanks for the help. I must've tried every combination except that one. What a waste of time. I haven't tried any before, I'll give that a shot too. |
| 14:46:45 | FromDiscord | <Rika> wrosk -> works |
| 14:47:05 | FromDiscord | <tinygiant> (edit) "any" => "`any`" |
| 14:47:49 | Zevv | https://play.nim-lang.org/#ix=2DUl |
| 14:48:16 | FromDiscord | <tinygiant> Nice, like it, thanks. |
| 14:48:41 | Zevv | why not Table[string, Type1] instead? |
| 14:50:05 | FromDiscord | <tinygiant> Cuz I'm super smart and thought of that, of course. |
| 14:50:10 | FromDiscord | <notchris> don't sequences have 'contains' |
| 14:50:33 | narimiran | he wants to check if only part of a tuple is in a tuple. in a seq. |
| 14:51:39 | notchris | Ohhhh |
| 14:51:44 | FromDiscord | <tinygiant> Either way works. I just need to create an OpenArray of filename (string) and filecontents (Type1), then get a filename, see if it's in the array. If so, grab the contents. |
| 14:55:15 | FromDiscord | <notchris> I messed with variant types the other day it was fun |
| 14:55:23 | FromDiscord | <Rika> Nice |
| 14:55:29 | FromDiscord | <notchris> it was nice being able to have a seq with multiple types |
| 14:55:34 | FromDiscord | <Rika> What did you make |
| 14:55:43 | FromDiscord | <notchris> Well i have a small physics impl and i wanted to make a render |
| 14:55:47 | FromDiscord | <Rika> Technically not multiple types |
| 14:55:49 | FromDiscord | <notchris> but wanted all the bodies in one seq |
| 14:55:55 | FromDiscord | <notchris> but draw rects, circles, etc |
| 14:56:00 | FromDiscord | <Rika> Just differing data structure within each hehe |
| 14:56:05 | FromDiscord | <notchris> ahh true |
| 14:56:08 | FromDiscord | <notchris> ๐ |
| 15:00:09 | Zevv | 15:56 < FromDiscord> <notchris> ๐ |
| 15:00:15 | Zevv | oops |
| 15:01:31 | FromDiscord | <shadow.> lol |
| 15:04:18 | FromDiscord | <notchris> woah... is this a this |
| 15:04:39 | disruptek | it is. |
| 15:06:24 | * | dv^_^ quit (Ping timeout: 258 seconds) |
| 15:08:32 | notchris | yas |
| 15:08:53 | notchris | maybe one day we will have a native ui lib as good as a web ui |
| 15:08:58 | notchris | sigh |
| 15:14:38 | * | dv^_^ joined #nim |
| 15:15:57 | * | waleee-cl joined #nim |
| 15:17:53 | Prestige | notchris: object variant? |
| 15:18:27 | notchris | Prestige: that variant lib i was messing with, where u basically wrap a type in variant so u can have a 'mixed' array or seq |
| 15:18:32 | FromDiscord | <Rika> also known as case objects |
| 15:18:37 | notchris | it kinda breaks some core concepts maybe |
| 15:18:40 | notchris | idk |
| 15:18:43 | notchris | but i like it |
| 15:19:27 | notchris | i was hesitant because it feels like every lib that adds a new type seems to play poorly, like classes, but this worked nicely |
| 15:19:47 | notchris | idk if type is the right word in this scenario but yea |
| 15:20:13 | notchris | btw Rika, im on like week 3 of nim and still cant access my webcam programatically |
| 15:20:16 | notchris | i feel ashamed |
| 15:20:24 | notchris | i blame osx |
| 15:21:21 | FromDiscord | <Rika> sounds awful lol |
| 15:21:27 | FromDiscord | <Rika> i guess classic apple |
| 15:22:32 | notchris | there is just no interface i can find for AVFoundation |
| 15:22:54 | notchris | I was able to create a virtual camera, but even then, couldn't figure out how to access the stream data |
| 15:23:25 | notchris | And any existing libs i found were to take screenshots or videos, not just simply activate the feed. its aggravating |
| 15:23:25 | * | habamax quit (Remote host closed the connection) |
| 15:24:31 | FromDiscord | <InventorMatt> the nim opencv wrapper in theory should be able to do it but if I recall correctly that library needs a bit of help currently |
| 15:25:09 | FromDiscord | <notchris> it wraps an older version of cv |
| 15:25:16 | FromDiscord | <notchris> so it cant interface with the camera |
| 15:25:54 | FromDiscord | <InventorMatt> you could probably update the wrapper to work with the current cv version. most of the basic work done should be good |
| 15:26:07 | FromDiscord | <notchris> im not strong enough yet to do that |
| 15:26:14 | FromDiscord | <notchris> like using c2nim etc |
| 15:26:33 | FromDiscord | <Rika> you probably are im |
| 15:26:34 | FromDiscord | <notchris> and like half the good libs are in c++ |
| 15:26:34 | FromDiscord | <Rika> o |
| 15:26:39 | FromDiscord | <Rika> imo |
| 15:26:51 | FromDiscord | <notchris> Rika its scary |
| 15:26:54 | FromDiscord | <notchris> i think its just |
| 15:26:59 | FromDiscord | <notchris> project structure that confuses me |
| 15:26:59 | FromDiscord | <Rika> no you're scary smh |
| 15:27:03 | FromDiscord | <notchris> ๐ฎ |
| 15:27:06 | FromDiscord | <notchris> _cries_ |
| 15:27:14 | FromDiscord | <notchris> oo brb meeting |
| 15:33:39 | * | bung quit (Quit: Lost terminal) |
| 15:46:06 | planetis[m] | so can we get std/pathutils? Right now its limited for the compiler |
| 15:46:52 | notchris | what would tat do? |
| 15:47:30 | planetis[m] | https://nim-lang.org/docs/compiler/pathutils.html |
| 15:48:31 | planetis[m] | It has exact types to annotate every path you use. This way it prevents stupid errors |
| 15:48:59 | planetis[m] | I think python got something similar |
| 15:49:11 | FromDiscord | <Rika> pathlib |
| 15:49:13 | FromDiscord | <Rika> i assume |
| 15:49:22 | disruptek | well, you have my vote. but it's hardly limited. |
| 15:49:27 | planetis[m] | Yes that one |
| 15:49:30 | disruptek | --path="$nim" and then you can import it. |
| 15:50:12 | FromDiscord | <Rika> i think they mean for runtime input paths |
| 15:50:24 | disruptek | what? |
| 15:50:37 | FromDiscord | <Rika> for use within normal programs and not just the compiler |
| 15:50:47 | disruptek | read what i wrote. |
| 15:51:03 | * | opal quit (Ping timeout: 240 seconds) |
| 15:51:13 | disruptek | what is the compiler if not a normal program? |
| 15:52:43 | disruptek | so what you're telling me is, "nothing interesting happened last night." |
| 15:53:51 | * | opal joined #nim |
| 15:54:27 | FromDiscord | <Rika> oh |
| 15:54:31 | FromDiscord | <Rika> yeah i misunderstood |
| 15:55:09 | disruptek | what did you do? |
| 15:55:53 | FromDiscord | <Rika> misunderstand, thats what i did |
| 15:56:25 | disruptek | last night, chucklehead. |
| 15:56:50 | disruptek | c'mon, i can't be the only one that broke a few laws. |
| 15:57:03 | FromDiscord | <Rika> sounds like you are |
| 15:57:08 | FromDiscord | <Recruit_main707> do table contents have an index |
| 15:57:10 | FromDiscord | <Recruit_main707> ? |
| 15:57:16 | disruptek | keys() |
| 15:57:18 | FromDiscord | <Rika> not really no |
| 15:57:21 | FromDiscord | <Rika> unless its ordered |
| 15:57:30 | FromDiscord | <Rika> ah index as in numerical? |
| 15:57:39 | FromDiscord | <Rika> if so no, else strings are their index w |
| 15:57:50 | disruptek | how do you think a hash table works? |
| 15:58:32 | FromDiscord | <Recruit_main707> so i cant do something like if table["key"].idx > 10: ....? |
| 15:58:34 | FromDiscord | <Recruit_main707> ok |
| 15:58:46 | disruptek | what purpose would that serve? |
| 15:59:34 | FromDiscord | <Recruit_main707> not having to make an if statement for each case and group some together |
| 16:00:02 | disruptek | what? |
| 16:00:05 | * | themoon[m] quit (Quit: Idle for 30+ days) |
| 16:00:15 | planetis[m] | i did that once by including tables and getting the index of the element in the internal seq, but the indices are not stable, with a resize they all change |
| 16:00:36 | planetis[m] | https://gist.github.com/planetis-m/92e9cb286aeb0a18d6f9ff72813d0f63 |
| 16:00:40 | disruptek | i cannot fathom why you would to do this. |
| 16:00:53 | FromDiscord | <Daniel> i am trying to get this plugin into Notepad++, but these instructions are not working: |
| 16:00:53 | disruptek | if you're doing this, you're already doing it wrong. |
| 16:00:56 | planetis[m] | code is translated from a rust lib |
| 16:01:13 | disruptek | so impl it correctly. |
| 16:01:25 | FromDiscord | <Rika> i dont understand how a table would have a second numerical index if it were not ordered |
| 16:01:32 | FromDiscord | <Daniel> instructions:โตput nppnim.dll in NPPINSTDIR\plugins\nppnimโตput nppnim.xml in NPPINSTDIR\plugins\config |
| 16:01:38 | disruptek | because they are sequences. |
| 16:01:43 | disruptek | sequences are ordered. |
| 16:01:53 | FromDiscord | <Rika> yes, but only internally |
| 16:01:58 | * | muffindrake quit (Ping timeout: 260 seconds) |
| 16:01:59 | FromDiscord | <Daniel> if anyone can check, maybe i am doing it wrongโตhttps://github.com/jangko/nppnim |
| 16:02:07 | disruptek | that's what this einstein is talking about. |
| 16:02:18 | FromDiscord | <Rika> i wasnt talking about planetis |
| 16:03:14 | disruptek | how would you implement your ordered table? |
| 16:03:28 | planetis[m] | who? |
| 16:03:31 | disruptek | rika. |
| 16:04:03 | * | muffindrake joined #nim |
| 16:06:38 | FromDiscord | <krisppurg> Is there a Nim ogg library? |
| 16:07:10 | FromDiscord | <shadow.> https://nimble.directory/search?query=ogg |
| 16:07:54 | disruptek | name a VR code-visualizer. |
| 16:08:00 | FromDiscord | <shadow.> what? |
| 16:10:07 | FromDiscord | <krisppurg> https://bitbucket.org/BitPuffin/nim-ogg |
| 16:10:14 | FromDiscord | <krisppurg> Doesnt work |
| 16:11:06 | disruptek | this is the first hit on the duck: https://www.youtube.com/watch?v=KVZ9u3BIUBg |
| 16:11:44 | FromDiscord | <krisppurg> @shadow. |
| 16:13:44 | FromDiscord | <lqdev> @krisppurg you can try wrapping libogg using c2nim, it's a pretty simple lib |
| 16:13:48 | FromDiscord | <shadow.> ye |
| 16:13:51 | FromDiscord | <shadow.> or just learn the ogg format lol |
| 16:13:53 | FromDiscord | <lqdev> though libogg is pretty useless on its own |
| 16:13:53 | FromDiscord | <shadow.> might be useful |
| 16:14:04 | FromDiscord | <shadow.> thats what i did with wav |
| 16:14:07 | FromDiscord | <lqdev> you'll need libvorbis and libopus to actually read any samples |
| 16:14:07 | FromDiscord | <shadow.> but idk how complex ogg is |
| 16:14:30 | FromDiscord | <lqdev> and then to make your job easier you'll also need libvorbisfile or libopusfile |
| 16:14:59 | FromDiscord | <lqdev> generally i'd just wrap libvorbisfile/libopusfile and just link to libogg and libvorbis/libopus using {.passL.} |
| 16:15:22 | FromDiscord | <lqdev> because you don't actually need to use the ogg/vorbis/opus APIs |
| 16:15:57 | FromDiscord | <lqdev> @shadow. i wouldn't recommend going down that rabbit hole if you just want to read samples from ogg files ;p |
| 16:16:07 | FromDiscord | <shadow.> lol fair enough |
| 16:16:16 | FromDiscord | <lqdev> i mean, ogg/vorbis or ogg/opus |
| 16:16:22 | FromDiscord | <shadow.> to be fair i always use the simplest formats when im reading manually |
| 16:16:26 | FromDiscord | <shadow.> like bitmap for image |
| 16:16:30 | FromDiscord | <shadow.> and wav for audio |
| 16:16:30 | FromDiscord | <shadow.> lol |
| 16:16:58 | FromDiscord | <lqdev> i wanna write an opus decoder myself at some point, seems like a fun task :p |
| 16:17:13 | FromDiscord | <lqdev> though i have better things to do so that will probably never happen |
| 16:29:55 | FromDiscord | <rockcavera> it would be interesting to add a room for the Portuguese language. ๐ |
| 16:31:03 | FromDiscord | <Rika> which kind of portuguese ๐ |
| 16:31:19 | FromDiscord | <Shucks> `fieldPairs` iterates over non public fields on a object. Is there a iterator which only iterates over public fields? |
| 16:31:35 | FromDiscord | <Rika> not that i know of |
| 16:32:17 | FromDiscord | <rockcavera> @Rika, Here at the discord there is room for several languages, such as: Spanish, French, etc. |
| 16:32:21 | FromDiscord | <shadow.> wouldnt be too hard to make one lol |
| 16:32:33 | FromDiscord | <Rika> i know, i mean br or eu |
| 16:33:12 | FromDiscord | <rockcavera> I know there is a difference between portuguese br and eu, but portuguese is portuguese. |
| 16:33:40 | FromDiscord | <Rika> i mean what do you speak im just curious |
| 16:33:45 | FromDiscord | <Rika> ^^; |
| 16:34:00 | FromDiscord | <rockcavera> just as there are differences in the Portuguese spoken in Brazil, depending on the region |
| 16:34:29 | FromDiscord | <shadow.> btw rika int16's worked |
| 16:34:32 | FromDiscord | <shadow.> ty lol |
| 16:34:54 | FromDiscord | <Rika> lol |
| 16:35:01 | FromDiscord | <Rika> congrats on wasting an hour ๐ |
| 16:35:05 | disruptek | wow, the new route53 console is awesome. |
| 16:35:26 | disruptek | it totally obsoletes entire swathes of my resume. |
| 16:35:49 | FromDiscord | <shadow.> thanks |
| 16:35:50 | FromDiscord | <shadow.> loll |
| 16:35:56 | FromDiscord | <shadow.> at least it works now |
| 16:36:46 | disruptek | rude. |
| 16:37:22 | planetis[m] | problem with pathutils is all the other module expecting a path. Is it Absolute File/Dir? should they be annotated? |
| 16:37:55 | disruptek | why is it a problem? |
| 16:38:17 | disruptek | other modules can simply take pathutils types as input. |
| 16:38:17 | planetis[m] | not a problem just need directions |
| 16:38:37 | planetis[m] | so as not to create a huge pr that would be rejected |
| 16:38:53 | planetis[m] | yes i agree with you |
| 16:38:55 | disruptek | you don't /have/ to add anything. |
| 16:39:31 | disruptek | just make the import issue a warning that we renamed it into std/lib. |
| 16:39:42 | disruptek | i mean, the old import. |
| 16:39:48 | disruptek | and fix it in the compiler. |
| 16:39:52 | disruptek | that's the whole PR. |
| 16:39:58 | planetis[m] | ok |
| 16:40:03 | planetis[m] | thanks disruptek |
| 16:40:11 | disruptek | sure, it's just my opinion. |
| 16:40:41 | disruptek | i use pathutils in many projects. |
| 16:41:57 | disruptek | if the deprecation warning is also versioned, then we can probably backport the pr to 1.4, 1.2, 1.0. |
| 16:47:04 | disruptek | okay, i take it back. the new route53 is too fucking painful to live. |
| 16:49:51 | FromDiscord | <lqdev> is there a way of negating a set? |
| 16:50:13 | disruptek | compare it to {}? |
| 16:51:07 | FromDiscord | <lqdev> i don't wanna compare it |
| 16:51:16 | FromDiscord | <lqdev> guess i can write another overload tho |
| 16:51:32 | FromDiscord | <lqdev> that does `while l.get notin set` |
| 16:51:37 | disruptek | {A..B} xor myset |
| 16:51:39 | FromDiscord | <lqdev> instead of `while i.get in set` |
| 16:52:27 | disruptek | how could you get a new value without composition? |
| 16:52:45 | FromDiscord | <lqdev> wdym |
| 16:52:54 | disruptek | you said you don't want to compare it. |
| 16:53:07 | FromDiscord | <lqdev> look |
| 16:53:12 | disruptek | so, like, you want a zero-input func, right? |
| 16:53:18 | FromDiscord | <lqdev> it's a `set[char]` |
| 16:53:35 | FromDiscord | <lqdev> and i want to get a set of every possible char except the ones from my set |
| 16:53:47 | FromDiscord | <lqdev> guess i could do that by doing `{low(char)..high(char)} - mySet` |
| 16:53:55 | disruptek | so xor, or that. |
| 16:54:15 | disruptek | but the point i'm making is that you need input in any event. |
| 16:54:39 | disruptek | so you can't do it "without comparison." |
| 16:55:35 | FromDiscord | <lqdev> i'm not doing it "without comparison", i just wanted to avoid creating another overload of my proc with just a different operator applied |
| 16:55:52 | disruptek | okay dude. |
| 16:56:07 | disruptek | you want a @nim.fan address? |
| 16:56:13 | disruptek | i'm finally getting around to setting this domain up. |
| 16:56:30 | Zevv | so who is paying for the TLD |
| 16:56:39 | disruptek | i bought it awhile ago. |
| 16:56:39 | Zevv | registration |
| 16:56:49 | Zevv | sell it to araq for muchos $$ ! |
| 16:57:10 | disruptek | i'm trying. |
| 16:57:12 | FromDiscord | <lqdev> disruptek: the main domain should have a picture of a fan with a nim crown on it |
| 16:57:23 | disruptek | i keep sending him postcards but i think his wife is throwing them in the bin. |
| 16:57:32 | disruptek | lqdev: ikr |
| 16:57:59 | Zevv | no he just sends away the postman saying "i didn't order this" |
| 16:58:04 | disruptek | i will just have it redirect your email to irc. |
| 16:58:10 | disruptek | that would be cool. |
| 16:59:06 | disruptek | and we'll compose a bounce message if the username doesn't exist. |
| 17:01:56 | * | Zevv quit (Quit: Lost terminal) |
| 17:02:13 | * | Zevv joined #nim |
| 17:02:13 | * | Zevv quit (Changing host) |
| 17:02:13 | * | Zevv joined #nim |
| 17:10:20 | * | hnOsmium0001 joined #nim |
| 17:23:00 | * | Jjp137 joined #nim |
| 17:29:31 | * | NimBot joined #nim |
| 17:34:10 | FromDiscord | <Avatarfighter> Is there a way to tell if a certain library has been imported ? |
| 17:34:33 | FromDiscord | <Avatarfighter> I dont think so but if anyone has a hack im all ears |
| 17:37:46 | PMunch | Stream starting in ~30 minutes |
| 17:39:52 | Zevv | yes but |
| 17:47:57 | FromDiscord | <Avatarfighter> Also I forgot to say but:โตโตHow is everyone doing today ๐ |
| 17:48:12 | PMunch | Doing fine |
| 17:48:18 | Zevv | I don't know |
| 17:49:08 | Zevv | disruptek is doing fine, I just found: https://i.imgur.com/sfbJb80.jpg |
| 17:49:40 | FromDiscord | <Avatarfighter> rip |
| 17:51:46 | PMunch | Ouch |
| 17:58:05 | PMunch | Stream is live at https://www.twitch.tv/pmunche and https://www.youtube.com/watch?v=0Uzori2oZ3c |
| 18:04:31 | FromDiscord | <Daniel> switching to yt ๐ |
| 18:06:16 | * | rockcavera quit (Remote host closed the connection) |
| 18:15:12 | * | kinkinkijkin quit (Remote host closed the connection) |
| 18:39:23 | * | habamax joined #nim |
| 18:40:38 | Zevv | PMunch: your solver is not deterministic |
| 18:42:15 | FromDiscord | <shadow.> !eval if 5 == 5:; var x = 6;echo x |
| 18:42:17 | FromDiscord | <shadow.> lol worth a shot |
| 18:42:17 | NimBot | Compile failed: /usercode/in.nim(1, 11) Error: expression expected, but found ';' |
| 18:45:57 | FromDiscord | <haxscramper> https://github.com/inim-repl/INim - can use this to quickly test nim one-liners. Run with `-d:--cc:tcc` to use `tcc` compiler - it is pretty (not like interpreted language but still) |
| 18:49:50 | FromDiscord | <shadow.> ah ye i saw that |
| 18:49:55 | FromDiscord | <shadow.> i mean im alr with nim playground for now |
| 18:53:34 | Zevv | I do all my nim compilation through curl these days, that's much cheaper. I just -X POST to https://play.nim-lang.org/compile and _voila_ there's the output |
| 18:54:22 | Zevv | curl -L -v https://play.nim-lang.org/compile -d '{"code":"echo \"hello\"","compilationTarget":"c","outputFormat":"HTML","version":"latest"}' |
| 18:58:05 | FromDiscord | <shadow.> LMAO |
| 18:58:16 | FromDiscord | <shadow.> what platform does that endpoint even compile for? |
| 18:58:22 | Zevv | docker |
| 18:58:27 | FromDiscord | <shadow.> oh lol |
| 19:24:54 | FromDiscord | <Daniel> Nim is missing on this list :)โตhttps://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/c.html |
| 19:25:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 19:28:33 | FromDiscord | <treeform> the author does not want to add more languages |
| 19:28:51 | FromDiscord | <treeform> they feel nim is not popular enough to be on the list |
| 19:30:55 | FromDiscord | <lqdev> i've never heard of chapel |
| 19:31:08 | FromDiscord | <lqdev> i'd say racket isn't very "popular" either |
| 19:31:48 | * | leorize joined #nim |
| 19:32:27 | FromDiscord | <Avatarfighter> yeah the only one I don't recognize is chapel |
| 19:45:03 | * | leorize quit (Ping timeout: 240 seconds) |
| 19:45:46 | * | leorize joined #nim |
| 19:47:58 | disruptek | i think it's due to the whole "transpiler" argument, which is always fun. |
| 19:49:33 | Zevv | what makes a "trans" not a "comp" |
| 19:50:07 | mipri | meanwhile, https://benchmarksgame-team.pages.debian.net/benchmarksgame/measurements/typescript.html |
| 19:51:23 | disruptek | well that's just silly. |
| 19:51:56 | mipri | yeah, he's just a prick. |
| 19:52:18 | FromDiscord | <lqdev> !echo false.not |
| 19:52:26 | disruptek | well, he'll add it when the pressure is greater. |
| 19:52:30 | FromDiscord | <lqdev> !eval echo false.not |
| 19:52:33 | NimBot | true |
| 19:52:37 | FromDiscord | <lqdev> today i learned |
| 19:52:57 | mipri | !eval false.not.echo |
| 19:52:59 | NimBot | true |
| 19:53:20 | FromDiscord | <lqdev> but `not` is a keyword??????? |
| 19:53:29 | FromDiscord | <lqdev> it must be a special exception in the parser |
| 20:00:23 | Zevv | proc `not`*(x: bool): bool {.magic: "Not", noSideEffect.} |
| 20:00:42 | Zevv | it's an operator like any other |
| 20:00:57 | disruptek | don't be rude. |
| 20:01:29 | Zevv | who did I offend? |
| 20:02:09 | FromDiscord | <shadow.> !eval not.type.echo |
| 20:02:11 | NimBot | Compile failed: /usercode/in.nim(1, 4) Error: expression expected, but found '.' |
| 20:02:15 | FromDiscord | <shadow.> lol |
| 20:04:16 | Zevv | !eval proc `not`*(x: bool): bool {.magic: "Not", noSideEffect.} |
| 20:04:19 | NimBot | <no output> |
| 20:04:26 | Zevv | !eval echo(`not`.type) |
| 20:04:28 | NimBot | None |
| 20:07:18 | FromDiscord | <Idefau> !eval echo ["That is the question"][(0x2be or not 0x2be) mod 1] |
| 20:07:21 | NimBot | That is the question |
| 20:07:51 | PMunch | Zevv, are you around? |
| 20:07:55 | PMunch | Struggling a bit with npeg |
| 20:08:04 | Zevv | throw it out |
| 20:08:10 | Zevv | real friends don't let friends use npeg |
| 20:08:16 | PMunch | But it's great! |
| 20:08:37 | Zevv | what's up |
| 20:08:47 | PMunch | children <- ?spacer * +((stack | elements) * ?spacer) |
| 20:09:06 | PMunch | That rule makes it so it can only contain a list of stacks or a list of elements |
| 20:09:07 | PMunch | Not a mix |
| 20:09:13 | Zevv | lemmesee |
| 20:09:33 | PMunch | You can see it on the stream right now |
| 20:09:38 | Zevv | and what's the problem with that |
| 20:09:40 | PMunch | Or find the code on GitHub |
| 20:09:52 | PMunch | I want it to be a list of stacks or elements interleaved |
| 20:09:56 | PMunch | Are you watching the stream? |
| 20:10:00 | Zevv | yeah just tuned in |
| 20:10:10 | Zevv | let me test, but this should do what you expect: allow mix |
| 20:11:37 | Zevv | element vs elements |
| 20:11:39 | Zevv | right |
| 20:11:57 | Zevv | wrong |
| 20:13:17 | Zevv | getting spaces right is sometimes tricky |
| 20:13:24 | Zevv | I tend to add space after all my "atomics" |
| 20:13:46 | Zevv | and not around the operators, but really, it depends |
| 20:15:04 | Zevv | It's magic |
| 20:15:07 | Zevv | it's a "not not" |
| 20:15:30 | Zevv | What's in you grammar there, your rule? |
| 20:16:17 | Zevv | yeah, it's your & predicate |
| 20:16:32 | Zevv | & is a non-consuming lookahead, which is implemented as !! |
| 20:16:48 | Zevv | It only matches if &p matches, but p is not consumed |
| 20:16:57 | Zevv | it is expanded to !!p |
| 20:17:15 | Zevv | but the notation in the graph is silly, I'm open to ideas to better represent that "non consumed" part |
| 20:18:08 | Zevv | string <- *(1-'\x1f') |
| 20:18:31 | Zevv | no, ! is not the not you are thinking of |
| 20:19:18 | Zevv | I didn't make that up, blame Bryan Ford |
| 20:19:22 | Zevv | where should I IRC then, if not here? |
| 20:19:26 | Zevv | #PMunch? |
| 20:19:43 | * | habamax quit (Ping timeout: 260 seconds) |
| 20:20:30 | Zevv | no dude, go freenode or go home |
| 20:20:50 | disruptek | join #heros |
| 20:21:02 | disruptek | that's disbot's channel. |
| 20:21:22 | Zevv | yeah, well, don't bother, this works for me as well :) |
| 20:21:29 | Zevv | I type, you talk, everybody is happy |
| 20:23:10 | disruptek | ignore me. i can't even watch. |
| 20:30:09 | * | rockcavera joined #nim |
| 20:36:15 | FromDiscord | <miere> Hello, is it a bug if you get weird error message with this code? (it's supposed to be type mismatch error, if you comment one of procs you will get it): https://play.nim-lang.org/#ix=2DWg |
| 20:37:14 | disruptek | what would you expect that to mean, assuming it was valid. |
| 20:38:32 | FromDiscord | <shadow.> !eval let (x, y) = [1, 2]; echo x, " ", y |
| 20:38:35 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: 'tuple' expected |
| 20:38:41 | FromDiscord | <shadow.> ah ok |
| 20:39:52 | FromDiscord | <shadow.> !eval let (x, y) = 1, 2; echo x |
| 20:39:54 | NimBot | Compile failed: /usercode/in.nim(1, 15) Error: invalid indentation |
| 20:40:03 | FromDiscord | <shadow.> !eval let (x, y) = (1, 2); echo x |
| 20:40:09 | NimBot | 1 |
| 20:40:12 | FromDiscord | <shadow.> gamer |
| 20:50:55 | ForumUpdaterBot | New thread by Benjamindlee: Why can't I borrow slice assignment for distinct strings?, see https://forum.nim-lang.org/t/7082 |
| 20:59:25 | Zevv | PMunch: https://github.com/zevv/notifishower |
| 21:07:24 | * | narimiran quit (Ping timeout: 256 seconds) |
| 21:31:28 | FromDiscord | <aooo> Is there an up to date tutorial for nim 1.4? |
| 21:33:15 | solitudesf | ~tutorial |
| 21:33:15 | disbot | tutorial: 11intro to sacred manuscripts: https://nim-lang.org/docs/tut1.html -- solitudesf |
| 21:38:52 | * | solitudesf quit (Ping timeout: 272 seconds) |
| 21:43:39 | * | Q-Master quit (Read error: Connection reset by peer) |
| 21:43:46 | * | Q-Master joined #nim |
| 21:51:11 | PMunch | Zevv, oh nice, much better than my version of it :) |
| 21:51:25 | PMunch | Do you have the vector version? |
| 21:51:36 | PMunch | aooo, did you find any outdated ones? |
| 21:52:18 | PMunch | The official tutorials are pretty good, then the Nim in Action book is nice, and there's a whole video tutorial series on YouTube |
| 21:53:46 | FromDiscord | <ElegantBeef> Old tutorials really arent outdated |
| 21:54:07 | FromDiscord | <ElegantBeef> Point in proof is nim in action was published in what 2017 and is still >90% accurate |
| 21:55:48 | PMunch | Yeah, Nim has been fairly stable for quite a while now |
| 21:55:56 | PMunch | Did you catch my latest stream by the way @Elegant? |
| 21:56:22 | PMunch | Talked a bit about using Cassowary solvers for my layouting in PiMo :) |
| 21:56:30 | FromDiscord | <ElegantBeef> Nope |
| 21:56:35 | FromDiscord | <ElegantBeef> I was quite possibly asleep |
| 21:57:14 | FromDiscord | <ElegantBeef> Did you read my suggestion for layouts? ๐ |
| 21:58:23 | PMunch | No, what where they? |
| 21:59:21 | * | xet7 quit (Read error: Connection reset by peer) |
| 21:59:53 | FromDiscord | <ElegantBeef> Basically having the for splits as `hSplitLeft, hSplitRight, vSplitUp, vSplitDown` then you can use those as layouts, for an alternating style you'd do `vSplitRight, hSplitDown` and set `repeatMode: pattern` |
| 22:00:00 | * | xet7 joined #nim |
| 22:00:13 | FromDiscord | <ElegantBeef> the direction tells you where the window is placed |
| 22:00:26 | PMunch | Hmm, sounds familiar |
| 22:00:43 | PMunch | But my system is far more ambitious :D |
| 22:01:29 | FromDiscord | <ElegantBeef> I know you want to take up space for floating windows and the like, but i just like my tiled windows to follow a known pattern |
| 22:03:07 | PMunch | That's boring :P |
| 22:03:29 | PMunch | But with PiMo you can implement your own layouts fairly easily, so I might ship a simple tiler as well |
| 22:03:36 | PMunch | https://youtu.be/0Uzori2oZ3c?t=637 <- theres the stream by the way |
| 22:05:02 | PMunch | https://youtu.be/0Uzori2oZ3c?t=9365 <- this is the layout relevant part |
| 22:05:32 | FromDiscord | <ElegantBeef> I really should try something like bspwm or similar as i like automatic tiling and not the i3wm manual layout ๐ |
| 22:07:52 | FromDiscord | <ElegantBeef> A big issue imo with the whole dynamic layoutting is that you could very quickly lose your main window |
| 22:08:07 | PMunch | Main window? |
| 22:09:06 | FromDiscord | <ElegantBeef> Say you have your editor as a tiled window, then you open a floating window application that requests more space than it really needs, your editor is now where? |
| 22:09:47 | PMunch | Well you have probably set your editor to be expanded to fill the full screen |
| 22:09:57 | PMunch | Which would mean that the new window will get less space |
| 22:10:42 | PMunch | And if you have a consistently misbehaving window you can set a rule for its size |
| 22:10:46 | FromDiscord | <ElegantBeef> Like i'm sure it'll be cool to see, but the premise of the window i'm working in moving around cause i opened a new window is jusst ehhh |
| 22:11:18 | FromDiscord | <ElegantBeef> AwesomeWM for instance did the spiral/dwindle wrong, when you open a new window in those it takes of half of your screen |
| 22:11:32 | FromDiscord | <ElegantBeef> So your active window gets pushed down the stack of opened windows |
| 22:12:14 | PMunch | Well existing windows will have a constraint for their position, which should lead to minimal motion |
| 22:12:57 | FromDiscord | <ElegantBeef> I am interested to try it when it's done, just very doubtful that it'll feel nice to me |
| 22:13:02 | PMunch | And if you have one big open window (expanded) it will still try to be as big as possible |
| 22:16:38 | PMunch | Oh well, I'm off to bed |
| 22:16:43 | FromDiscord | <ElegantBeef> Buh bye |
| 22:17:14 | * | PMunch quit (Quit: leaving) |
| 22:19:56 | FromDiscord | <ElegantBeef> Pmunch also needs to learn that `super + right click` allows scaling floating windows |
| 22:20:24 | disruptek | sorta neat idea. |
| 22:22:36 | FromDiscord | <ElegantBeef> Yea it's certainly a cool idea, just without using no clue how much i actually like the idea in usage |
| 22:23:06 | disruptek | oh, this isn't a thing yet? |
| 22:23:48 | FromDiscord | <ElegantBeef> Pmunch's WM, nope? |
| 22:30:47 | * | Jjp137 quit (Ping timeout: 260 seconds) |
| 22:31:03 | * | Jjp137 joined #nim |
| 22:55:12 | disruptek | scaling, i mean. |
| 22:55:46 | disruptek | its been slow to arrive in most wayland wms. |
| 22:56:08 | disruptek | even though afaik it is pretty well supported in wayland itself. |
| 22:58:32 | FromDiscord | <ElegantBeef> Oh it's pretty consistent with most X wms |
| 23:11:20 | * | tane_ quit (Quit: Leaving) |
| 23:30:49 | * | vicfred quit (Ping timeout: 264 seconds) |
| 23:40:29 | disruptek | shashlick: the problem is that `nimble develop` in the gittyup CI installs a nimterop-0.6.13 despite the fact that gittyup is limited to nimterop-0.6.12. |