<< 08-11-2020 >>

00:00:02*junland quit (Quit: %ZNC Disconnected%)
00:00:07FromGitter<ynfle> What are some good ast pattern matching libraries? Or ones that make traversing them simple?
00:00:45*junland joined #nim
00:28:12FromDiscord<notchris> @treeform just added a pr for fidget (typography)
00:49:05*a_chou joined #nim
00:53:07FromDiscord<treeform> @notchris I decided to split Font into Typeface and Font. Typeface now has the `.glyphs`.
00:53:35FromDiscord<ElegantBeef> Also i've been meaning to ask, is there any way to change the colour of font inline, without making a new text node?
00:53:36FromDiscord<treeform> If you see some thing using font.glyphs it should use font.typeface.glyphs now.
00:53:40FromDiscord<notchris> @treeform ah okay, i just made the pr because fidget wasn't running
00:53:47FromDiscord<notchris> thank you @treeform
00:54:12FromDiscord<treeform> I think I updated everything on my computer I might have missed some thing with depends or just did not push to github i'll check.
00:54:19FromDiscord<notchris> Thank you!
00:54:59FromDiscord<treeform> @ElegantBeef where do you wan to change the color? Fidget, Flippy, or Typography?
00:55:05FromDiscord<ElegantBeef> Fidget
00:55:20FromDiscord<treeform> just change the fill on a text node?
00:55:31FromDiscord<ElegantBeef> Yea but i mean so you can have multiple text colours in a single node
00:56:21FromDiscord<ElegantBeef> Was thinking something like richtext or similar could be used to annotate text colour, some escape characters
00:56:36FromDiscord<treeform> Oh like you want to say "Hey there `Red`" and have red be in red?
00:56:42FromDiscord<ElegantBeef> Yea
00:56:52FromDiscord<treeform> Sorry I don't have that implemented yet.
00:57:13FromDiscord<treeform> Its handled with text ranges in Figma. And that is the way I will do it too.
00:57:39FromDiscord<ElegantBeef> What's that look like?
01:01:39FromDiscord<treeform> I am not 100% sure. But figma calls it `characterStyleOverrides`.
01:02:27FromDiscord<treeform> This is how it looks in raw json: https://dpaste.org/MRB7
01:02:32FromDiscord<treeform> so some thing that should look better
01:03:17FromDiscord<treeform> looks kind of crazy
01:03:22FromDiscord<treeform> it has the string
01:03:24FromDiscord<ElegantBeef> Ah it's just indexed styles
01:03:31FromDiscord<treeform> then array for each char
01:03:35FromDiscord<treeform> then styles
01:04:00FromDiscord<treeform> I will probably have a nicer API, but it will be this in the back.
01:04:24FromDiscord<ElegantBeef> Could easily shoehorn rich text or whatever else in this
01:05:12FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=2DmH
01:05:14FromDiscord<treeform> ^ probably some thing like this
01:06:55FromDiscord<ElegantBeef> Yea i was thinking of using fidget for a text editor, but ehh that's on a long line of things i want to do ๐Ÿ˜„
01:08:05*Cthalupa quit (Ping timeout: 240 seconds)
01:08:57*Cthalupa joined #nim
01:14:52FromDiscord<treeform> Yes rich text is even harder then regular text.
01:15:04FromDiscord<treeform> If you want to be able to insert images and other layout
01:15:07FromDiscord<treeform> it gets harder and harder
01:18:07FromDiscord<ElegantBeef> Yea i'm just looking at normal text rendering with colour support, so it's not too hard for me to implement myself, just requires a bouchery of draw logic ๐Ÿ˜„
01:21:21FromDiscord<Avatarfighter> Ok so basically
01:21:36FromDiscord<Daniel> is there any tutorial for nim with fidget/figma?
01:21:41FromDiscord<Avatarfighter> Just curious but I can't make my own syntax such as `proc`/`func` ?
01:21:53FromDiscord<ElegantBeef> You techncially can
01:22:00FromDiscord<treeform> Sorry fidget is still pretty alpha.
01:22:03FromDiscord<Avatarfighter> yeah I have a really nasty macro @ElegantBeef atm
01:22:12FromDiscord<ElegantBeef> you can define it with stropping
01:23:07FromDiscord<ElegantBeef> Oh misunderstood
01:23:28FromDiscord<ElegantBeef> No you cannot make your own syntax, any syntax needs to be parsed by nim, so you can make a DSL if the parser parses
01:25:45FromDiscord<ElegantBeef> See https://play.nim-lang.org/#ix=2DmL
01:27:22FromDiscord<Daniel> @treeform but is it usable, even in alpha?
01:30:44FromDiscord<ElegantBeef> It's
01:57:06FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmQ
01:59:15FromDiscord<ElegantBeef> I just tried that code and OptionalFIelds isnt compilable due to using different sized arrays
02:00:31FromDiscord<tinygiant> The value array in each table row has to be the same size?
02:01:13FromDiscord<ElegantBeef> It's a homogenous datatype so you cannot store an `array[4, int]` into an `array[3, int]`
02:01:23FromDiscord<ElegantBeef> I dont get why it didnt complain there
02:01:55FromDiscord<ElegantBeef> Cause that toTable is basically just making a `Table[string, array[2, string]]` based off the first value
02:02:35FromDiscord<ElegantBeef> Can see the output here if interested https://play.nim-lang.org/#ix=2DmT
02:03:40FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmU
02:04:25*abm quit (Read error: Connection reset by peer)
02:05:57FromDiscord<ElegantBeef> You're certainly doing something off https://play.nim-lang.org/#ix=2DmV
02:06:24FromDiscord<ElegantBeef> You can also just use `@[]` for a sequence instead of an array, so you dont need same sized values
02:06:47FromDiscord<ElegantBeef> I know this is in your proprietary software but any chance you can give more of the code? ๐Ÿ˜„
02:07:02FromDiscord<ElegantBeef> You could just hire me as a consultant ๐Ÿ˜›
02:07:23FromDiscord<Rika> Lol
02:08:26FromDiscord<tinygiant> Meh, the stuff I'm writing isn't proprietary, it's jsut the library I'm using to access the data I need. What else would you need to see?
02:08:43FromDiscord<Rika> Are they in other modules
02:08:52FromDiscord<Rika> The definition and the proc
02:08:57FromDiscord<Rika> You mightโ€™ve not exported it
02:09:00FromDiscord<ElegantBeef> ^
02:12:29FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmX
02:12:58FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2DmY
02:13:15FromDiscord<ElegantBeef> Idk whats going on with your compiler
02:13:34FromDiscord<ElegantBeef> Is it just your editor complaining or your compiler?
02:13:35FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2DmZ
02:14:48FromDiscord<tinygiant> Sometimes I really want to throw these little pooters in the trash. Turns out it was a lack of appropraite indentation about 100 lines below this issue. Fixed that and it recognized this.
02:16:02FromDiscord<ElegantBeef> lol
02:16:16FromDiscord<ElegantBeef> Turn on white space viewing in your editor
02:17:05FromDiscord<tinygiant> It wasn't really whitespace that was that issue, there was an `else:` that didn't have a statement associated with it (earlier delete), so I threw a `discard` in there and all is good. Learning every day, I guess.
02:17:11FromDiscord<ElegantBeef> Ah
02:17:23FromDiscord<Rika> Lol
02:17:31FromDiscord<ElegantBeef> Insert comment about how whitespace significance is hard to debug ๐Ÿ˜„
02:17:44FromDiscord<Rika> Nim needs better indentation issue handling?
02:17:50FromDiscord<ElegantBeef> Probably
02:18:59FromDiscord<tinygiant> Goes back to this, though ...โ†ต> Is it just your editor complaining or your compiler?โ†ตIt was the editor/extension that was complaining about the undeclared identifier. Ran it through the compiler and it pointed at the problem `else:` statement immediately.
02:19:20FromDiscord<ElegantBeef> Ah
02:19:43FromDiscord<ElegantBeef> Tooling issues
02:19:46FromDiscord<tinygiant> That's the first time I'd seen that, so guess I have a new goto solution when stuff doesn't make sense. Or gotta look for a new extension.
02:20:48FromDiscord<ElegantBeef> What's your editor?
02:21:11FromDiscord<tinygiant> vscode with Zaitsev's nim extension.
02:21:22FromDiscord<ElegantBeef> Ah there arent more extensions ๐Ÿ˜„
02:21:26FromDiscord<ElegantBeef> They're all the same
02:22:04FromDiscord<tinygiant> Ok, well, no worries, I'm used to stuff like that. I'll just be hitting up the compiler every time I have a head-scratcher instead banging my cranium against the nim extension.
02:22:37FromDiscord<ElegantBeef> Yea the nim extension can even sometimes give that identifier issue randomly for no logical reason and the compiler runs fine
02:22:54FromDiscord<tinygiant> Awesome. Well, thanks for you help ... Again.
02:23:00FromDiscord<ElegantBeef> No problem
02:23:10FromDiscord<ElegantBeef> Tooling sadly isnt perfect here ๐Ÿ˜„
02:23:26*apahl quit (Ping timeout: 264 seconds)
02:23:41FromDiscord<tinygiant> Never is, but learned a little bit more about my environment's limitation and that can be just as good as learning more about the language.
02:24:58*apahl joined #nim
02:37:49*lbart joined #nim
02:37:49*lbart quit (Changing host)
02:37:49*lbart joined #nim
02:42:08*Tanger joined #nim
03:01:03*leorize quit (Ping timeout: 240 seconds)
03:07:19disrupteki don't like your attitude.
03:07:20*muffindrake quit (Ping timeout: 244 seconds)
03:08:32*leorize joined #nim
03:09:44*muffindrake joined #nim
03:09:48FromDiscord<Avatarfighter> ok
03:11:45*lbart quit (Ping timeout: 240 seconds)
03:12:58FromDiscord<Rika> Disruptek acting like a parrot again
03:15:30*lbart joined #nim
03:15:30*lbart quit (Changing host)
03:15:30*lbart joined #nim
03:16:00FromDiscord<Avatarfighter> lmaooo
03:17:14disruptekic's rod file compression versus gzip...
03:18:25disruptek27k -> 6k for snappy.
03:20:18disruptek27k -> 3900b for gzip.
03:20:49disrupteki think i'm fine with that.
03:20:53FromDiscord<Rika> Well whatโ€™s the speed of either
03:21:09disruptekpointless to measure.
03:21:24FromDiscord<Rika> Not needed? Okay
03:21:48disruptekhttps://en.wikipedia.org/wiki/Snappy_(compression)
03:22:06leorize[m]1you tried zstd?
03:22:19disruptekdo we have a native zstd now?
03:22:22disruptek!repo zstd
03:22:24disbothttps://github.com/facebook/zstd -- 9zstd: 11Zstandard - Fast real-time compression algorithm 15 13075โญ 1228๐Ÿด 7& 29 more...
03:22:31disruptekseems like no.
03:22:51disrupteki'm heavily biased towards solutions i can support.
03:22:51*a_chou quit (Quit: a_chou)
03:22:57disruptekweird, i know.
03:22:58FromDiscord<Avatarfighter> there is a zstd wrapper
03:23:00FromDiscord<Avatarfighter> Im using it
03:23:21FromDiscord<Avatarfighter> https://github.com/wltsmrz/nim_zstd
03:23:27FromDiscord<Rika> Well thatโ€™s just a wrapper
03:23:41FromDiscord<Rika> Think he wants it in pure nim
03:23:46FromDiscord<Avatarfighter> oh
03:24:04disrupteki mean, we could maybe consider it, but... it's more important to have it run quickly.
03:24:08FromDiscord<Avatarfighter> When is github.com/disruptek/nimzstd coming out
03:24:20leorize[m]1zstd is fast as hell
03:25:31disruptekspeed looks fine but not the code.
03:26:01FromDiscord<nikki> for a construct that looks like `foo("required_str", blah=3, cool=4): some(); code();` -- where the idea is that the 'blah' and 'cool' can be many params that i just iterate over and codegen for -- do i need to use macros or can a template do that?
03:26:26FromDiscord<nikki> main q is i guess where you can just iterate over an arbitrary number of a=b pairs
03:26:29leorize[m]1macros
03:27:13FromDiscord<nikki> aite guess i have some studying to do
03:27:25disruptekmeh.
03:27:35disrupteki don't see us using zstd soon.
03:27:39FromDiscord<nikki> i could do `foo("required_str", { "oho": 42 }): code();` but that's lame
03:27:45FromDiscord<ElegantBeef> Macros are for any type of introspection templates are for code subsitution
03:27:46disruptekmy entire storage backend is native nim and under 1000 lines.
03:28:13FromDiscord<nikki> right, i get that in the abstract but specifically if it's doable with templates i'd rather do it with templates bc. the implicit quasiquoting is nice
03:28:15leorize[m]1@nikki I'd stick to whatever that's simpler but still do the job well
03:28:29leorize[m]1only dabble in macros if you must tbh
03:28:35FromDiscord<nikki> hmm cool. do you think in this case that'd involve the `{ "mhm": "yes" }` versi5on
03:28:47FromDiscord<nikki> versus the `mhm="yes"` one
03:28:53FromDiscord<ElegantBeef> Psh always use macros it obfuscates code ๐Ÿ˜›
03:29:21FromDiscord<Rika> If you donโ€™t mind having the same type for every parameter yeah that works
03:29:45FromDiscord<nikki> ah woops, right
03:29:50FromDiscord<nikki> aite i guess gotta macroz it
03:30:11FromDiscord<ElegantBeef> Well i'm here to point you in the wrong directiong
03:30:18disrupteknice.
03:30:37FromDiscord<nikki> basically am making a generator for calls to http://google.github.io/incremental-dom/ to do a makeshift immediate mode ui api
03:31:12FromDiscord<nikki> should be pretty easy, the stateful push pop api they have is v. easy to wrap
03:31:15leorize[m]1ah, then a dsl would be what you want then
03:31:23leorize[m]1similar to karax i suppose
03:32:04FromDiscord<nikki> yeah since the api is kinda procedural, it turns out to be pretty simple. like i don't need to scan across an entire ui expression to build it
03:32:09FromDiscord<nikki> i can just keep making calls to the api
03:32:22disruptekyou're blowin' my mind right now.
03:32:41FromDiscord<nikki> in a good way? or
03:32:59FromDiscord<nikki> like eg. having wrapped it in zig when i was evaluating zig. it came out to look like: https://gist.github.com/nikki93/c7cb0db98bea88b3a73c5978a29be006#file-ohai-zig-L137-L155
03:33:07FromDiscord<nikki> which just only used procedure calls, no macros / dsl'ing
03:33:48disruptekno, i just had no idea there were so many of you.
03:34:07FromDiscord<nikki> i get that a lot
03:35:00disrupteki forgot how extensive frosty's debugging is.
03:39:38disruptekit's like i debugged the write() but assumed the read() would work perfectly.
03:39:59disruptekdoesn't anyone test this garbage before they publish it?
03:40:50disruptekfieldPairs really chafes my ass, it must be said.
03:41:31blueberrypieIf i want to interrupt a data transfer (ex if a http download is too big) would it be correct to call FutureStream[T].complete() in the middle of the transfer? https://nim-lang.org/docs/asyncstreams.html#complete%2CFutureStream%5BT%5D
03:41:39blueberrypiewould that cancel the operation?
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:32*supakeen joined #nim
04:30:57*mmohammadi9812 quit (Quit: Quit)
04:31:53*mmohammadi9812 joined #nim
04:53:34*Tanger quit (Remote host closed the connection)
05:07:04*leorize quit (Ping timeout: 240 seconds)
05:08:28*leorize joined #nim
05:13:23*leorize quit (Ping timeout: 240 seconds)
05:13:49*leorize joined #nim
06:04:08*waleee-cl quit (Quit: Connection closed for inactivity)
06:47:43*leorize quit (Ping timeout: 240 seconds)
06:55:14*leorize joined #nim
06:56:26FromDiscord<tinygiant> sent a long message, see http://ix.io/2DnD
06:59:13FromDiscord<ElegantBeef> @tinygiant do you mean aside from using hashsets to generate the removal/addition?
07:00:08FromDiscord<tinygiant> Not familiar with hashsets yet, but will be if I need to. Also, I think I remember something about being able to do unions/intersections/etc. with sequences. That might also be a possibility.
07:01:22FromDiscord<ElegantBeef> Hashsets are more efficient for that specific operation
07:02:07FromDiscord<ElegantBeef> Sets are garuenteed are O(1) lookups and dont have overlap, so it's relatively cheap to do intersections, unions, differences
07:02:32FromDiscord<tinygiant> Okay, is that all contained in the `sets` module? I'll start reading up on that.
07:02:37FromDiscord<ElegantBeef> yep
07:02:50FromDiscord<ElegantBeef> We do also do have bitsets, but those only work for ordinals so not useful here ๐Ÿ˜„
07:03:10FromDiscord<ElegantBeef> Those are just defined `{10, 20, 30}`
07:03:53FromDiscord<tinygiant> Ok, thanks for the pointers. I'll read up on sets and see what I can come up with.
07:04:20FromDiscord<ElegantBeef> It's always funny seeing people use the exact words but not know it's a thing
07:06:01FromDiscord<ElegantBeef> So in the end all you have to do is have a proc of `removeKeys` which takes a jsonnode, and a `HashSet[String]`, that iterates over all the nodes and removes any that are not in the hashset
07:06:05FromDiscord<ElegantBeef> Atleast as i understand it
07:08:50FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2CVs
07:09:28FromDiscord<ElegantBeef> Uncertain what you're asking
07:11:59FromDiscord<tinygiant> Just a Q about the KeyValuePairSeq[A]. I probably just need to experiment with it. The way my variables are currently setup, I'd only be working with seq[string] and keys, not key-value pairs, at least not until the finel iteration over the json node to delete.
07:12:20FromDiscord<ElegantBeef> hashsets keys are the value
07:12:33FromDiscord<ElegantBeef> you just do `set.incl("thisIsAKey")`
07:12:42FromDiscord<ElegantBeef> It's like a `Table[string,string]`
07:12:55FromDiscord<ElegantBeef> Not exactly, but similar
07:13:22FromDiscord<tinygiant> Okie doke. I'll throw some electrons at the screen and see what sticks. Thanks again, got some readin' to do.
07:14:57*solitudesf joined #nim
07:15:09FromDiscord<tinygiant> Another general question: can I use a hashset function to pull all the keys out of a json node, or do I need to iterate and create a seq from them?
07:15:38FromDiscord<ElegantBeef> well the function you define will iterate over it with the hashset
07:16:08FromDiscord<tinygiant> Sorry, I meant to help create the comparison set. One of the ingredients in the comparison set will be the keys from another jsonnode.
07:16:25FromDiscord<ElegantBeef> oh that i'd include all of the json nodes into the set
07:16:45FromDiscord<ElegantBeef> Get their key and `incl` it
07:17:26FromDiscord<tinygiant> Okay, got it. thanks.
07:18:00*narimiran joined #nim
07:20:53*habamax joined #nim
07:22:23*leorize quit (Ping timeout: 240 seconds)
07:26:26*leorize joined #nim
07:41:43*leorize quit (Ping timeout: 240 seconds)
08:01:29*Tanger joined #nim
08:04:51*natrys joined #nim
08:10:12*leorize joined #nim
08:11:46FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2Do1
08:13:13FromDiscord<ElegantBeef> What's it saying?
08:13:19FromDiscord<tinygiant> (edit) "https://play.nim-lang.org/#ix=2Do1" => "https://play.nim-lang.org/#ix=2Do2"
08:13:35FromDiscord<tinygiant> sent a code paste, see https://play.nim-lang.org/#ix=2Do3
08:14:12FromDiscord<tinygiant> (edit) "https://play.nim-lang.org/#ix=2Do3" => "https://play.nim-lang.org/#ix=2Do5"
08:14:19FromDiscord<ElegantBeef> you dont give it the key
08:14:38FromDiscord<ElegantBeef> that turns into `delete(instanceNode[k], )`
08:14:44FromDiscord<ElegantBeef> which you can see why it errors
08:15:32FromDiscord<tinygiant> Ok, I see what it's doing with that notation. I was fooled by the `# Deletes obj[key].` comment in the function definition. Thanks for the clarification.
08:36:24*kwilczynski quit (Ping timeout: 240 seconds)
08:37:03*Adeon quit (Ping timeout: 260 seconds)
08:37:14*jholland__ quit (Ping timeout: 264 seconds)
08:37:34*hoek quit (Ping timeout: 244 seconds)
08:37:38*npgm_ quit (Ping timeout: 260 seconds)
08:37:38*surma quit (Ping timeout: 260 seconds)
08:37:44*rayman22201 quit (Ping timeout: 240 seconds)
08:37:51*zielmicha__ quit (Ping timeout: 264 seconds)
08:37:55*ormiret quit (Ping timeout: 240 seconds)
08:38:04*notchris quit (Ping timeout: 240 seconds)
08:38:13*r4vi quit (Ping timeout: 260 seconds)
08:38:19*fowl quit (Ping timeout: 272 seconds)
08:38:24*l1x quit (Ping timeout: 240 seconds)
08:38:26*sirn quit (Ping timeout: 264 seconds)
08:38:32*d10n-work quit (Ping timeout: 260 seconds)
08:38:32*nikita` quit (Ping timeout: 260 seconds)
08:38:36*stever quit (Ping timeout: 244 seconds)
08:38:39*hnOsmium0001 quit (Ping timeout: 246 seconds)
08:38:48*matlock quit (Ping timeout: 260 seconds)
08:38:57*nikki93 quit (Ping timeout: 268 seconds)
08:39:07*euantorano quit (Ping timeout: 260 seconds)
08:49:08*Vladar joined #nim
08:52:13*ormiret joined #nim
08:52:22*kwilczynski joined #nim
08:52:28*jholland__ joined #nim
08:52:29*matlock joined #nim
08:52:34*rayman22201 joined #nim
08:52:45*zielmicha__ joined #nim
08:52:49*sirn joined #nim
08:52:50*hoek joined #nim
08:52:56*l1x joined #nim
08:52:58*fowl joined #nim
08:53:00*Adeon joined #nim
08:53:04*r4vi joined #nim
08:53:34*notchris joined #nim
08:53:41*npgm_ joined #nim
08:54:04*Cthalupa quit (Ping timeout: 260 seconds)
08:54:30*surma joined #nim
08:56:59*Cthalupa joined #nim
08:58:46*hnOsmium0001 joined #nim
09:00:46*nikki93 joined #nim
09:01:19*euantorano joined #nim
09:01:33*stever joined #nim
09:02:23*nikita` joined #nim
09:02:43*d10n-work joined #nim
09:11:53*zielmicha__ quit (Ping timeout: 272 seconds)
09:12:01*zielmicha__ joined #nim
09:12:02*notchris quit (Ping timeout: 264 seconds)
09:12:02*jholland__ quit (Ping timeout: 264 seconds)
09:14:12*notchris joined #nim
09:15:09*jholland__ joined #nim
09:15:23*leorize quit (Ping timeout: 240 seconds)
09:17:10*leorize joined #nim
09:56:23*leorize quit (Ping timeout: 240 seconds)
09:57:39*leorize joined #nim
09:59:05*Tanger quit (Quit: Leaving)
10:00:38*hoek quit (Read error: Connection reset by peer)
10:01:34*hoek joined #nim
10:06:30*hnOsmium0001 quit (Quit: Connection closed for inactivity)
10:08:58*Vladar quit (Quit: Leaving)
10:20:24*mmohammadi9812 quit (Ping timeout: 272 seconds)
10:20:51*mmohammadi9812 joined #nim
10:29:03*opal quit (Ping timeout: 240 seconds)
10:29:59*bung joined #nim
10:31:04*opal joined #nim
10:34:29bung@pmunch I'v create a PR for making nimlsp more stable please check.https://github.com/PMunch/nimlsp/pull/60
10:34:30disbotโžฅ Clean
11:03:54*mmohammadi9812 quit (Ping timeout: 256 seconds)
11:04:18*mmohammadi9812 joined #nim
11:08:00*narimiran quit (Ping timeout: 260 seconds)
11:12:56ForumUpdaterBotNew thread by HJarausch: Reference Variable (C++ jargon) - is there such a beast?, see https://forum.nim-lang.org/t/7051
11:15:35*mmohammadi9812 quit (Ping timeout: 256 seconds)
11:15:56*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
11:16:50*mmohammadi9812 joined #nim
11:17:19*pbb joined #nim
11:24:49*Tanger joined #nim
11:45:12*lritter joined #nim
11:50:45*waleee-cl joined #nim
11:55:48*Cthalupa quit (Ping timeout: 256 seconds)
11:57:21*Cthalupa joined #nim
12:03:22FromDiscord<lqdev> why is there no floorMod for ints? i have to do shit like this to get a modulus that's correct below 0 `tilePosition.x.float32.floorMod(world.width.float32).int32`
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:36*supakeen joined #nim
12:35:58*xet7 quit (Quit: Leaving)
12:43:30*Vladar joined #nim
12:49:10ForumUpdaterBotNew thread by HJarausch: Conditional expressions don't work in a formatted string, see https://forum.nim-lang.org/t/7052
13:18:24*Sembei joined #nim
13:23:09*Cthalupa quit (Ping timeout: 256 seconds)
13:24:38*Cthalupa joined #nim
13:35:43*leorize quit (Ping timeout: 240 seconds)
13:41:17FromGitter<ynfle> How do I test if a flot is `NaN`
13:41:55FromDiscord<Rika> Lol I do something really stupid for that
13:42:40FromDiscord<Rika> `theFloat!=theFloat`
13:43:36FromGitter<ynfle> Is that safe and all? there is `dom.isNaN` but that needs a `BiggestFloat`
13:44:13FromDiscord<haxscramper> https://nim-lang.org/docs/math.html#classify,float
13:45:02FromDiscord<lqdev> yea that still uses x != x
13:45:24FromDiscord<lqdev> https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/math.nim#L156
13:45:41FromDiscord<lqdev> i'd check the bits tho
13:45:43FromDiscord<lqdev> hold on
13:46:36FromDiscord<lqdev> a float is NaN if all exponent bits are set
13:46:48FromDiscord<lqdev> so you could just do a bitcast to an int64 or something
13:47:15FromDiscord<lqdev> and do a simple bitwise AND to check if all the exponent bits are set
13:47:28FromGitter<ynfle> Nah. I'm gonna stick with Rika suggestions. It seems like that is the way to go
13:48:15FromDiscord<Rika> Didnโ€™t know my dumb solution is actually what is used
13:49:09FromGitter<ynfle> I saw it on StackOverflow so it must be right ๐Ÿ˜‰
13:53:19*leorize joined #nim
14:01:04*natrys quit (Ping timeout: 246 seconds)
14:14:02*natrys joined #nim
14:35:01*narimiran joined #nim
14:35:42*tane joined #nim
14:37:03*leorize quit (Ping timeout: 240 seconds)
14:37:07*natrys quit (Ping timeout: 246 seconds)
14:37:27ForumUpdaterBotNew thread by HJarausch: Strange syntax - please explain, see https://forum.nim-lang.org/t/7053
14:38:24*leorize joined #nim
14:40:40FromDiscord<exelotl> lol
14:44:52*NimBot joined #nim
14:47:23*leorize quit (Ping timeout: 240 seconds)
14:51:35narimiranHJarausch, king of inconsistent styles
15:05:04*leorize joined #nim
15:21:39*lum quit (Quit: Lum: Bye!)
15:23:02*lum joined #nim
15:25:33FromGitter<Lecale> Does anyone feel like playing spot why json module produces an exception here https://play.nim-lang.org/#ix=2Dqy
15:43:59FromDiscord<Rika> @Lecale the spaces in the line are not actual spaces
15:44:03FromDiscord<Rika> https://media.discordapp.net/attachments/371759389889003532/775022829056819230/Screenshot_20201109-004319.png
15:44:54FromGitter<Lecale> ah, a windows problem then
15:48:00FromGitter<Lecale> I have to first double check for \194 character before processing
15:49:23*leorize quit (Ping timeout: 240 seconds)
15:49:39FromGitter<Lecale> and \160 too, thanks Rika
15:50:35*leorize joined #nim
16:02:18disruptekeven white boys have to shout,
16:02:23disruptek"baby got back"
16:19:43*leorize quit (Ping timeout: 240 seconds)
16:20:43*leorize joined #nim
16:23:05*sagax quit (Ping timeout: 240 seconds)
16:23:46Zevvfunny how I still hate macros while I still love macros
16:23:58disruptekmacros suck.
16:24:09ZevvI can now define my primitive functions for my Little Language in native nim without doing any interfacing
16:24:31Zevvthe cost of which is again a repugnant macro in my code
16:29:15disruptekthat sounds kinda badass.
16:31:09disruptekso frosty has a bug that only appears in refc.
16:31:41Zevvthat's nice
16:31:44Zevvobsolete that shit, I say
16:31:55disrupteki can't; i need to fix it for ic.
16:32:30disrupteki might have ic working today, btw.
16:32:36disruptekwell, the frontend cache anyway.
16:35:48Zevvbull
16:37:00disruptekthe frontend is much easier.
16:37:16disrupteknot even 2kloc.
16:37:39disruptekhalf that is the datastore.
16:47:01ZevvI say "hooray" for not needing sqlite
16:49:43Zevvthat would have been malodorous
16:50:30disruptekit just didn't buy us anything but an extreme number of bugs.
16:50:53disruptekbut araq says i need to "grow up" and write more buggy code.
16:51:23disruptekso, i dunno, my hot take on software quality is worthless, i guess.
16:51:47Zevvwell, he doesn't care anyways, right
16:52:04Zevvand is that "(more buggy) code" or "more (buggy code)"
16:52:15Zevvbecause writing more code is not feasibly, in your current condition I feel.
16:52:23Zevvlike, the condition where you are writing code 10 hours a day already
16:53:02disruptekwell, i write a lot of toy code that i throw away.
16:53:23Zevvbut, is it buggy?!
16:53:32disrupteki don't really write that much production stuff unless i'm really trying to complete a project.
16:53:39ZevvI hear you
16:53:52disruptekhis statement was "software should be *soft*"; mutable.
16:54:08Zevvyeah. but not broken by design
16:54:09Zevveither
16:54:10disrupteki agree with that. but i like my software to move from strength to strength.
16:54:33disrupteki like it to be correct, and when it changes, i like it to be no less correct than it was.
16:54:38ZevvI have the same. There's a very clear line between toy code and proper code
16:54:54disrupteki just feel that being able to depend upon software is where you draw strength.
16:54:58Zevv98% never leaves category #1. but once it does, I tend to take that seriously
16:55:18disruptekif i cannot depend on the code, it's basically worthless to me. it cannot be a part of many future abstractions.
16:55:24Zevvso right
16:55:43Zevvand there you have one of the reasons I do not like to depend on 3d party stuff
16:56:07Zevvoften it is very unclear what the authors intentions are, in terms of seriousness, stability
16:56:11disruptekyour npeg fix is making me bump like a dozen projects of mine.
16:56:17Zevvwhat fix
16:56:28disruptek> 0 -> > 1
16:56:33disruptek0.23.2
16:56:57disruptekand i'm putting the reqs in at < 1.0.0, so you had better take semver to heart.
16:57:10Zevvyes, I do, I do
16:57:15disrupteki think so, too.
16:57:22Zevvthis was a minor, but it added a check for a stupid mistake I kept making myself
16:57:29Zevv(this | that, such | so)
16:57:35disruptekgood, good.
16:57:40Zevvthat parsed, but threw away the "such | so"
16:58:48Zevvwould you look at all those nice little primitives. I can just defined them like that and then call them from my stuff
16:59:05disruptekabstraction, it's fucking glorious.
16:59:25disrupteki got into programming because i wanted to cheat.
16:59:36disruptekso all my code is, like, designed to be unbreakable.
17:00:18disruptekaraq's approach is to make a thing that works and let the community feedback drive future development. i really don't like that.
17:01:03disrupteki don't want to have to trust myself, let alone other users.
17:02:09disrupteklet's face it; i'm not trustworthy.
17:07:23*xet7 joined #nim
17:14:25*mmohammadi9812 quit (Read error: Connection reset by peer)
17:14:37*mmohammadi9812 joined #nim
17:15:21FromDiscord<Avatarfighter> Hello hello everyone
17:15:46disrupteksup dawg.
17:16:02FromDiscord<Avatarfighter> Whatchu working on
17:16:06FromDiscord<nikki> ๐Ÿ‘‹
17:16:40FromDiscord<haxscramper> Is it possible to print absolutely all macro expansions? I just want to count the number of macro-generated code lines
17:17:39disruptekyou might be able to use expandMacros from the cli to do this.
17:17:46*go|dfish quit (Ping timeout: 246 seconds)
17:18:13disrupteki'm working on trying to figure out why frosty doesn't pass refc tests for me locally.
17:18:46FromDiscord<haxscramper> It only works for single macro, and in my case it simply doesn't work at all for some reason
17:18:57disruptekhack it to work for all macros.
17:28:42FromDiscord<Avatarfighter> disruptek: is frosty not passing your tests new?
17:43:04*Kaivo quit (Quit: WeeChat 2.9)
17:45:24*ryuzak1[m] joined #nim
17:45:28disruptekit works in ci but i just noticed that something is broken locally. not sure what's up.
17:47:01Zevvso this ci of yours
17:47:07Zevvwhen is it "done"
17:47:36disruptekci or ic?
17:47:50Zevvic of course,dont be pedantic
17:48:04Zevvdoes it do nim itself, and all the tests?
17:48:23disruptekthe frontend cache is easy. the backend cache... i guess i have to wait for araq to come to jesus on it.
17:49:25FromDiscord<Kiloneie> Where is the full size of this emoji :nimAngry: ?
17:51:12FromDiscord<Kiloneie> I am sketching myself an intro animation(im terrible at art) and i like that icon
17:51:28Zevvdisruptek: some mess you worked yourself into
17:51:52disrupteki learned some lessons, to be sure.
17:56:18FromDiscord<Avatarfighter> @Kiloneie https://media.discordapp.net/attachments/371759389889003532/775056111798583356/bitmap.png
17:56:27FromDiscord<Avatarfighter> @ElegantBeef should have the svg for this
17:56:29FromDiscord<Avatarfighter> I think
18:00:29Zevvlessons like "keep to your own business"
18:00:35FromDiscord<Kiloneie> that would be great, i think i might modify it some, but i want this in the center, trying to make like door opening with this in the middle
18:01:10FromDiscord<Kiloneie> gonna have to put credits to you in the videos xD
18:01:23disrupteklessons like, "is rust really /that/ bad?"
18:01:35FromDiscord<Avatarfighter> disruptek: yes because its not nim
18:03:08FromDiscord<Kiloneie> uff, 3900x is 505โ‚ฌ on my default size i look for computers and 5900x is 737โ‚ฌ(3900x is as low as 450โ‚ฌ in other stores)... damn... might be forced to go 3900x if i will need more processing power in the months to come
18:03:45FromDiscord<Kiloneie> and 3950x is 807โ‚ฌ... better value than 5900x if you need production power
18:03:59FromDiscord<lqdev> isn't that a bit #offtopic ?
18:04:12FromDiscord<Kiloneie> god damn wrong channel
18:04:14FromDiscord<Kiloneie> xD
18:04:18FromDiscord<lqdev> lol
18:04:24FromDiscord<Kiloneie> i didn't check
18:05:07Zevvdisruptek: what does rust have to do with this then?
18:05:31FromDiscord<Avatarfighter> Zevv: probably nothing
18:05:50disruptekyou never want to learn how they make the sausage.
18:07:58*Vladar quit (Quit: Leaving)
18:25:22*hnOsmium0001 joined #nim
18:25:25*mmohammadi9812 quit (Quit: Quit)
18:34:30*disruptek sighs.
18:35:00disruptekthe object variant case changes are now hard errors outside of danger/release.
18:36:16FromDiscord<Avatarfighter> what changes?
18:36:38disruptek"assignment to discriminant changes object branch; compile with -d:nimOldCaseObjects for a transition period"
18:36:48FromDiscord<Avatarfighter> this is so sad
18:39:15disruptekwe'll get through it together.
18:40:27FromDiscord<ache of head> wholesome disruptek moment
18:40:28FromDiscord<ache of head> rare
18:44:47disruptekit really makes you think.
18:46:48*Vladar joined #nim
18:48:04Zevvwhat was this new thing to do a copy-before-in-place-operations on a thing
18:49:33disruptekdup?
18:49:55Zevvyah
18:50:09Zevvpff that syntax is funny
18:50:22Zevv`a.dup(sort)`
18:50:27ZevvWhy not `a.dup.sort()`
18:51:45disruptekdunno. i didn't take an interest in with/collect/dup/etc. because i figured i could never use them in nim-1.0 code.
18:52:19Zevvfair enough
18:53:37*mmohammadi9812 joined #nim
18:58:32*suchasurge9 joined #nim
18:59:02*suchasurge quit (Read error: Connection reset by peer)
18:59:02*suchasurge9 is now known as suchasurge
18:59:43*opal quit (Ping timeout: 240 seconds)
19:01:23*opal joined #nim
19:03:33FromDiscord<lqdev> Zevv: you know you can do this
19:03:40FromDiscord<lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2Ds1
19:04:01FromDiscord<lqdev> `a.dup.sort()` can't really be handled by macros
19:04:37Zevvno I see why it is. I'm just complaining about the resulting syntax looking silly.
19:05:13FromDiscord<lqdev> command call syntax is your friend: `a.dup sort()`
19:05:25Zevvyes but no but yes but
19:05:36FromDiscord<lqdev> yes
19:05:45Zevvnaively, one would expect `dup()` to be magic proc cloning whatever you feed it
19:06:03Zevvbut now it's turned inside-out
19:06:09disruptekit's pretty fucked up, you have to admit.
19:06:23Zevvwell, it lives in sugar for a reason right
19:06:28Zevvtoo much is bad for you
19:11:52*dom96 quit (Ping timeout: 246 seconds)
19:12:09disruptekit's one of those expensive zero-cost abstractions.
19:13:38*dom96 joined #nim
19:13:38*dom96 quit (Changing host)
19:13:38*dom96 joined #nim
19:27:23FromDiscord<nikki> for loops is all you need!
19:27:33*theelous3 joined #nim
19:53:42*Zoom[m] joined #nim
19:56:14Zevvzerofunctional
19:57:01disruptekdysfunctional, they call me. loopy, too.
20:04:39FromDiscord<lqdev> gosh
20:04:44FromDiscord<lqdev> why is there no `min` for uint32
20:07:07FromDiscord<nikki> whatcha using uint32 for
20:07:20FromDiscord<lqdev> efficiency.
20:09:39FromDiscord<nikki> is there min for int32
20:10:33FromDiscord<lqdev> yes
20:10:53FromDiscord<nikki> why not use int32 ๐Ÿ˜ฎ
20:11:29FromDiscord<lqdev> i'm using uint32 to represent item quantities
20:11:35FromDiscord<lqdev> you can't have -2 items
20:11:47narimiran`Natural`?
20:11:52FromDiscord<nikki> sure but the difference of two item quantities can be negative
20:12:00FromDiscord<lqdev> but you sure can have 4294967295
20:12:05FromDiscord<lqdev> and?
20:12:08FromDiscord<nikki> usually using unsigned for quantities seems off-base
20:12:24FromDiscord<nikki> to me it's made more sense for just representing bits
20:12:34narimiranhttps://nim-lang.github.io/Nim/system.html#Natural
20:12:35FromDiscord<lqdev> why?
20:12:46FromDiscord<nikki> another example is you can't iterate downto 0 by comparing >= 0
20:12:47FromDiscord<lqdev> i don't need to calculate the difference between two quantities anywhere?
20:12:49FromDiscord<lqdev> (edit) "anywhere?" => "anywhere"
20:13:18FromDiscord<lqdev> i'll try with Natural i guess
20:13:48FromDiscord<nikki> did you want the 32 bit for perf as u said
20:14:40FromDiscord<nikki> but yeah a lot of stuff like generic code that assumes that a - b < 0 <=> a < b breaks when unsigneds come in
20:14:52FromDiscord<nikki> and i can see how having min but having that break could break some concepts
20:19:13FromDiscord<lqdev> what baffles me is the lack of floorMod for ints. like yeah, i get it, `floor(myInt)` doesn't make sense, but `mod` is broken when you use it with negative integers so you have to dance around it like `tilePosition.x.float32.floorMod(world.width.float32).int32`
20:19:21FromDiscord<lqdev> that's an actual bit of code from my game.
20:19:34FromDiscord<lqdev> afact there is no other way of achieving the same result.
20:19:38disrupteksounds like a lot of fun to me.
20:19:39FromDiscord<lqdev> (edit) "afact" => "afaict"
20:19:43*leorize quit (Ping timeout: 240 seconds)
20:20:14FromDiscord<nikki> huh i see. you're going for the usual mod is just distance from the highest multiple lower than the value right?
20:20:18disruptekbut seriously, i agree. it's just hard fixing this stuff -- too many people who want to leave it the way it is.
20:20:49FromDiscord<lqdev> @nikki wdym
20:21:00disrupteki think it's likely that status has this stuff audited and cannot afford the breakage.
20:21:09FromDiscord<lqdev> disruptek: but there is no `floorMod` for ints at all, why not just add it to stdlib?
20:21:43disruptekit's not that; it's the whole unsigned problem itself.
20:22:08*leorize joined #nim
20:22:46FromDiscord<lqdev> @nikki the default `mod` breaks my tilemaps at negative coordinates because `-1 mod 8` is 0 and not -1
20:22:54FromDiscord<nikki> @lqdev just meant the standard mod behavior in eg. C -- a mod b is just distance of a from the left multiple of b on the number line
20:23:10FromDiscord<lqdev> yeah, probably
20:23:25FromDiscord<nikki> -1 mod 8 is 1 right?
20:23:32*sschwarzer joined #nim
20:23:34FromDiscord<nikki> wait no, 7
20:23:38FromDiscord<nikki> or something, idk lol
20:23:45FromDiscord<nikki> i guess -1 also works
20:24:09FromDiscord<nikki> how is it ever 0 lol wow
20:24:12FromDiscord<lqdev> or was it `div` that returned -1? either one returns the wrong thing and i have to do that weird dance from above
20:24:20FromDiscord<lqdev> :s/-1/0
20:24:45FromDiscord<lqdev> !eval import math; echo (-1 mod 8, floorMod(-1, 8))
20:24:48NimBot(-1, 7)
20:24:51FromDiscord<nikki> yeah that'll getcha in classic grid math
20:24:57FromDiscord<nikki> mod just works for grids
20:25:02FromDiscord<nikki> unless it's not mod
20:25:02FromDiscord<lqdev> yeah i told you it's -1
20:25:26FromDiscord<nikki> right yeah, the 7 was what i'd've expected
20:25:35FromDiscord<nikki> distance of -1 from -8
20:25:59sschwarzerI'd like to convert a template argument to a string, as in https://play.nim-lang.org/#ix=2DsC . Is this possible?
20:26:17FromDiscord<lqdev> sschwarzer: use astToStr
20:26:34FromDiscord<nikki> and probs needs to be a macro not a template right
20:26:38FromDiscord<lqdev> no
20:26:42FromDiscord<nikki> kj
20:26:43FromDiscord<lqdev> it works with templates too
20:26:46FromDiscord<nikki> (edit) "kj" => "kk"
20:26:56sschwarzerlqdve: will try, thanks :)
20:27:06FromDiscord<lqdev> @nikki anyways still, that doesn't explain that i have to dance around my mod issue with so many type conversions
20:27:11FromDiscord<lqdev> it's not readable. it's madness.
20:27:19FromDiscord<nikki> yeah for sure
20:27:29FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2DsE
20:27:35FromDiscord<nikki> maybe just make a distinct type lol with all ops doing what u want
20:27:42sschwarzerlqdev: works! :-)
20:27:53FromDiscord<lqdev> guess i can just add `floorMod(int, int)` to rapid/math/util lol
20:28:23FromDiscord<nikki> yea an engine ends up accumulating math utils regardless
20:28:41FromDiscord<nikki> could just go with the other scalar ops
20:28:42*mmohammadi9812 quit (Remote host closed the connection)
20:30:53FromDiscord<Avatarfighter> disruptek: https://github.com/guzba/zippy/tree/master/examples
20:30:58FromDiscord<Avatarfighter> zlib
20:31:08disruptekso what?
20:31:13*mmohammadi9812 joined #nim
20:31:27FromDiscord<Avatarfighter> you wanted a pure nim implementation the other day
20:31:43disrupteknot for zlib.
20:32:12FromDiscord<lqdev> oh wait hold on
20:32:16FromDiscord<lqdev> it's just glm messing with me
20:32:21FromDiscord<lqdev> i don't need to do this dance at all
20:32:36FromDiscord<lqdev> `floorMod` is defined for SomeNumber in math
20:32:47FromDiscord<Avatarfighter> oh i forgot
20:32:47FromDiscord<lqdev> but glm only has it for Vec2f and Vec2d
20:32:52FromDiscord<Avatarfighter> i mixed up zstandard and zlib
20:33:14disruptekit's alright, chucklehead.
20:33:46FromDiscord<guzba> hmm maybe ill have to learn about zstandard sometime
20:33:52FromDiscord<guzba> i did snappy already too
20:34:12disruptekyeah, we're using it in the compiler.
20:34:19disruptekgood stuff. thank you.
20:34:31FromDiscord<Avatarfighter> well whatever ill still use it
20:35:02FromDiscord<guzba> i hope ppl do, imo gzip etc is critical and having a real impl in the language itself saves a ton of pain
20:35:25disruptektruly. it's something araq asked me to work on, also.
20:36:06FromDiscord<guzba> i work with treeform a lot and he said it would be a good thing for nim so i went for it
20:36:56disruptekstdlib http needs to support compressed bodies, is the main thing.
20:39:11FromDiscord<guzba> yeah handling gzip transparently would be great
20:39:22*habamax quit (Ping timeout: 246 seconds)
20:42:41FromDiscord<nikki> @lqdev re: "using uint32" for perf -- was it because storing smaller size (32 bits) fits more stuff in cache or bc. unsigned ops are more performant or ...?
20:43:03*leorize quit (Ping timeout: 240 seconds)
20:43:04FromDiscord<lqdev> in retrospect it was kinda dumb actually
20:43:22FromDiscord<lqdev> i don't use this field that often anyways
20:43:23FromDiscord<nikki> i do really think it makes sense to stick with int, unless actually need some bit stuff
20:48:57*sschwarzer quit (Quit: leaving)
20:49:49*tane quit (Quit: Leaving)
20:51:01FromDiscord<krisppurg> hey @haxscramper from yesterday I've did your chunkStream proc and for some reason the outputStream is empty.
20:53:18FromDiscord<krisppurg> hold on lemme give you the code
20:53:43FromDiscord<haxscramper> If `ffmpeg` writes data to stdout it should not be empty. E.g. there is no other way for getting output data from process
20:53:47FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2DsZ
20:56:19FromDiscord<haxscramper> You `readAll` and then try to read more from stream. Of course it would be empty, what else?
20:56:46FromDiscord<krisppurg> I mean I've tried setPosition
20:57:04FromDiscord<haxscramper> It should not work for files/io streams
20:57:15FromDiscord<haxscramper> should not == raises exception
20:58:36ForumUpdaterBotNew thread by Guzba: Zippy: a dependency-free Nim implementation of deflate, gzip, zlib, zip, see https://forum.nim-lang.org/t/7054
20:58:50FromDiscord<Avatarfighter> i recognize this library ๐Ÿค”
20:58:52FromDiscord<guzba> spam all the places
20:58:53FromDiscord<guzba> ๐Ÿ™‚
20:59:52*kinkinkijkin joined #nim
20:59:55*leorize joined #nim
21:02:30*xet7 quit (Remote host closed the connection)
21:02:40FromDiscord<krisppurg> So, I've also tried readDataStr and still nothing
21:06:25FromDiscord<haxscramper> @krisppurg without `readAll` ?
21:06:34FromDiscord<krisppurg> yed
21:06:37FromDiscord<krisppurg> (edit) "yed" => "yes"
21:08:21Prestige@treeform I'm looking at the fidget examples, and it seems like the text shifts up when editing https://i.imgur.com/DiUSli8.png is this a known bug?
21:10:47*aethylia joined #nim
21:11:09FromDiscord<haxscramper> @krisppurg I don't know what could be causing this - yesterday's code worked just fine, the one you just pasted works too - if you remove `readAll` - (https://play.nim-lang.org/#ix=2Dt4 ) so my guess that it is either some funny things with how `ffmpeg` writes data (unlikely but possible) or something else that I don't know of.
21:11:33FromDiscord<krisppurg> hax do you have ffmpeg installed?
21:11:39FromDiscord<haxscramper> yes
21:11:53FromDiscord<krisppurg> I'll give you the command
21:12:23FromDiscord<krisppurg> `ffmpeg -i ./AUDIOFILE -ac 2 -ar 48k -f s16le -acodec libopus -loglevel quiet pipe:1`
21:12:30FromDiscord<krisppurg> (edit) removed ""
21:13:38*solitudesf quit (Ping timeout: 256 seconds)
21:15:27*abm joined #nim
21:16:11aethyliahey everyone. Is there a way to use asyncnet.recvInto with a dynamic buffer? I've tried with a sequence but get Illegal storage access
21:16:36FromDiscord<lqdev> how are you calling recvInto?
21:16:42FromDiscord<haxscramper> @krisppurg https://play.nim-lang.org/#ix=2Dt6 - works just fine
21:16:57FromDiscord<krisppurg> wtf
21:17:00FromDiscord<haxscramper> `aa.mp3` is just some random junk I had laying around, but otherwise no issues
21:17:24aethyliatrying to use it with an AsyncSocket
21:17:47FromDiscord<lqdev> aethylia: i don't care what you're trying to use it with, show me the call to recvInto.
21:18:03FromDiscord<lqdev> i have a hunch you're trying to do `addr yourSeq`, which is incorrect
21:18:08aethyliavar payloadBytes = newSeq[uint8](payloadLen) discard await client.recvInto(addr payloadBytes, payloadLen)
21:18:16FromDiscord<lqdev> yeah.
21:18:22FromDiscord<lqdev> you need to do `addr payloadBytes[0]`
21:18:28aethyliaahh
21:18:32aethyliathank you very much
21:18:37FromDiscord<lqdev> because the seq has a header at the beginning
21:19:01aethyliaawesome I thought that was why it wasn't working but didn't know the fix
21:19:09aethyliaappreciate the quick response, thanks aain
21:19:12FromDiscord<lqdev> so if you're passing `addr payloadBytes` you're overwriting that header and messing something up
21:20:03FromDiscord<lqdev> you wanna get a pointer to the first element, not the header, so you use `addr yourSeq[0]`
21:20:10*narimiran quit (Quit: leaving)
21:21:43aethyliaMakes sense, that's done the job
21:23:00PrestigeDoesn't nimble doc only generate for one file? I there a way to do this for all files in a nimble package?
21:23:57disrupteknim doc --project --outdir=docs
21:24:02FromDiscord<lqdev> Prestige: https://nim-lang.org/docs/docgen.html#introduction-quick-start
21:24:22Prestigeoh I didn't know about nim doc, cool. Thakns
21:24:42FromDiscord<lqdev> i think nimble doc just passes the args to nim doc anyways
21:26:28Zoom[m]Hi everyone. Trying to use Nim as my go-to for simple scripts. ATM rying to process a list of strings with an external process. How can I add some parallel execution for this? https://play.nim-lang.org/#ix=2Dt8
21:26:35FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2Dt9
21:26:43FromDiscord<krisppurg> sorry for the slight flood guys
21:26:45Zoom[m]In Rust i'd slap some Rayone magic on it easily
21:27:45Zoom[m]But can't get my head around {.experimental: "parallel".} or Weave here
21:27:55FromDiscord<krisppurg> @haxscramper incase if you aren't around
21:28:21FromDiscord<haxscramper> I'm around for next ~30 seconds and then going to sleep
21:28:30FromDiscord<krisppurg> oof
21:30:01FromDiscord<krisppurg> lemme post the error I got
21:30:24FromDiscord<haxscramper> Link whole code too - I will look at it later
21:31:02FromDiscord<krisppurg> alright then
21:31:04FromDiscord<krisppurg> https://play.nim-lang.org/#ix=2Dtb
21:31:38FromDiscord<krisppurg> full code https://play.nim-lang.org/#ix=2Dtc
21:31:46FromDiscord<krisppurg> inb4 leaks
21:32:36FromDiscord<haxscramper> Just to clarify - I know little to nothing about async/etc so judging from the error I would be of lite help here regardless
21:33:11FromDiscord<krisppurg> I know exactly where would the error come from and why
21:33:40FromDiscord<krisppurg> (edit) "I know exactly where would the error come from and why ... " added "it comes from there"
21:53:44*Vladar quit (Quit: Leaving)
21:55:52*lritter quit (Quit: Leaving)
22:00:46FromDiscord<treeform> @Prestige Yeah its a bug I also have. I am doing some big changes in my fidget/mirror branch. Hopefully it will fix this issue too.
22:01:15PrestigeCool, thanks!
22:11:26*Jjp137 quit (Ping timeout: 264 seconds)
22:11:44FromDiscord<treeform> I think if you change it to vTop, hLeft it will work normally.
22:19:39*Jesin quit (Quit: Leaving)
22:25:18*aethylia quit (Remote host closed the connection)
22:31:03*a_chou joined #nim
22:35:57*lotuseater joined #nim
22:38:02FromDiscord<Daniel> cant wait for for fidget tutorial, for total noobs
22:47:38*Jesin joined #nim
23:09:30*vesper11 joined #nim
23:09:34*vesper quit (Ping timeout: 265 seconds)
23:23:30*lotuseater quit (Remote host closed the connection)
23:29:13FromGitter<gogolxdong> Does https://github.com/facebook/zstd work for video?
23:41:14Zoom[m]gogolxdong, it's a general purpose compressor and they usually work poorly on media. If it's already compressed with any lossy codec such as h264 it won't do any good.
23:49:36FromDiscord<Daniel> Indeed, video is already compressed data
23:49:46disruptekyou're blowin' my mind right now.
23:50:15FromDiscord<Daniel> like inception
23:50:24FromDiscord<Daniel> compression within compression ๐Ÿ™ƒ
23:59:55*a_chou quit (Ping timeout: 246 seconds)