<< 22-04-2023 >>

00:00:48FromDiscord<Elegantbeef> Cause... echo supports it
00:01:10FromDiscord<Elegantbeef> `echo "hello", " world", 100, 300, (10, 20)` is valid
00:13:31*lucasta joined #nim
00:13:49*derpydoo joined #nim
01:03:07FromDiscord<voidwalker> https://nim-lang.org/docs/sequtils.html#maxIndex%2CopenArray%5BT%5D
01:03:31FromDiscord<voidwalker> wouldn't it be normal to also have a maxIndexes func that returns a list of all indexes where the maximum is ?
01:05:44*krux02 quit (Remote host closed the connection)
01:05:57FromDiscord<morgan> In reply to @louis77 "Or anyone tried Tabnine": i disabled tabnine for nim. it always made bad suggestions on creating new procs, it did not understand the =, and i don’t remember the rest of it being that much better. i just use vscode’s completions
01:06:18FromDiscord<morgan> or rather, added nim to tabnine’s list of languages to ignore
01:06:28FromDiscord<morgan> it wasn’t even a suggestion in the list
01:26:59FromDiscord<Elegantbeef> "prs welcome"↵(@voidwalker)
02:26:44*azimut quit (Ping timeout: 255 seconds)
02:30:20FromDiscord<System64 ~ Flandre Scarlet> Can't arrays be considered as OpenArray? https://media.discordapp.net/attachments/371759389889003532/1099160230522277928/image.png
02:30:26FromDiscord<michaelb.eth> once I sorted out projectMapping for one of my repos, such that nimlangserver + Emacs lsp-mode are working properly, wow, such a big quality of life improvement
02:30:56FromDiscord<michaelb.eth> random, I know, just feeling very happy about nimlangserver
02:31:09FromDiscord<Rika> In reply to @System64 "Can't arrays be considered": They are, but T isn’t Pixel
02:31:14FromDiscord<Rika> It has to be
02:31:34FromDiscord<Rika> (edit) "In reply to @System64 "Can't arrays be considered": They are, but ... T" added "your"
02:31:46FromDiscord<System64 ~ Flandre Scarlet> Oh god wtf??↵So I can't send raw data of bytes??
02:31:57FromDiscord<Rika> I don’t know
02:32:07FromDiscord<Rika> I don’t know how that library works
02:41:24FromDiscord<System64 ~ Flandre Scarlet> I try to cast it, but seems it doesn't work https://media.discordapp.net/attachments/371759389889003532/1099163013140979742/image.png
02:41:42FromDiscord<Elegantbeef> ptr
02:43:01FromDiscord<System64 ~ Flandre Scarlet> Still not happy with that https://media.discordapp.net/attachments/371759389889003532/1099163420667953163/image.png
02:48:08FromDiscord<that_dude> wouldn't you need to deref post cast?
02:48:31FromDiscord<Yardanico> In reply to @System64 "Still not happy with": show the compile error
02:48:34FromDiscord<Yardanico> it will tell what argument is not the same
02:48:51FromDiscord<Yardanico> ah nvm that proc just doesn't have an overload for that
02:48:58FromDiscord<Yardanico> you don't need to have a cast here at all
02:48:59FromDiscord<faldor20> sent a code paste, see https://play.nim-lang.org/#ix=4tYv
02:49:10FromDiscord<that_dude> you mean the mapit function?
02:49:15FromDiscord<Yardanico> In reply to @faldor20 "Hey does nim have": no, but you can use collect or write your own
02:49:20FromDiscord<Yardanico> In reply to @that_dude "you mean the mapit": they mean map with index
02:49:29FromDiscord<that_dude> ah like an enumerate
02:49:54FromDiscord<System64 ~ Flandre Scarlet> In reply to @Yardanico "you don't need to": Ah alright, so what should I do?
02:50:06FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4tYw
02:50:15FromDiscord<Yardanico> In reply to @System64 "Ah alright, so what": what type is tex?
02:50:38FromDiscord<faldor20> sent a code paste, see https://play.nim-lang.org/#ix=4tYx
02:50:43FromDiscord<System64 ~ Flandre Scarlet> In reply to @Yardanico "what type is tex?": array of bytes, raw pixel data
02:51:26FromDiscord<Yardanico> wait, that proc expects a container of pixels, does each pixel = 1 element in your array?
02:51:44FromDiscord<System64 ~ Flandre Scarlet> no idea at all :/
02:51:58FromDiscord<Yardanico> found the proc you're using https://media.discordapp.net/attachments/371759389889003532/1099165671868354560/image.png
02:51:59FromDiscord<Yardanico> lets see
02:52:48FromDiscord<System64 ~ Flandre Scarlet> concept↵What is this?? https://media.discordapp.net/attachments/371759389889003532/1099165882548228096/image.png
02:53:22FromDiscord<that_dude> https://nim-lang.org/docs/manual_experimental.html#concepts for the manual
02:53:25FromDiscord<Yardanico> it just describes that any type that has a `kind` proc that returns a PixelFormat can be a Pixel
02:53:40FromDiscord<Yardanico> it's for better generic programming
02:54:15FromDiscord<Yardanico> I think you should either use the low-level raylib function directly, or write code that satisfies naylib
02:54:30FromDiscord<Yardanico> have you checked the examples in naylib?
02:54:40FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1099166348942250004/image.png
02:54:41FromDiscord<that_dude> As long as the input type matches the concept conditions, ie have the outlined procs and conditions it can be used in there
02:54:53FromDiscord<System64 ~ Flandre Scarlet> Oh wait↵Isn't it like interfaces in Java or something?
02:55:03FromDiscord<that_dude> (edit) "in there" => "as a working "type""
02:55:04FromDiscord<System64 ~ Flandre Scarlet> In reply to @Yardanico "": Yeah I want to do something like that
02:55:06FromDiscord<Yardanico> a bit, but concepts are compile-time only, you can't have a sequence of them for example
02:55:16FromDiscord<System64 ~ Flandre Scarlet> Oh alright
02:55:26FromDiscord<Yardanico> for runtime concepts = interfaces there's <https://github.com/yglukhov/iface>
02:56:17FromDiscord<Yardanico> In reply to @System64 "Oh alright": reading naylib examples, i think you're supposed to be using naylib for loading the image too
02:56:40FromDiscord<Yardanico> with `loadImage`
02:56:58FromDiscord<Yardanico> basically see <https://github.com/planetis-m/raylib-examples/blob/main/textures/image_processing.nim>
02:57:04FromDiscord<System64 ~ Flandre Scarlet> The thing is another lib generates a framebuffer
02:58:17FromDiscord<Yardanico> then you have to convert it to a raylib image
02:58:34FromDiscord<System64 ~ Flandre Scarlet> But this framebuffer is updated each frame
02:58:36FromDiscord<Yardanico> have you seen this? https://media.discordapp.net/attachments/371759389889003532/1099167339943055380/image.png
02:59:46FromDiscord<Yardanico> this uses raylib's LoadImageFromMemory
02:59:56FromDiscord<System64 ~ Flandre Scarlet> It works if the picture is PNG, JPG and stuff like that↵But not from raw pixel data
03:29:10*lucasta quit (Ping timeout: 250 seconds)
03:33:12FromDiscord<Elegantbeef> There are `FromPriv` procedures but not exported
03:34:06FromDiscord<Elegantbeef> Whoops i mean `loadImageRaw`
03:38:48FromDiscord<Yardanico> beef, that won't work either
03:38:52FromDiscord<Yardanico> since loadImageRaw loads from a file
03:38:55FromDiscord<Yardanico> not from a buffer
03:39:44FromDiscord<Elegantbeef> Odd
03:40:56FromDiscord<Yardanico> but yeah, the probable way here is to just cast your own image to raylib's image and then copy it so raylib owns the data
03:41:12FromDiscord<Yardanico> copy because otherwise you'd have to manage the memory of the buffer for the whole program life
03:41:17FromDiscord<Yardanico> raylib does have `ImageCopy`
03:58:15*TakinOver joined #nim
05:45:46*cm_ joined #nim
05:45:59*cm quit (Quit: Bye.)
05:46:02*cm_ is now known as cm
05:53:04*GreaseMonkey quit (Quit: No Ping reply in 180 seconds.)
05:54:51*greaser|q joined #nim
05:56:22*greaser|q quit (Changing host)
05:56:22*greaser|q joined #nim
05:56:24*greaser|q is now known as GreaseMonkey
06:05:30NimEventerNew thread by Luethlee: Why nim discord library is slower than python's discord library?, see https://forum.nim-lang.org/t/10119
06:26:00*Notxor joined #nim
07:12:25*Notxor quit (Remote host closed the connection)
07:20:05*cm quit (Ping timeout: 240 seconds)
07:22:37*cm joined #nim
07:35:02FromDiscord<Michal Maršálek> Hi, I created a forum post on CodinGame suggesting adding Nim to that site. I think it could be a good advertisement for Nim and some people might learn (about) Nim that way. It would be great if you could express your support: https://www.codingame.com/forum/t/nim-language-on-codingame/200375
08:01:05*derpydoo quit (Ping timeout: 240 seconds)
08:01:54*azimut joined #nim
08:17:55FromDiscord<Yardanico> I mean, those platforms are commercial so they're not very likely to add support for niche languages
08:18:06FromDiscord<Yardanico> I think only a few platforms like this support Nim
08:19:37FromDiscord<Yardanico> I wonder if these platforms could benefit from wasm
08:20:39FromDiscord<Yardanico> I mean if all they do is check the output, then supporting wasm is a no brainer, just do it
10:08:45NimEventerNew thread by noah: How to set hint/warningAsError switches in config.nims?, see https://forum.nim-lang.org/t/10121
10:08:58FromDiscord<Yardanico> Another interesting thread (missed): https://forum.nim-lang.org/t/10120
10:09:03FromDiscord<Yardanico> (edit) "(missed):" => "(missed by bot):"
10:36:50FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4tZC
10:36:53FromDiscord<Z3NTL3> however when i read the docs, i dont see what ive done wrong
10:41:03FromDiscord<Z3NTL3> and also what i dont understand is how , startProcess returns a string from what i see in the ss but how can a string have a method https://media.discordapp.net/attachments/371759389889003532/1099283718633439282/image.png
10:41:32FromDiscord<Z3NTL3> btw everything works till that var outp section
10:41:54FromDiscord<Z3NTL3> (edit) "how ," => "that"
10:42:09FromDiscord<Z3NTL3> it makes me confused can someone help and explain
10:47:16FromDiscord<planetis> Guys, just ping me.
10:47:23FromDiscord<planetis> See the example https://github.com/planetis-m/raylib-examples/blob/main/textures/raw_data.nim
10:47:53FromDiscord<Yardanico> In reply to @planetis "Guys, just ping me.": the point is that this example doesn't help ;)
10:48:03FromDiscord<Yardanico> they wanted to load an image that they have raw pixels of in memory, not in a file
10:48:06FromDiscord<Yardanico> raylib offers no such function
10:48:13FromDiscord<Yardanico> loadImageRaw is only for files
10:49:06FromDiscord<planetis> Yes it does. loadTextureFromData the Pixel concept let's you define the format of the raw data
10:49:58FromDiscord<planetis> So for type Color it's https://github.com/planetis-m/naylib/blob/main/src/raylib.nim#L1946 UncompressedR8g8b8a8
10:50:30FromDiscord<Z3NTL3> In reply to @Z3NTL3 "and also what i": can someone explain i am so confused
10:51:33FromDiscord<Yardanico> In reply to @Z3NTL3 "and also what i": wdym by a method?
10:52:13FromDiscord<Yardanico> wait, why are you calling the `impl` and not just normal write
10:52:24FromDiscord<Z3NTL3> In reply to @Z3NTL3 "and also what i": look in the code above i used startProcess in ``taak`` var but the taak var ``.inputStream`` can be executed without any problem, but the docs said it returns a string, so how can that work?
10:52:27FromDiscord<Yardanico> also addr(yes) is wrong, you need addr yes[0]
10:52:41FromDiscord<Yardanico> In reply to @Z3NTL3 "look in the code": because startProcess and execProcess are different procedures
10:52:45FromDiscord<Yardanico> evident by the name
10:52:49FromDiscord<planetis> In reply to @planetis "So for type Color": If you need a different interface just copy what that function does, loadTextureFromImage is public
10:53:00FromDiscord<Yardanico> @Z3NTL3 do you just want random exe files or just python?
10:53:11FromDiscord<Yardanico> in the latter case you can just use https://github.com/yglukhov/nimpy
10:53:15FromDiscord<Z3NTL3> i want to run a python script
10:53:21FromDiscord<Yardanico> yeah, so just use nimpy :)
10:53:43FromDiscord<Yardanico> and as for a python script - you can just edit it so that it takes input as an cli argument instead of stdin
10:53:49FromDiscord<Yardanico> so then you don't have to deal with writing to input stream
10:53:51FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4tZG
10:54:02FromDiscord<Z3NTL3> im new into Nim and it looks very confusing the docs etc
10:54:53FromDiscord<Z3NTL3> In reply to @Z3NTL3 "and also what i": I see from the docs for example here, that this proc returns a string but its not a string bcs i can implement method calls on it. And the docs never say something about that
10:54:58FromDiscord<Z3NTL3> i get so lost in the dirty dust
10:55:14FromDiscord<Z3NTL3> I ve worked in Go, Typescript etc and it looks so confusing, just why 😄
10:55:56FromDiscord<Yardanico> In reply to @Z3NTL3 "I see from the": again
10:56:01FromDiscord<Yardanico> you're looking at two different procs
10:56:07FromDiscord<Yardanico> startProcess and execProcess are different ones
10:56:11FromDiscord<Yardanico> one returns a string, the other returns a process
10:56:36FromDiscord<Z3NTL3> startProcess returns a string, but how does the ``taak.inputStream()`` work?
10:56:45FromDiscord<Yardanico> In reply to @Z3NTL3 "startProcess returns a string,": it doesn't return a string, please read what I said again
10:56:48FromDiscord<Z3NTL3> i get no error on that
10:56:56FromDiscord<Z3NTL3> In reply to @Yardanico "it doesn't return a": if it doesnt why the docs say it does
10:57:04FromDiscord<Z3NTL3> For me as reader i get so confused
10:57:16FromDiscord<Yardanico> In reply to @Z3NTL3 "if it doesnt why": please read again, you're reading docs for a different procedure
10:57:18FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/1099287809816264704/image.png
10:57:27FromDiscord<Yardanico> it returns owned(Process), discard the `owned` part, you just see that it returns `Process`
10:57:39FromDiscord<Z3NTL3> pjj
10:57:39FromDiscord<Yardanico> execProcess returns a string, but that's a different proc https://media.discordapp.net/attachments/371759389889003532/1099287898437722194/image.png
10:57:43FromDiscord<Z3NTL3> ohh
10:57:46FromDiscord<Z3NTL3> i looked at execProcess
10:57:51FromDiscord<Z3NTL3> bruh
10:57:53FromDiscord<Yardanico> yes, but you're calling startProcess
10:58:08FromDiscord<Yardanico> but anyway, you can actually have "methods" attached to any type in Nim since Nim has UFCS
10:58:14FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax
10:58:21FromDiscord<Yardanico> but that's not related to this question
10:58:49FromDiscord<Yardanico> @Z3NTL3 working example:
10:58:55FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4tZH
10:59:20FromDiscord<Yardanico> Process' input and output streams are actually the Stream type, and to do high-level stuff on them you need to import std/streams
10:59:23FromDiscord<Z3NTL3> and where can i see the docs for what the Process exactly is i only see ref ProcessObj https://media.discordapp.net/attachments/371759389889003532/1099288335324807228/image.png
10:59:28FromDiscord<Z3NTL3> im new into nim so i really dunno
10:59:35FromDiscord<Yardanico> In reply to @Z3NTL3 "and where can i": you'll find ProcessObj directly below
10:59:47FromDiscord<Yardanico> ah i see, it's not exported here
10:59:50FromDiscord<Z3NTL3> i see only enum values
11:00:01FromDiscord<Yardanico> yes, in this case you don't need to know any of the fields
11:00:11FromDiscord<Yardanico> all the procs you can call on a Process are documented in the file
11:00:19FromDiscord<Yardanico> https://nim-lang.org/docs/osproc.html#inputStream%2CProcess
11:00:24FromDiscord<Yardanico> https://nim-lang.org/docs/osproc.html#outputStream%2CProcess
11:00:57FromDiscord<Z3NTL3> oke ty bro
11:00:57FromDiscord<Yardanico> ah right, in my working example I forgot to add `taak.close()` which is needed to close all handles when the process is done executing
11:00:58FromDiscord<Z3NTL3> i was so lost
11:01:12FromDiscord<Yardanico> if that python script isn't big you could just rewrite it in NIm
11:01:14FromDiscord<Yardanico> (edit) "NIm" => "Nim"
11:01:48FromDiscord<Z3NTL3> im not doing something for release just a exercise for me self to learn Nim so nothing important
11:01:50FromDiscord<Z3NTL3> https://media.discordapp.net/attachments/371759389889003532/1099288949287030865/image.png
11:01:53FromDiscord<Z3NTL3> and one more question
11:01:56FromDiscord<Z3NTL3> what does this star mean
11:01:59FromDiscord<Yardanico> In reply to @Z3NTL3 "im not doing something": well that doesn't seem like a good starting place :)
11:02:09FromDiscord<Yardanico> In reply to @Z3NTL3 "what does this star": it means that the symbol (proc/field/etc) is exported
11:02:15FromDiscord<Z3NTL3> ohh okey
11:02:16FromDiscord<Yardanico> again, you don't need to look at StreamObj
11:02:27FromDiscord<Yardanico> those procs are low-level, you call high-level ones that are documented in the module itself and are shown in examples
11:02:38FromDiscord<Yardanico> https://nim-lang.org/docs/streams.html#write%2CStream%2Cstring
11:02:39FromDiscord<Z3NTL3> and what i see here right is a way of "OOP" in Nim right? https://media.discordapp.net/attachments/371759389889003532/1099289157681025134/image.png
11:03:00FromDiscord<Z3NTL3> it represents this right? https://media.discordapp.net/attachments/371759389889003532/1099289246055022592/image.png
11:03:11FromDiscord<Yardanico> In reply to @Z3NTL3 "and what i see": Nim has real methods with inheritance, this here is just a way of implementing interfaces with tuples
11:03:16FromDiscord<Yardanico> i mean procs in object
11:03:25FromDiscord<Yardanico> In reply to @Z3NTL3 "it represents this right?": no, it's just a field in an object where you assign a procedure
11:03:36FromDiscord<Yardanico> so you can inherit from a Stream and override those procs with your own that are fit for your type
11:03:42FromDiscord<Yardanico> so then all the default stream procs also work on your stream type
11:04:11FromDiscord<Yardanico> learning like this might be a little too weird, it's better to read the docs on the basics of the language first :)
11:04:28FromDiscord<Z3NTL3> yea i read for most of part 1 but not complete
11:04:34FromDiscord<Yardanico> is <https://github.com/Z3NTL3/CloudflareIPTables/blob/main/cf.py> the script you're trying to run in nim?
11:04:41FromDiscord<Yardanico> it's quite easy to rewrite in nim
11:04:41FromDiscord<Z3NTL3> no
11:04:44FromDiscord<Yardanico> oh okay
11:04:48FromDiscord<Z3NTL3> https://media.discordapp.net/attachments/371759389889003532/1099289700142948393/image.png
11:04:51FromDiscord<Z3NTL3> i was just testing
11:04:54FromDiscord<Yardanico> okay
11:04:55FromDiscord<Z3NTL3> to write to stdin
11:05:03FromDiscord<Z3NTL3> (edit) "to write to ... stdinof" added "the" | "thestdin ... " added "of a spawned process"
11:11:34FromDiscord<Z3NTL3> @Yardanico yo the code u send did exit before writing to the stdin of the process
11:11:43FromDiscord<Z3NTL3> it had to print > y https://media.discordapp.net/attachments/371759389889003532/1099291437889232936/image.png
11:11:52FromDiscord<Z3NTL3> but the code looks fine so idk why
11:13:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4tZK
11:13:30FromDiscord<Z3NTL3> ye that worked
11:13:57FromDiscord<Z3NTL3> everytime you loop over readline the buffer get more and more reduced in N size of the read value right
11:14:20FromDiscord<Z3NTL3> (edit) "everytime you loop over readline the buffer get more and more reduced in N size of the read value right ... " added "compared to the X size of the buffer until 0"
11:14:21FromDiscord<Yardanico> no, this is reading by line
11:14:32FromDiscord<Z3NTL3> k
11:19:51FromDiscord<Z3NTL3> can u explain one more thing
11:19:52FromDiscord<Z3NTL3> https://media.discordapp.net/attachments/371759389889003532/1099293492007673856/image.png
11:21:01FromDiscord<Yardanico> this proc is overloaded
11:21:04FromDiscord<Yardanico> you're looking at the wrong overload
11:21:09FromDiscord<Z3NTL3> i see here the proc requires a stream as argument↵↵but we did directly do outp.readLine(), how is that even possible? It said we had to give the stream as argment so readLine(taak)
11:21:14FromDiscord<Z3NTL3> (edit) "readLine(taak)" => "readLine(outp)"
11:21:16FromDiscord<Yardanico> the one I'm calling is the one with two arguments - the stream and line
11:21:38FromDiscord<Yardanico> nim is quite different from go, nim has overloading and ufcs
11:21:44FromDiscord<Yardanico> https://nim-lang.org/docs/streams.html#readLine%2CStream%2Cstring i used this overload
11:21:49FromDiscord<Yardanico> and regarding ufcs see https://nim-lang.org/docs/manual.html#procedures-method-call-syntax
11:22:00FromDiscord<Yardanico> basically, in Nim `a.b()` is usually 100% the same as `b(a)`
11:22:04FromDiscord<Yardanico> even for all the default types
11:22:16FromDiscord<Yardanico> so you're not forced to use methods/classes just to get the nice dot call syntax
11:22:34FromDiscord<Michal Maršálek> In reply to @Yardanico "I mean, those platforms": Sure but if they did that, it would be nice. The thread was merged with a general poll about languages to add and Nim doesn't look that bad in that poll.
11:22:50FromDiscord<Yardanico> so `outp.readLine(line)` is the same as `readLine(outp, line)`
11:23:05FromDiscord<Z3NTL3> so ur using this but the stream arg is empty?. https://media.discordapp.net/attachments/371759389889003532/1099294294860365874/image.png
11:23:07FromDiscord<Yardanico> In reply to @Michal58 "Sure but if they": yeah replit added nim because of a similar poll too, although nowadays their version is outdated and there's a community template for the newest nim
11:23:13FromDiscord<Yardanico> In reply to @Z3NTL3 "so ur using this": please read what I said above
11:23:27FromDiscord<Z3NTL3> k
11:23:53FromDiscord<Z3NTL3> Ohhh
11:23:54FromDiscord<Z3NTL3> thnx
11:23:56FromDiscord<Z3NTL3> now i get to understand it
11:24:07FromDiscord<Z3NTL3> at first i was like "whatte f"
11:29:56FromDiscord<Z3NTL3> sent a code paste, see https://paste.rs/8eM
11:30:23FromDiscord<Z3NTL3> (edit) "https://paste.rs/98Q" => "https://play.nim-lang.org/#ix=4tZL"
11:30:31FromDiscord<Z3NTL3> (edit) "https://play.nim-lang.org/#ix=4tZL" => "https://play.nim-lang.org/#ix=4tZN"
11:30:43FromDiscord<Z3NTL3> and why is that
11:40:18FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4tZP
11:59:54FromDiscord<xTrayambak> ha, what happened to nimble? https://media.discordapp.net/attachments/371759389889003532/1099303564859428955/image.png
12:00:09FromDiscord<xTrayambak> (edit) "nimble?" => "nimble's directory?"
12:35:44*beholders_eye joined #nim
12:51:32FromDiscord<Weldify> how do i depend on a specific branch of a nimble package? i need to depend on the `windows` branch of naylib
12:51:56FromDiscord<Weldify> tried doing `requires "naylib#windows >= 4.5.1"` but it doesnt seem to work
12:52:30FromDiscord<Yardanico> try naylib@windows
12:52:33FromDiscord<Yardanico> but not sure
12:53:17FromDiscord<Weldify> oh whoops, it appears like i got the version wrong, the versioning for the windows branch is inconsistent
12:55:05FromDiscord<Z3NTL3> In reply to @xTrayambak "ha, what happened to": noo nginx, yes to caddyserver ⚡
12:57:47NimEventerNew thread by tcheran: EU Cyber Resilience Act impact on Open Source community, see https://forum.nim-lang.org/t/10123
12:59:40FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4u00
13:00:00FromDiscord<Z3NTL3> (edit) "https://play.nim-lang.org/#ix=4u00" => "https://play.nim-lang.org/#ix=4u01"
13:00:10FromDiscord<Z3NTL3> (edit) "https://play.nim-lang.org/#ix=4u01" => "https://paste.rs/6YO"
13:00:16FromDiscord<Z3NTL3> sent a code paste, see https://paste.rs/hDd
13:02:02*jmdaemon quit (Ping timeout: 250 seconds)
13:02:13FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4u02
13:03:38FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4u03
13:03:58FromDiscord<Z3NTL3> big bruh
13:04:26FromDiscord<Z3NTL3> (edit) "big bruh ... " added "sometimes i dont read good enough or skip parts of reading"
13:06:00FromDiscord<Rika> You’ll get used to reading well
13:06:13FromDiscord<Rika> In reply to @Z3NTL3 "noo nginx, yes to": Still kinda sucks needing to recompile for a plug-in though
13:41:16NimEventerNew Nimble package! niscv - Nim powered RISC-V virtual machine and emulator., see https://gitlab.com/OFThomas/niscv
13:43:21*fredrik92 joined #nim
13:44:02*fredrikhr quit (Killed (NickServ (GHOST command used by [email protected])))
13:44:08*fredrik92 is now known as fredrikhr
13:44:27*fredrikhr92 joined #nim
13:54:34*PMunch joined #nim
14:10:18FromDiscord<Rika> nice
14:57:10FromDiscord<Dimi> Hi All!↵When we parse json to the object, how we flagging some of the attributes as non-mandatory?↵In Go-lang there's `json:omitempty` directive in struct. Do we have something similar in Nim?
14:57:22FromDiscord<Dimi> (edit) "Hi All!↵When we parse json to the object, how we ... flagging" added "are"
14:58:05FromDiscord<Yardanico> not in the stdlib, you can use jsony
14:58:09FromDiscord<Yardanico> <https://github.com/treeform/jsony>
14:58:22FromDiscord<Dimi> Awesome! Thanks!
14:59:00FromDiscord<Dimi> I was using std and faced with this behavior
15:07:48*arkurious joined #nim
15:12:20FromDiscord<deech> Is there any way to make `--expandArc` more fine grained, as it stands outside of toy examples it's difficult to actually use in larger projects. Here's couple of use cases I'd like if possible, just two of many:↵- pass a qualified name `--expandArc=foo.bar`↵- pass a specific overload `--expandArc=foo.bar[T](x:T):string`
15:13:15FromDiscord<Yardanico> not that I know of, expandArc is really quite basic
15:13:39FromDiscord<Yardanico> your only choice is to rename procs so that they're unique
15:15:32FromDiscord<deech> That is disappointing.
15:16:47FromDiscord<deech> (edit) "That is disappointing. ... " added "Design time decisions like overloading turn into debugging nightmares."
15:50:51PMunchDoesn't the stdlib json parser support Option?
15:51:08FromDiscord<Yardanico> ah right, it does
15:51:12FromDiscord<Yardanico> @Dimi you can use options too yeah
16:20:41*lucasta joined #nim
16:37:07FromDiscord<demetera> In reply to @Yardanico "<@743921751477584033> you can use": @Yardanico thanks! I'm not sure I'm able to grasp endless features of the options package at the moment. Thanks for the brain food
16:41:54PMunchNot sure I'd call them endless :P
16:42:00PMunchBut sure, Options are neat
17:04:23PMunchDocumentation like this can fuck right off: gtk_print_settings_set_output_bin, Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.
17:04:36PMunchThank you, that told me exactly nothing I didn't already know
17:04:46PMunchWHAT IS OUTPUT BIN?!
17:08:43PMunchSeriously, could they write anything that would be less useful? https://docs.gtk.org/gtk3/const.PRINT_SETTINGS_OUTPUT_BIN.html
17:31:51FromDiscord<firasuke> I am new to Nim, but so far I am enjoying it! I am writing a package manager for some custom Linux distribution, this file is responsible for downloading and verifying packages:↵https://github.com/glaucuslinux/radula/blob/main/src/envenomate.nim↵↵I feel like I can do much better than this, but I need some guidance and some criticism.
17:34:47*Notxor joined #nim
17:36:41FromDiscord<demetera> In reply to @firasuke "I am new to": Is your app working good? There are lot of blank lines in the source code too
17:36:45FromDiscord<Yardanico> In reply to @firasuke "I am new to": use `ceras{"url"}.getStr()` https://media.discordapp.net/attachments/371759389889003532/1099388334800912474/image.png
17:37:00FromDiscord<Yardanico> for all cases like this, with {} it will not error if there's no such key, and getStr returns an empty string if it's JNull
17:49:21FromDiscord<firasuke> In reply to @Dimi "Is your app working": yup
17:49:39FromDiscord<firasuke> it is working as intended
17:49:46FromDiscord<firasuke> In reply to @Yardanico "use `ceras{"url"}.getStr()`": oh cool, thanks
17:50:31FromDiscord<firasuke> In reply to @Dimi "Is your app working": are blank lines bad? I am using them to separate code based on context
18:00:29FromDiscord<Rika> personally i dont see the issue with your lines, it just looks emptier than usual because of the indent size
18:01:01FromDiscord<Sun「無用」> Is there any ways of doing seq(or any collection) unpacking?
18:01:11FromDiscord<firasuke> In reply to @Rika "personally i dont see": oh ok
18:01:28FromDiscord<Sun「無用」> (edit) "unpacking?" => "unpacking?↵Like python's `[stuff]`"
18:01:39FromDiscord<Rika> In reply to @Sun「無用」 "Is there any ways": manually or with a macro; theres a library for that already iirc
18:01:41FromDiscord<firasuke> I apologize if my code looks like a shell script, this package manager has been written in shell first then ported to Rust and now Nim
18:02:03FromDiscord<firasuke> and I have to say Nim is by far the most productive I have ever been
18:02:13FromDiscord<firasuke> hopefully my code is not that bad 😦
18:03:00FromDiscord<Rika> with experience and over time you will make the code cleaner and more idiomatic, whether to nims idioms or to your own
18:03:05FromDiscord<Rika> dont worry too much now
18:03:16PMunch@firasuke, good to hear that you're finding Nim productive :) But you're not that new are you, I feel like I've seen you around here quite a bit
18:03:19FromDiscord<Rika> worry when you're not improving it ~~like how im not improving my shit lo~~
18:03:34FromDiscord<Rika> In reply to @PMunch "<@248208053952970752>, good to hear": could be that theyre taking their time
18:03:36FromDiscord<Rika> learning, i mean
18:04:08FromDiscord<firasuke> In reply to @PMunch "<@248208053952970752>, good to hear": been using Nim for 2 months now, I consider that new xD
18:04:31PMunchHave you only been around for two months? Huh
18:04:34FromDiscord<firasuke> In reply to @Rika "could be that theyre": yeah I guess, I like to nitpick which I know may not be a good thing, but that's how I learn mostly
18:04:40FromDiscord<firasuke> In reply to @PMunch "Have you only been": yup
18:04:46PMunchBy the way, Nim generally uses 2 spaces for indentation :)
18:04:55PMunchNot that it matters much, just in case you hadn't noticed
18:05:13FromDiscord<firasuke> oh ok, I did notice recently
18:05:22FromDiscord<Rika> In reply to @PMunch "Have you only been": same lol time sure feels like it flows different nowadays
18:05:25FromDiscord<firasuke> nimpretty was bugging me with the length of my constants
18:05:33FromDiscord<firasuke> so I disabled it
18:05:44FromDiscord<Rika> nimpretty is just absolute shite
18:05:54PMunchWouldn't know, never used it :P
18:06:13FromDiscord<firasuke> I'm using helix and nimlangserver and the experience feels much better compared to vscode (based opinion)
18:06:19FromDiscord<firasuke> In reply to @PMunch "Wouldn't know, never used": makes sense xD
18:06:22FromDiscord<firasuke> so 2 spaces, got it
18:06:39PMunchYou also seem to mix snake_case and camelCase, remember that Nim is style insensitive, so you can use whichever you prefer
18:06:49FromDiscord<firasuke> In reply to @Yardanico "use `ceras{"url"}.getStr()`": as for this, `nimsuggest` is throwing a `simpleGetOrDefault(ceras, "url") --> 'getOrDefault(ceras, "url")'`
18:06:57FromDiscord<Yardanico> it shows it in yellow
18:07:02PMunche.g. styledEcho could be written styled_echo in your code even if it isn't written like that in the original library
18:07:07FromDiscord<Yardanico> this is just a hint that it used term-rewriting macros
18:07:13FromDiscord<firasuke> In reply to @PMunch "You also seem to": yeah I learned this the hard way, I am keeping my stuff in snake case, and Nim's stuff in camelCase
18:07:28FromDiscord<Yardanico> any reason for that?
18:07:29FromDiscord<Yardanico> just curious
18:07:34FromDiscord<firasuke> In reply to @Yardanico "this is just a": oh ok
18:07:38FromDiscord<Yardanico> all the IDE stuff will still work even with snake_case
18:07:47FromDiscord<firasuke> what if I wanted to change the default string? to something like "None" instead of an empty string?
18:07:57FromDiscord<firasuke> In reply to @Yardanico "all the IDE stuff": oh really
18:08:00FromDiscord<Yardanico> of course?
18:08:05FromDiscord<Yardanico> nimlangserver still uses nimsuggest
18:08:15FromDiscord<Yardanico> and nimsuggest uses the compiler as a library
18:08:26FromDiscord<firasuke> well nimsuggest keeps exiting with errors with nimlsp when using vim/nvim
18:08:28FromDiscord<Yardanico> so nimsuggest understands everything normal nim does, even stuff like macros
18:08:34FromDiscord<firasuke> oh ok
18:08:56FromDiscord<firasuke> In reply to @firasuke "what if I wanted": is this doable using `{}` or I have to use `try` and `except`?
18:09:15FromDiscord<Yardanico> In reply to @firasuke "is this doable using": again, please don't use try/except
18:09:19FromDiscord<Yardanico> you can always do things like that without it
18:09:38FromDiscord<firasuke> In reply to @Yardanico "again, please don't use": oh ok
18:09:47FromDiscord<Akrone> Hey, I just submitted an issue for nimsuggest snake_case support (https://github.com/nim-lang/Nim/issues/21228#event-8371301720) seems like there is no doc/onboarding, it's a bit hard for me to make my first contribution haha. If anybody is experienced with nimsuggest I'd love to have a call and some insights about it, there is something about `{.async.}` procs I don't really grasp (they do not show on nimsuggest) 😄
18:10:03FromDiscord<Yardanico> In reply to @firasuke "oh ok": also, generally you can just use json.to
18:10:10FromDiscord<Yardanico> since you seem to know your json schemas anyway
18:10:26FromDiscord<Yardanico> then you get to use Option for free, and all the static type checking
18:10:30FromDiscord<firasuke> In reply to @Yardanico "also, generally you can": oh I am using toml from parsetoml, is there something better?
18:10:37FromDiscord<firasuke> In reply to @Yardanico "then you get to": oh cool
18:10:55PMunch@Yardanico, I feel partially responsible for those try/except default value things :P
18:11:13FromDiscord<Yardanico> oh you're using toml, i didn't notice, thought it was json
18:11:46FromDiscord<Yardanico> json.to would look much nicer here really, maybe status' toml serialization supports something similar? although it's pretty dependency-heavy
18:11:59FromDiscord<Yardanico> also @firasuke just move the parsing of that type to a separate proc where you do it all together
18:12:25FromDiscord<Yardanico> you seem to be parsing it each time in a lot of places
18:12:28FromDiscord<firasuke> In reply to @Yardanico "also <@248208053952970752> just move": oh please do tell me more, I write code like I write shell script
18:12:57FromDiscord<firasuke> In reply to @Yardanico "you seem to be": Well I am parsing in a lot of places, I have a function that parses and returns a tomlValueRef which I then use
18:13:09FromDiscord<Yardanico> In reply to @firasuke "Well I am parsing": yes, but you can create a proper Nim type for your config
18:13:19FromDiscord<Yardanico> and parse that toml into that Nim type so then you have a nice nim type to deal with in all the procs
18:13:25FromDiscord<firasuke> In reply to @Yardanico "yes, but you can": and pass that type then
18:13:49FromDiscord<firasuke> In reply to @Yardanico "and parse that toml": cool, thanks for suggesting that
18:14:12FromDiscord<firasuke> I had a struct for it in Rust, and I did use serde to serialize it
18:14:36FromDiscord<firasuke> but figured since I didn't find a proper toml serialization library in NIm, I won't use a custom type
18:14:43FromDiscord<firasuke> https://github.com/status-im/nim-toml-serialization
18:15:04FromDiscord<firasuke> I might take another look at that
18:15:20FromDiscord<Yardanico> it might not be too hard to actually take json.to and adapt it to parsetoml
18:15:27FromDiscord<Yardanico> since the interface is already very similar
18:17:24FromDiscord<firasuke> oh ok
18:30:38*azimut quit (Ping timeout: 255 seconds)
18:39:36FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=4u1i
18:39:39FromDiscord<Z3NTL3> can someone help me, why does this give me an err
18:39:48FromDiscord<Z3NTL3> it says i am using the create thread wrong
18:39:59FromDiscord<Z3NTL3> https://media.discordapp.net/attachments/371759389889003532/1099404247457599538/image.png
18:40:00FromDiscord<Z3NTL3> but
18:40:59FromDiscord<Z3NTL3> (edit) "https://play.nim-lang.org/#ix=4u1i" => "https://play.nim-lang.org/#ix=4u1j"
18:58:58FromDiscord<firasuke> can you convert foregroundcolor to string?
19:00:23FromDiscord<Z3NTL3> you mean foregoundcolor escape sequence?
19:00:29FromDiscord<Z3NTL3> you may with ``$``
19:00:51FromDiscord<Z3NTL3> so maybe ``$("\x1b[32m")``
19:12:00FromDiscord<firasuke> sorry I meant this https://nim-lang.org/docs/terminal.html#ForegroundColor
19:16:39FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4u1v
19:18:12FromDiscord<michaelb.eth> I poked around in github search but couldn't (yet) find a good explanation; my guess is that the algo for looking up symbols changed somehow, maybe for perf reasons it doesn't search down as far as it used to?
19:18:47FromDiscord<michaelb.eth> (edit) "symbols" => "identifiers"
19:28:18*lucasta quit (Remote host closed the connection)
19:57:06FromDiscord<Jackie> In reply to @firasuke "can you convert foregroundcolor": You mean like `$fgRed` to get the string "fgRed"?
20:09:14FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4u1C
20:09:40FromDiscord<firasuke> In reply to @voidwalker "this is what he": Yup
20:10:38FromDiscord<firasuke> In reply to @Jackie "You mean like `$fgRed`": No, I meant `fgRed & "some string" & fgDefault` evaluates into ForegroundColor, I want to convert it to a string
20:12:01FromDiscord<Elegantbeef> All this work to avoid `stdout.styledWrite(fgRed, "hmmm")`
20:12:13FromDiscord<firasuke> Hahaha xD not really
20:12:23FromDiscord<firasuke> I am using styledEcho where appropriate
20:12:40FromDiscord<firasuke> But I have a ternary condition where this should evaluate to a string
20:12:48FromDiscord<firasuke> But I want it to be colored,
20:12:59FromDiscord<firasuke> Guess my only option is to use ANSI escape codes
20:14:10FromDiscord<firasuke> In reply to @voidwalker "this is what he": Thanks!
20:45:32FromDiscord<Dudugz> Because it makes sense, in github actions I can't test the socket, on my pc it works. The test just opens port ``1028`` on host ``127.0.0.1`` and creates a client that connects to that port and exchanges a simple ``ping-pong``. https://media.discordapp.net/attachments/371759389889003532/1099435844357599252/image.png https://media.discordapp.net/attachments/371759389889003532/1099435844567302254/image.png
20:48:11FromDiscord<anddam> hi, is there a library to write actual webapp, as "plain" frontend js ones?
20:48:35*lucasta joined #nim
20:58:33FromDiscord<michaelb.eth> In reply to @anddam "hi, is there a": can you explain more what you mean by "plain"?
20:58:45FromDiscord<anddam> I can try
20:59:17FromDiscord<anddam> I am not a "webster guy" myself, but I mean something like Vue or React, in Nim
21:00:10FromDiscord<anddam> I only have first hand experience with Angular, but that's a heavy beast, I'd like something leaner, I want to make a simple app plotting a certain model
21:00:44FromDiscord<anddam> so there's a few input fields, a couple slider for parameters, and a canvas to plot into, Angular is a bit heavy for that, also I'd like an excuse to try nim
21:00:53FromDiscord<anddam> and I despise js and the web
21:01:44FromDiscord<michaelb.eth> so it's not a Nim thing, but I'm a fan of Svelte, personally. I feel like it doesn't get in my way, the docs are pretty good, and it's fairly simple to do things that would be fairly verbose in vanilla JS/TS
21:01:51FromDiscord<Elegantbeef> Karax exists
21:02:04FromDiscord<michaelb.eth> (edit) "fairly" => "quite"
21:13:33FromDiscord<anddam> oh thank you, I was trying to remember the name of this framework and was frantically going through bookmarks to no avail
21:13:35FromDiscord<anddam> it was Svelte
21:13:49FromDiscord<anddam> @ElegantBeef let's check
21:18:17FromDiscord<PMunch> @elcritch @elcritch, not sure how but I managed to forget that the subject of my previous article was dynamic libraries: https://peterme.net/dynamic-libraries-in-nim.html
21:18:40FromDiscord<PMunch> Let me know if there's anything I've missed
21:20:45FromDiscord<louis77> anyone used the db_postgres std lib? I wonder why all the row values are returned as strings
21:21:27FromDiscord<louis77> all db_ libs do that
21:27:04*PMunch quit (Quit: leaving)
21:31:20FromDiscord<voidwalker> any nim projects out there that deal with large network connection pools ? and maybe some custom protocol. I'm kind of stuck designing my torrent library, need to see how this stuff is handled
21:32:21FromDiscord<Elegantbeef> @louis77\: excuse my ignorance, what else would it return?
21:33:02FromDiscord<anddam> @ElegantBeef seems too complex for now
21:33:05FromDiscord<louis77> In reply to @Elegantbeef "<@480081186505490445>\: excuse my ignorance,": well postgres has many different types
21:33:30FromDiscord<louis77> I don't see a reason to convert an int to string just to convert it back to an int
21:34:08FromDiscord<louis77> it seems to me like an overly simplified implementation but perhaps I was overlooking something, hence my question
21:34:34FromDiscord<Elegantbeef> Yea i do not use DBs so i cannot do anything aside from ask that question
21:38:09FromDiscord<Elegantbeef> @Phil\: probably is more helpful but likely is presently not here
21:38:41FromDiscord<Phil> ? I was writing angular storybook components etc, what is up?
21:38:49FromDiscord<Yepoleb> hello phil
21:39:03FromDiscord<Elegantbeef> > anyone used the db\_postgres std lib? I wonder why all the row values are returned as strings
21:39:59FromDiscord<Phil> In reply to @louis77 "I don't see a": You're looking for lowdb.↵I have no understanding as to why the folks that wrote the std lib thought it a good idea to represent things like that.↵lowdb will return an object variant instead and you can use something like norm to have that automatically parsed into a nim type
21:40:06FromDiscord<Phil> In reply to @Yepoleb "hello phil": Cheers!
21:40:36FromDiscord<Phil> lowdb also actually represents NULL correctly instead of representing it as an empty string
21:40:44FromDiscord<louis77> @Phil would you recommend Gatabase instead?
21:40:51FromDiscord<Yepoleb> i thought maybe the official apis only return strings, but they do return variants
21:41:10FromDiscord<Phil> In reply to @louis77 "<@180601887916163073> would you recommend": I have not used Gatabase, but it's got a lot of stars and was written mostly with postgres in mind, so worth trying out!
21:41:58FromDiscord<louis77> @Phil thanks you! I was really confused why std/db_ would return only strings, the pretty much makes it unusable
21:42:06FromDiscord<louis77> (edit) "the" => "that"
21:42:18FromDiscord<Yepoleb> this is phil's module https://github.com/PhilippMDoerner/lowdb
21:43:12FromDiscord<Phil> In reply to @louis77 "<@180601887916163073> thanks you! I": I agree. I went for an ORM solution immediately (my db was sqlite in that case) that's why I jumped on norm.↵Norm in turn used ndb, which started not getting updates and blocking us for updating for nim2.0 so I forked it into lowdb
21:43:29FromDiscord<Phil> (edit) "lowdb" => "lowdb, which is what norm uses nowadays"
21:44:14FromDiscord<Phil> However the postgres support is basically only "just there", so seeing if you can get gatabase to work for you might bring more rewards
21:44:35FromDiscord<louis77> @Phil got it, thanks!
21:45:41FromDiscord<ElegantBeef> To paste what the matrix version of me said:↵> Luckily these DB libraries are being moved to nimble packages so this issue can be resolved
21:45:52FromDiscord<Phil> I shall take this as my clue to go back into my cave and finish my frontend stuff for now
21:46:07FromDiscord<Phil> (edit) "clue" => "cue"
21:46:28FromDiscord<louis77> In reply to @ElegantBeef "To paste what the": Fully agree to that move
21:47:53FromDiscord<ElegantBeef> Based off that the repo's description is "unified db connector" perhaps that's why it's using a string
21:48:28FromDiscord<Elegantbeef> Luckily these DB libraries are being moved to nimble packages so this issue can be resolved
21:48:36FromDiscord<Phil> Even a unified DB_connector package can still use optionals at least to represent null not as ""
21:49:16FromDiscord<ElegantBeef> Of course I was just saying it likely was just laziness mixed with "Hey this DB returns strings"
21:49:22FromDiscord<Phil> Check
21:53:27*Notxor quit (Quit: Leaving)
21:53:54FromDiscord<louis77> sent a code paste, see https://play.nim-lang.org/#ix=4u1V
21:54:52FromDiscord<Phil> Errr I'm back out of context, is that a code snippet from gatabase?
21:55:00FromDiscord<louis77> no from lowdb
21:55:13FromDiscord<louis77> my first query returned `Failed to parse '2021-10-28 14:09:27.756545+02' with format 'yyyy-MM-dd HH:mm:sszz'. Failed on pattern 'zz'`
21:55:28FromDiscord<louis77> so I found that code in lowdb...
21:56:16FromDiscord<louis77> looks like I have to get my hands dirty with a PR 🙂
21:58:00FromDiscord<Phil> Ma man, just for refernece, lowdb does not have async postgres support which may hurt quite a lot in terms of performance. If you're locked in for postgres I'd rather look at e.g. the stuff treeform has written and gatabase, I vaguely remember both of them having at least that available 😛
21:58:31FromDiscord<louis77> "locked in for postgres" sounds interesting
21:58:51FromDiscord<louis77> I'm trying to get out of it for a long time but that's not so easy
21:58:51FromDiscord<ElegantBeef> It's a psychological thriller, that only weird programmers understand
21:58:53FromDiscord<Phil> I mean, I'll be happy about PRs to bring the featureset in lowdb up to par and add async in the future, but for getting something done quick I'd look at those.
21:59:24FromDiscord<louis77> there are not many alternatives to PG unfortunately
21:59:46FromDiscord<louis77> you all prefer sqlite?
21:59:59FromDiscord<ElegantBeef> I prefer no database
22:00:21FromDiscord<Phil> I prefer sqlite right up until I hit actually high user-numbers
22:01:14FromDiscord<Phil> Before then, afaik sqlite may actually be faster in low-traffic scenarios since it doesn't go through the network.↵And I kinda wrote my side-project as a vanity project for "how low can I make the pageloads go?"
22:01:51FromDiscord<louis77> unfortunately I'm in a high-traffic multi-client complex sql scenario
22:03:26FromDiscord<louis77> triggers, stored procs, multiple different apps connecting↵not that I like postgres but sqlite is not an option↵and mysql/mariadb are buggy as hell↵I was working on a POC to replace PG with MariaDB and ran into bugs _every hour_ I was working on it. Many of them filed and confirmed, non of them fixed even after two years
22:03:46FromDiscord<louis77> (edit) "non" => "none"
22:04:09FromDiscord<louis77> however, I won't disturb you guys about DB stuff here any longer 🙂
22:04:45FromDiscord<ElegantBeef> You say disturb but given my lack of understanding i just read white noise
22:05:10FromDiscord<louis77> @ElegantBeef what do you use Nim for?
22:05:26FromDiscord<ElegantBeef> Inane projects that never see the light of day
22:05:29FromDiscord<ElegantBeef> Game dev
22:05:54FromDiscord<louis77> nice - an area I have zero clue about
22:06:36*fredrikhr quit (Quit: Disconnecting)
22:06:56FromDiscord<Phil> In reply to @louis77 "however, I won't disturb": Always happy to chat, don't worry.↵If I can help with anything in a web-related tech-stack I'm happy to, I've had my fingers in some of the codebases so I may be able to either help or know who can.
22:07:03FromDiscord<Phil> (edit) "In reply to @louis77 "however, I won't disturb": Always happy to chat, don't worry.↵If I can help with anything in a web-related tech-stack I'm happy to, I've had my fingers in some of the ... codebases" added "webdev-related"
22:07:15FromDiscord<ElegantBeef> A lot of my Nim code is actually just macro related stuff cause apparently I like writing compiler like stuff in userspace
22:09:10FromDiscord<louis77> In reply to @Isofruit "Always happy to chat,": sounds good - that's actually what I'm trying to use Nim for, web backend stuff (rest apis etc.)
22:09:35FromDiscord<ElegantBeef> Ah yet another person for me to bully
22:10:14FromDiscord<Phil> Note that in terms of explicitly webserver backends I'm familiar with like 2 of those, actually knowledgeable with 1 and there's been a bunch of web-packages popping up left and right that I haven't even looked at
22:10:47FromDiscord<Phil> Mummy is a new-er webserver for example that I haven't done anything with so far at all and chances are I won't be anywhere near-term
22:29:47*jmdaemon joined #nim
22:36:59*lucasta quit (Remote host closed the connection)
22:44:18FromDiscord<demetera> In reply to @Yardanico "<@743921751477584033> you can use": Unfortunately, still can't get, how to omit non-used json keys with the `options` module↵↵some background: openweathermaps API doesn't provide some fields sometimes and I can't parse those to my predefined object, hence app crashes
22:44:34*ltriant_ joined #nim
22:44:50FromDiscord<Yardanico> In reply to @Dimi "Unfortunately, still can't get,": You just have those fields in your object as Option[type]
22:45:03FromDiscord<Yardanico> if they're not present they're going to be none
22:45:13FromDiscord<Yardanico> this is with json module I mean, not jsony
22:45:39FromDiscord<demetera> Yes. Exactly. It's working, but I need to parse this object in the end even if those fields are not present
22:46:08FromDiscord<Yardanico> not sure what you mean
22:46:34FromDiscord<Yardanico> if the fields aren't present, you should store the default value or something else
22:46:44FromDiscord<demetera> So I have to pass json keys to the object, even if those keys are missing
22:46:46FromDiscord<Yardanico> You can check if an option has a value with isSome
22:47:16*ltriant quit (Ping timeout: 276 seconds)
22:47:19FromDiscord<Yardanico> In reply to @Dimi "So I have to": Sorry if I'm misunderstanding, but don't you have a nim type? You have fields, not strings for it
22:48:31FromDiscord<demetera> Yep. I have a Nim nested types indeed
22:49:45FromDiscord<demetera> Anyways, thanks for the help. Better I will check jsony module
22:51:05FromDiscord<demetera> I'm just looking something like in Golang where you can omit empty json keys
22:52:31FromDiscord<demetera> (edit) "you can" => "it's feasible to" | "it's feasible toomit ... empty" added "the"
23:03:59*lucasta joined #nim
23:04:20*derpydoo joined #nim
23:15:29*Jjp137 quit (Read error: Connection reset by peer)