<< 12-11-2020 >>

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