<< 06-10-2022 >>

00:14:06FromDiscord<Takemichi Hanagaki> In reply to @Elegantbeef "Purely C++ interop (<@890300313729400832>)": Hummm, got it! Thanks!
00:46:46FromDiscord<Takemichi Hanagaki> In reply to @Elegantbeef "Purely C++ interop (<@890300313729400832>)": Thank you!
01:01:07*wallabra_ joined #nim
01:01:09*wallabra quit (Read error: Connection reset by peer)
01:03:03*wallabra_ is now known as wallabra
01:31:50FromDiscord<auxym> is there a way to prevent nim from passing `-w` to gcc and hiding all warnings?
01:48:15FromDiscord<ChocolettePalette> There is this thing\:-t, --passC\:OPTIONOver here\:https://nim-lang.org/0.20.0/nimc.html
01:48:43FromDiscord<ChocolettePalette> You might pass -Wall or smth to gcc hoping it to defeat -w
01:59:09FromDiscord<Prestige> How can we convert a `ptr cuchar` to a string?
01:59:31FromDiscord<Prestige> I have the length, just not sure how I should be converting it
01:59:42FromDiscord<Elegantbeef> Oh you have the length, then this is easy
02:00:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4coy
02:00:13FromDiscord<Prestige> ah, thank yo
02:00:15FromDiscord<Prestige> you, even
02:00:39FromDiscord<Elegantbeef> Honestly i'm sorta surprised there isnt a `stringFromPointer` procedure
02:00:47FromDiscord<Elegantbeef> It's a common operation
02:03:56qwri'd call it stringFromMemory, seems a bit more descriptive :)
02:04:19qwror copyMemoryToString
02:04:39FromDiscord<Elegantbeef> Yea something like that 😄
02:06:32FromDiscord<Prestige> Strange that this libusb library is getting me like, the first 5 characters of the name of the usb device 🤔
02:06:49FromDiscord<Elegantbeef> What function?
02:07:06FromDiscord<Prestige> `libusb_get_string_descriptor_ascii()`
02:08:06FromDiscord<Prestige> Maybe because I'm not sure what `desc_index` is supposed to be
02:08:22FromDiscord<Elegantbeef> Also you know you can just pass a string in right?
02:09:03FromDiscord<Prestige> I did not know that
02:09:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4coB
02:09:39FromDiscord<Elegantbeef> Doesnt help you, but this is the 'proper' way
02:10:34FromDiscord<Elegantbeef> https://libusb.sourceforge.io/api-1.0/grouplibusbdesc.html#ga240aac96d92cb9f51e3aea79a4adbf42 it's not too helpful
02:11:20FromDiscord<Prestige> Hm using cstring there seems to not work
02:11:38FromDiscord<Elegantbeef> might need to do `cast[ptr cuchar](cstring usbName)`
02:11:51FromDiscord<Prestige> I can just do addr data[0]
02:13:12FromDiscord<Elegantbeef> Right the relation to cstring is one way 😄
02:14:27FromDiscord<Elegantbeef> https://libusb.sourceforge.io/api-1.0/grouplibusbdesc.html#ga425885149172b53b3975a07629c8dab3 i think you need to use this to get the config, then you can get the config's index for desc\_index
02:15:23FromDiscord<Elegantbeef> The config has `iConfiguration` which is `Index of string descriptor describing this configuration. `
02:15:30FromDiscord<Elegantbeef> Sounds like what you want.... but i dont know
02:17:39FromDiscord<Prestige> I need to figure out how to read inputs from a device, it's weird how unfriendly this library is
02:19:30FromDiscord<Elegantbeef> Well they have a polling api
02:19:33FromDiscord<Elegantbeef> So that's nice 😄
02:21:01FromDiscord<Elegantbeef> Have you seen the examples?
02:23:44FromDiscord<Elegantbeef> https://github.com/libusb/libusb/blob/master/examples/listdevs.c if not this is a good example for what you're doing
02:33:41FromDiscord<Prestige> Oh that may be useful
03:20:20*LuxuryMode joined #nim
03:24:45*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
03:26:57*Lord_Nightmare joined #nim
03:43:07FromDiscord<Prestige> nvm none of that was useful
03:54:55FromDiscord<gibson> In reply to @Generic "if the C++ code": Unfortunately, nim still copies the string during cstring compatible calls.
03:55:51FromDiscord<Elegantbeef> What?
03:59:05FromDiscord<Prestige> Beef, do you see any way to actually read data from a device with libusb? Because I don't, and that's all I'm trying to do
04:04:10FromDiscord<gibson> In reply to @gibson "Unfortunately, nim still copies": When c++ operates on the string_view, it has no effect on the original nim string.
04:04:41FromDiscord<gibson> The answer is to use the nim-cppstl library, and pass CppString objects to c++.
04:10:19FromDiscord<Elegantbeef> Prestige i do not know it's not very clear
04:10:40FromDiscord<Prestige> Yeah it's damn annoying
05:18:36FromDiscord<elcritch> In reply to @Elegantbeef "<@703717429230174229>\: damn you, i'm": It should be! I started down the route and use a few concepts where possible but wanted to get it working first. The "box" type should already be generic. I'd like to make it fully generic so you could use it for things like terminals or those little OLED displays on MCU's where you'd just want int's. That's mostly the `UiScalar` type to help move toward that.
05:23:44FromDiscord<elcritch> And @ElegantBeef cssgrid is pretty great for UIs! The whole concept of `fractions` and the naming schemes is super handy. Plus I've partially added support for the min/max/minmax functions which can make setting up UI constraints a breeze
05:24:37FromDiscord<Elegantbeef> Yea i seen your updates to the forum post
05:24:55FromDiscord<Elegantbeef> I personally dont need conventional UIs that much so i'm only really watching fidgetty
05:25:17FromDiscord<Elegantbeef> still need to get a nice theme for it
05:26:53FromDiscord<Elegantbeef> Do themes presently support changing radii of things?
05:40:31FromDiscord<Phil> sent a long message, see http://ix.io/4cp2
05:40:59FromDiscord<Phil> I mean, even without mixin
05:41:00FromDiscord<Elegantbeef> Yes it can `mixin mySymbol`
05:41:27FromDiscord<Elegantbeef> By default a overloaded symbol is opened which is equivalent to `mixin`
05:41:44FromDiscord<Elegantbeef> A non overloaded symbol is a closed symbol which is equivalent to `bind`
05:43:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp4
05:43:05FromDiscord<Phil> an overloaded symbol is also one when one of it is defined in module A and the other in module B?↵Or do at least 2 have to be defined in module A to count as overloaded symbol?
05:43:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp5
05:44:09FromDiscord<Elegantbeef> the symbol has to be visible to the generic
05:44:44FromDiscord<Elegantbeef> Nim's generics are kinda nifty in that they generally chose the right soution
05:44:45FromDiscord<Elegantbeef> solution even
05:44:53FromDiscord<Elegantbeef> `mixin` and `bind` are there for when it doesnt
05:46:22FromDiscord<Phil> Okay, assuming the symbol is definitely mixin since the generic can see like 4 of them in its own scope.↵The generic then gets imported into a different module that has access to even more overloads (The explicit scenario: I provide a base stock of procs to convert basic data-types into objects that generate HTML fields, the user should also be able to extend that with their own types with their own conversion procs). Can it bind those ove
05:46:58FromDiscord<Elegantbeef> `mixin`'d symbols only search the scope of instantiation and generic declaration
05:47:11FromDiscord<Elegantbeef> the correct way of doing what you want is to explicitly state mixinable symbols imo
05:47:59FromDiscord<Phil> I can't quite parse that sentence, could you rephrase / is there more to read up on that on?
05:48:06FromDiscord<Phil> (edit) "that on?" => "that?"
05:48:16FromDiscord<Elegantbeef> Which part?
05:48:18FromDiscord<Phil> > the correct way of doing what you want is to explicitly state mixinable symbols imo↵That sentence
05:48:36FromDiscord<Elegantbeef> When you write generic interfaces explicitly mixin the parts you want to allow users to override
05:49:09FromDiscord<Phil> by generic interface you mean generic concept or the proc declaration?
05:49:21FromDiscord<Elegantbeef> The procedure
05:49:53FromDiscord<Elegantbeef> A 'generic interface' as i tend to call it is a procedure that uses mixin'd symbols to be reusable
05:50:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp7
05:50:37FromDiscord<Elegantbeef> The benefit of explicitly stating which symbols are overloaded is that you dont suddenly cause bugs by refactoring
05:51:48FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cp8
05:52:09FromDiscord<Elegantbeef> Assuming `toFormField` is the only procedure you want to override, yes
05:54:09FromDiscord<Phil> Alright, I've understood so far↵Now assuming extractFields is called from a generic, which is called from another generic etc.↵The module with extractFields itself is never directly imported by the user, they import one of the generics higher up the callstack in a completely different module, that would not work, right?↵Or would I have to mixin in every generic along the callstack to pass on "toFormField" to "extractFields" ?
05:54:19FromDiscord<Elegantbeef> Though you technically only need to do that if Nim doesnt pick the correct symbol type for the procedure
05:55:07FromDiscord<Elegantbeef> No you shouldnt, when you instantiate a generic it'll instantiate in the scope of your module so any mixin'd symbols will be resolved
05:55:54FromDiscord<Phil> Alright, I think I've got the basics of my problem and I think I'm understanding where I'm running into problems
05:58:34FromDiscord<Phil> What happens if along the lines I have a module with a proc that itself is generic, but creates a new proc.↵For example a generic "createController" proc that itself is generic as it takes a type as parameter, but the controller-proc it creates for that type is not.↵At that point the module with the createController proc is where all mixin symbols get bound in, right?↵Or would that be the module where the createController proc itself
05:59:59FromDiscord<Elegantbeef> It'd be the first call of the root generic
06:01:31FromDiscord<Elegantbeef> Generics are generated at the callsite so that means nested generics should generate properly
06:01:53FromDiscord<Elegantbeef> You can of course test this all with a simple module
06:02:40FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cpa
06:02:55FromDiscord<Elegantbeef> Afaik yes
06:03:32FromDiscord<Phil> And "extractFields" along there has access to the scopes of all its parent-generics?
06:03:44FromDiscord<Phil> Or only its own module and the root module?
06:04:00FromDiscord<Elegantbeef> The module it's being instantiated and the module it's located in
06:07:09FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cpb
06:08:23FromDiscord<Phil> So that's what I'm troubleshooting
06:09:33FromDiscord<Phil> I guess "who calls who" is bad wording, "who defines who" would be more accurate
06:10:15FromDiscord<Elegantbeef> No clue if wandbox works for you but this is the best example https://wandbox.org/permlink/tltHRDPkGcapJJfC
06:10:54FromDiscord<Elegantbeef> I guess maybe it's more complicated here and you might need `mixin`?
06:13:14*rockcavera quit (Remote host closed the connection)
06:13:14FromDiscord<Phil> One question about the example.↵In module b, dospecificthing has access to the "myProc" in its own module and the "myProc" in the root module, how does it choose which one to take? They have the same proc signature from what I can see
06:14:07FromDiscord<Elegantbeef> It was showing it only considers isntantation and declaration
06:14:42FromDiscord<Elegantbeef> Instantation is above module i think
06:15:48*kenran joined #nim
06:16:07FromDiscord<Elegantbeef> instantiation over declaration i mean
06:30:03*LuxuryMode quit (Quit: Connection closed for inactivity)
06:36:46*wallabra quit (Ping timeout: 265 seconds)
06:43:34*wallabra joined #nim
07:10:17FromDiscord<elcritch> In reply to @Elegantbeef "Yea i seen your": > > still need to get a nice theme for it↵> Do themes presently support changing radii of things?↵Yah they do. Though I've been moving toward using closures for theming. Then users could theme anything by doing a `theme.push("button") = yellowButtonWithBorder`.
07:22:16*madprops quit (Ping timeout: 244 seconds)
07:22:18*madprops_ joined #nim
07:32:50*m5zs7k quit (Ping timeout: 265 seconds)
07:40:32*m5zs7k joined #nim
08:49:41*pro joined #nim
09:02:54FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cpy
09:04:22FromDiscord<Elegantbeef> Shallowcopy doesnt exist for arc/orc
09:04:23FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=4cpy" => "https://play.nim-lang.org/#ix=4cpz"
09:04:30FromDiscord<Elegantbeef> Nim is moving to orc by default
09:04:51FromDiscord<Elegantbeef> So packages need to take that into account
09:05:31FromDiscord<Elegantbeef> https://github.com/jangko/nimPNG/issues/73
09:06:04FromDiscord<Goel> Oh haven't noticed that, thanks
09:15:13FromDiscord<enthus1ast> is there a way to get information about an imported module? Like its path in the filesystem?
09:16:37FromDiscord<enthus1ast> on compiletime would be enough \:)
09:18:13FromDiscord<enthus1ast> i could maybe do the same search that nimble does
09:18:16FromDiscord<Phil> I also despaired at this question enthus1ast
09:18:20FromDiscord<enthus1ast> but this feels meh
09:18:21FromDiscord<Elegantbeef> I do not think it's possible to take a symbol and get it's path
09:18:37FromDiscord<Phil> The conclusion I came to is "Allow the user to do string interpolation in importNimja and the extends thingies"
09:18:48FromDiscord<Phil> (edit) "The conclusion I came to is "Allow the user to do string interpolation in importNimja and the extends thingies" ... " added "with absolute paths"
09:19:25FromDiscord<enthus1ast> one thing i though was i could use the information from https://nim-lang.org/docs/compilesettings.html↵(searchPaths) and do the search myself
09:19:34FromDiscord<Phil> Like, a package can know its own path thanks to `currentSourcePath()`↵But figuring out somebody else's path I have no idea
09:24:59FromDiscord<Phil> In reply to @enthus1ast "one thing i though": I mean, since you have access to all nimble paths you could recursively walk the nimble-paths in search for a module with that name?↵Though that's not foolproof against having multiple versions of the lib installed... not getting any good ideas I'll admit
09:25:22FromDiscord<Phil> No wait, you can't know the module name
09:25:23FromDiscord<Phil> Err
09:25:25FromDiscord<enthus1ast> yeah
09:25:41FromDiscord<Phil> I keep coming back to "your only choice is letting the users decide"
09:25:51*dnh joined #nim
09:26:14FromDiscord<enthus1ast> at least this was one idea i had
09:26:15FromDiscord<enthus1ast> yeah i should also let the user decide
09:26:43FromDiscord<enthus1ast> but at least provide a convienient way to get the path to a module
09:26:44FromDiscord<Elegantbeef> Well i'm going to go but ping me to what you guys are talking about↵(@Phil)
09:27:02FromDiscord<Elegantbeef> I might have some abuse ideas that can solve it
09:27:08FromDiscord<enthus1ast> the issue is, that nimja's import is relative to the sourceDir
09:27:19FromDiscord<enthus1ast> but this cannot work, when you have modules
09:27:19FromDiscord<Phil> Like, my own idea is that I have a constant in one of my project files, use `getCurrentSourcePath()` and calling `getParentDir()` as often as required until I reach the root dir of the project
09:28:21FromDiscord<Elegantbeef> https://nim-lang.org/docs/macros.html#getProjectPath ?
09:28:25FromDiscord<Phil> In reply to @Elegantbeef "Well i'm going to": Nimja reads in files at compile-time.↵So you need to specify where it reads the files from.↵Currently it defaults to your project dir and allows you to specify a relative path to somewhere in your project dir.↵That breaks if the project is a library itself though, since at that point the templates you want to read in will not reside in the project dir, but some dir in the nimble stuff
09:28:38FromDiscord<enthus1ast> yes thats what is used internally
09:28:53FromDiscord<Elegantbeef> Anyway i'm now really going to go
09:29:32FromDiscord<Phil> And I'm running into this face first since I'm currently writing a prologue extension, which has its own "resource Folder".↵Nimja trying to find said resource Folder in whatever user uses my prologue extension isn't going to work since it needs to look in my nimble package directory, not the project directory
09:30:28FromDiscord<Phil> This is an issue that comes with 2 commands of the nimja templating language: importNimja (importing another template file) and extends (also imports another template file but acknowledge it as the parent-template of yourself)
09:35:45*pro quit (Quit: pro)
09:43:17FromDiscord<enthus1ast> @Phil\: you mentioned that you have patched nimja to use a compile time switch that hacks it in, do you have this on a branch somewhere?
09:46:40FromDiscord<Phil> No, but it's not working fully anyway.↵Like, I can show you the principle, but e.g. for "extend" I'm not getting it to do what I want
09:49:23FromDiscord<Phil> sent a long message, see http://ix.io/4cq2
09:55:24FromDiscord<enthus1ast> ok i see
10:03:51FromDiscord<Phil> Is enabling expressions in importnimja / extends that hard?
10:04:07FromDiscord<enthus1ast> have not looked into it
10:04:13FromDiscord<enthus1ast> \:)
10:04:14FromDiscord<enthus1ast> yet
10:04:41FromDiscord<enthus1ast> currently i just use the param as a string
10:04:58FromDiscord<enthus1ast> i could parse it as an expression or so
10:05:54FromDiscord<enthus1ast> but it must work on compiletime though
10:06:35FromDiscord<Phil> That's perfectly feasible, I do a crapton of stuff at compiletime and you have the compiletime pragma to do stuff explicitly that way
10:07:09FromDiscord<Phil> It's just that I can't know paths during somebody else's compile-time, I can only write code that'll act on their machine that can know
10:07:45FromDiscord<enthus1ast> the issue is, that variables that you define with nimja, are not available on compile time, but are later transformed to NimNodes
10:10:28FromDiscord<enthus1ast> but i'll look into it
10:16:28*PMunch joined #nim
10:24:10*dtomato joined #nim
10:59:46NimEventerNew post on r/nim by thindil: [Nim Blog] This Month with Nim: September 2022, see https://reddit.com/r/nim/comments/xx2dhz/nim_blog_this_month_with_nim_september_2022/
11:34:05FromDiscord<untoreh> sent a code paste, see https://paste.rs/po4
11:42:07*arkurious joined #nim
11:42:42FromDiscord<ChocolettePalette> Yes, the third evocation should be withX(false)↵(@untoreh)
11:43:41PMunchHmm, what a weird error message
11:45:29FromDiscord<ChocolettePalette> I believe that parameters with default values should be passed after all the parameters without these
11:45:58FromDiscord<ChocolettePalette> Like, f(x, y, z=0, w=1) etc
11:46:06*crem quit (Ping timeout: 260 seconds)
11:46:58*crem joined #nim
11:47:56FromDiscord<ChocolettePalette> Otherwise the code gets sus, e.g. in the above example the complier takes the first argument which is supposed to be a static boolean, but instead of a boolean it receives a `code`
12:27:49FromDiscord<wiga> Is if/return a thing in nim?
12:33:52FromDiscord<wiga> Smth like↵if thing.len == 0: return
12:48:58*derpydoo joined #nim
12:53:58FromDiscord<Rika> sure?
12:54:05FromDiscord<Rika> what error do you get
12:54:13FromDiscord<Rika> that makes you think it doesnt
13:25:29Amun-Rathere's no default return value if that's what he mean
13:33:38FromDiscord<wiga> In reply to @Rika "that makes you think": Idk im just asking
13:34:11*kenran quit (Remote host closed the connection)
13:34:21FromDiscord<wiga> I remember having a syntax error of some sort when i did it last time but i dont remember why exactly
13:34:28FromDiscord<wiga> And what was the error
13:34:39FromDiscord<wiga> And if it was caused by external reasons
13:35:02Amun-Rathat wasn't return related for sure
13:35:09FromDiscord<wiga> Alright
13:35:18FromDiscord<wiga> Imma retry later then
13:35:21FromDiscord<wiga> Ty
13:35:37Amun-Ra(or return type was incorrect)
13:37:28FromDiscord<wiga> Like just to make the process die if it doesnt meet the condition
13:37:43FromDiscord<wiga> on jester specifically
13:38:20FromDiscord<Rika> on jester you have to respond with a response
13:38:25FromDiscord<Rika> i think
13:38:28FromDiscord<wiga> yes
13:38:55FromDiscord<wiga> so it'd be like if thing.len == 0: resp "no"
13:39:13FromDiscord<wiga> But will it exexcute the rest of the code?
13:39:20FromDiscord<wiga> (edit) "exexcute" => "exexute"
13:39:26FromDiscord<wiga> (edit) "exexute" => "execute"
13:39:28FromDiscord<Rika> yes
13:39:32FromDiscord<wiga> Stupid keyboard
13:39:32FromDiscord<Rika> iirc?
13:39:37qwrin a way there is default return value - it is the default value of result variable
13:40:10FromDiscord<wiga> In reply to @Rika "yes": Which is what i dont want to happen
13:50:51FromDiscord<auxym> In reply to @ChocolettePalette "You might pass -Wall": yeah tried that but apparently -w overrides -Wall no matter in which order they are put
14:02:22*PMunch quit (Quit: Leaving)
14:16:58*wallabra quit (Ping timeout: 246 seconds)
14:23:19*kenran joined #nim
14:23:36*wallabra joined #nim
14:26:52FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=4crG
14:29:01*derpydoo quit (Ping timeout: 268 seconds)
14:30:43FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=4crK
14:30:47FromDiscord<Hamid_Bluri> i don't know what happens here
14:33:11Amun-Raauxym: yes, it seems to work that way
14:38:46*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
14:39:00*wallabra joined #nim
14:46:05*rez joined #nim
15:23:23*jmdaemon quit (Ping timeout: 252 seconds)
15:23:44*kenran quit (Remote host closed the connection)
15:26:17strogon14How can I detect windows 32-bit vs 64-bit at compile time (i.e. with when-clause)?
15:36:41FromDiscord<mratsim> In reply to @strogon14 "How can I detect": when sizeof(int) == 4: 32-bit stuff
15:41:17FromDiscord<hotdog> sent a code paste, see https://paste.rs/VXZ
16:02:13*rez quit (Quit: much snoozes...)
16:11:02*rez joined #nim
16:11:04*madprops_ is now known as madprops
16:11:05*madprops quit (Changing host)
16:11:05*madprops joined #nim
16:46:38*wallabra_ joined #nim
16:46:46*wallabra quit (Ping timeout: 246 seconds)
16:48:35*wallabra_ is now known as wallabra
16:52:41*Jovan quit (Ping timeout: 255 seconds)
16:59:06FromDiscord<Goel> Any native nim library for encode/decode of `.gif` files?
17:06:53FromDiscord<mratsim> In reply to @Goel "Any native nim library": https://nimble.directory/search?query=gif
17:37:36strogon14mratsim: thanks, I'll try that.
17:43:59*rez quit (Quit: much snoozes...)
18:03:35*rez joined #nim
18:16:12FromDiscord<treeform> In reply to @Goel "Any native nim library": My lib, pixie has a gif decoder, even animated gif support.
18:17:17FromDiscord<treeform> https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/gif.nim
18:30:47*rockcavera joined #nim
18:38:51Amun-Rathat's what I plan to do in my lib, too
18:39:09Amun-RaI'm focusing more on old gfx formats
18:42:56FromDiscord<Phil> sent a long message, see http://ix.io/4ctp
18:43:27FromDiscord<Phil> I don't even have an excuse of the models being complicated or anything
18:44:16FromDiscord<Phil> Cost me the last 2 days or sth
19:40:50FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cty
19:41:15*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:44:11FromDiscord<Phil> Wait, that character is literally there, that's not hidden unicode
19:44:38FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ctE
20:00:31*dnh joined #nim
20:20:36*elph joined #nim
20:21:33elphHey everyone, I'm trying to convert a certain type to a JSON string to POST. But I wanted to omit empy fields. I'm doing something like `type Foo = object \ a: Option[string] \ b: string` and then `payload = %* Foo(b: "I'm b")`. How can I get `{"b":"I'm b"}` instead of `{"a": null, "b": "I'm b"}`?
20:21:47elph(sorry if this is double posting, my client disconnected)
20:25:54FromDiscord<Horizon [She/Her]> What library should i use for including a header file in Nim?
20:26:46FromDiscord<Horizon [She/Her]> Wanting to make this code work in Nim
20:26:54FromDiscord<Horizon [She/Her]> https://haste.powercord.dev/tirujaloqu
20:27:06FromDiscord<Horizon [She/Her]> Just testing how well Go could be used within Nim
20:31:27FromDiscord<hotdog> In reply to @elph "Hey everyone, I'm trying": Have a look at jsony, it’s a bit more flexible than std/json
20:32:09elph@hotdog, thanks! I'll have a look
20:33:45FromDiscord<Horizon [She/Her]> Just ended up writing my own glue
20:46:25elph@hotdog, thanks, it works now. I'm using this example too https://github.com/treeform/jsony/blob/master/tests/test_quirkydump.nim#L29-L57 Does exactly what I want
20:55:58*fallback quit (Ping timeout: 246 seconds)
21:04:23FromDiscord<hotdog> In reply to @elph "<@472459996068839424>, thanks, it works": Great!
21:05:56FromDiscord<Horizon [She/Her]> https://github.com/Mythical-Forest-Collective/GoNim simple test
21:06:16FromDiscord<Horizon [She/Her]> Is there the possibility of GC conflicts for bigger codebases in Golang?
21:06:30FromDiscord<Horizon [She/Her]> If so, would using `goroutines` for the GC be better?
21:07:29*fallback joined #nim
21:08:31FromDiscord<Elegantbeef> To be fair https://nim-lang.org/docs/jsonutils.html does exist↵(@hotdog)
21:30:26*jmdaemon joined #nim
22:47:14*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:48:23*dnh joined #nim
22:53:28*krux02 joined #nim
23:23:09*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:24:40*wallabra quit (Remote host closed the connection)
23:25:05*wallabra joined #nim
23:41:23FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk
23:49:06*krux02 quit (Quit: Leaving)
23:53:09FromDiscord<Patitotective> <@&371760044473319454>
23:56:42FromDiscord<albassort> >telegram
23:57:41FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk
23:59:22FromDiscord<albassort> @Yardanico come here you fuck
23:59:47FromDiscord<Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk