00:14:06 | FromDiscord | <Takemichi Hanagaki> In reply to @Elegantbeef "Purely C++ interop (<@890300313729400832>)": Hummm, got it! Thanks! |
00:46:46 | FromDiscord | <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:50 | FromDiscord | <auxym> is there a way to prevent nim from passing `-w` to gcc and hiding all warnings? |
01:48:15 | FromDiscord | <ChocolettePalette> There is this thing\:-t, --passC\:OPTIONOver here\:https://nim-lang.org/0.20.0/nimc.html |
01:48:43 | FromDiscord | <ChocolettePalette> You might pass -Wall or smth to gcc hoping it to defeat -w |
01:59:09 | FromDiscord | <Prestige> How can we convert a `ptr cuchar` to a string? |
01:59:31 | FromDiscord | <Prestige> I have the length, just not sure how I should be converting it |
01:59:42 | FromDiscord | <Elegantbeef> Oh you have the length, then this is easy |
02:00:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4coy |
02:00:13 | FromDiscord | <Prestige> ah, thank yo |
02:00:15 | FromDiscord | <Prestige> you, even |
02:00:39 | FromDiscord | <Elegantbeef> Honestly i'm sorta surprised there isnt a `stringFromPointer` procedure |
02:00:47 | FromDiscord | <Elegantbeef> It's a common operation |
02:03:56 | qwr | i'd call it stringFromMemory, seems a bit more descriptive :) |
02:04:19 | qwr | or copyMemoryToString |
02:04:39 | FromDiscord | <Elegantbeef> Yea something like that 😄 |
02:06:32 | FromDiscord | <Prestige> Strange that this libusb library is getting me like, the first 5 characters of the name of the usb device 🤔 |
02:06:49 | FromDiscord | <Elegantbeef> What function? |
02:07:06 | FromDiscord | <Prestige> `libusb_get_string_descriptor_ascii()` |
02:08:06 | FromDiscord | <Prestige> Maybe because I'm not sure what `desc_index` is supposed to be |
02:08:22 | FromDiscord | <Elegantbeef> Also you know you can just pass a string in right? |
02:09:03 | FromDiscord | <Prestige> I did not know that |
02:09:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4coB |
02:09:39 | FromDiscord | <Elegantbeef> Doesnt help you, but this is the 'proper' way |
02:10:34 | FromDiscord | <Elegantbeef> https://libusb.sourceforge.io/api-1.0/grouplibusbdesc.html#ga240aac96d92cb9f51e3aea79a4adbf42 it's not too helpful |
02:11:20 | FromDiscord | <Prestige> Hm using cstring there seems to not work |
02:11:38 | FromDiscord | <Elegantbeef> might need to do `cast[ptr cuchar](cstring usbName)` |
02:11:51 | FromDiscord | <Prestige> I can just do addr data[0] |
02:13:12 | FromDiscord | <Elegantbeef> Right the relation to cstring is one way 😄 |
02:14:27 | FromDiscord | <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:23 | FromDiscord | <Elegantbeef> The config has `iConfiguration` which is `Index of string descriptor describing this configuration. ` |
02:15:30 | FromDiscord | <Elegantbeef> Sounds like what you want.... but i dont know |
02:17:39 | FromDiscord | <Prestige> I need to figure out how to read inputs from a device, it's weird how unfriendly this library is |
02:19:30 | FromDiscord | <Elegantbeef> Well they have a polling api |
02:19:33 | FromDiscord | <Elegantbeef> So that's nice 😄 |
02:21:01 | FromDiscord | <Elegantbeef> Have you seen the examples? |
02:23:44 | FromDiscord | <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:41 | FromDiscord | <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:07 | FromDiscord | <Prestige> nvm none of that was useful |
03:54:55 | FromDiscord | <gibson> In reply to @Generic "if the C++ code": Unfortunately, nim still copies the string during cstring compatible calls. |
03:55:51 | FromDiscord | <Elegantbeef> What? |
03:59:05 | FromDiscord | <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:10 | FromDiscord | <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:41 | FromDiscord | <gibson> The answer is to use the nim-cppstl library, and pass CppString objects to c++. |
04:10:19 | FromDiscord | <Elegantbeef> Prestige i do not know it's not very clear |
04:10:40 | FromDiscord | <Prestige> Yeah it's damn annoying |
05:18:36 | FromDiscord | <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:44 | FromDiscord | <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:37 | FromDiscord | <Elegantbeef> Yea i seen your updates to the forum post |
05:24:55 | FromDiscord | <Elegantbeef> I personally dont need conventional UIs that much so i'm only really watching fidgetty |
05:25:17 | FromDiscord | <Elegantbeef> still need to get a nice theme for it |
05:26:53 | FromDiscord | <Elegantbeef> Do themes presently support changing radii of things? |
05:40:31 | FromDiscord | <Phil> sent a long message, see http://ix.io/4cp2 |
05:40:59 | FromDiscord | <Phil> I mean, even without mixin |
05:41:00 | FromDiscord | <Elegantbeef> Yes it can `mixin mySymbol` |
05:41:27 | FromDiscord | <Elegantbeef> By default a overloaded symbol is opened which is equivalent to `mixin` |
05:41:44 | FromDiscord | <Elegantbeef> A non overloaded symbol is a closed symbol which is equivalent to `bind` |
05:43:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp4 |
05:43:05 | FromDiscord | <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:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp5 |
05:44:09 | FromDiscord | <Elegantbeef> the symbol has to be visible to the generic |
05:44:44 | FromDiscord | <Elegantbeef> Nim's generics are kinda nifty in that they generally chose the right soution |
05:44:45 | FromDiscord | <Elegantbeef> solution even |
05:44:53 | FromDiscord | <Elegantbeef> `mixin` and `bind` are there for when it doesnt |
05:46:22 | FromDiscord | <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:58 | FromDiscord | <Elegantbeef> `mixin`'d symbols only search the scope of instantiation and generic declaration |
05:47:11 | FromDiscord | <Elegantbeef> the correct way of doing what you want is to explicitly state mixinable symbols imo |
05:47:59 | FromDiscord | <Phil> I can't quite parse that sentence, could you rephrase / is there more to read up on that on? |
05:48:06 | FromDiscord | <Phil> (edit) "that on?" => "that?" |
05:48:16 | FromDiscord | <Elegantbeef> Which part? |
05:48:18 | FromDiscord | <Phil> > the correct way of doing what you want is to explicitly state mixinable symbols imo↵That sentence |
05:48:36 | FromDiscord | <Elegantbeef> When you write generic interfaces explicitly mixin the parts you want to allow users to override |
05:49:09 | FromDiscord | <Phil> by generic interface you mean generic concept or the proc declaration? |
05:49:21 | FromDiscord | <Elegantbeef> The procedure |
05:49:53 | FromDiscord | <Elegantbeef> A 'generic interface' as i tend to call it is a procedure that uses mixin'd symbols to be reusable |
05:50:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cp7 |
05:50:37 | FromDiscord | <Elegantbeef> The benefit of explicitly stating which symbols are overloaded is that you dont suddenly cause bugs by refactoring |
05:51:48 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cp8 |
05:52:09 | FromDiscord | <Elegantbeef> Assuming `toFormField` is the only procedure you want to override, yes |
05:54:09 | FromDiscord | <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:19 | FromDiscord | <Elegantbeef> Though you technically only need to do that if Nim doesnt pick the correct symbol type for the procedure |
05:55:07 | FromDiscord | <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:54 | FromDiscord | <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:34 | FromDiscord | <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:59 | FromDiscord | <Elegantbeef> It'd be the first call of the root generic |
06:01:31 | FromDiscord | <Elegantbeef> Generics are generated at the callsite so that means nested generics should generate properly |
06:01:53 | FromDiscord | <Elegantbeef> You can of course test this all with a simple module |
06:02:40 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cpa |
06:02:55 | FromDiscord | <Elegantbeef> Afaik yes |
06:03:32 | FromDiscord | <Phil> And "extractFields" along there has access to the scopes of all its parent-generics? |
06:03:44 | FromDiscord | <Phil> Or only its own module and the root module? |
06:04:00 | FromDiscord | <Elegantbeef> The module it's being instantiated and the module it's located in |
06:07:09 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cpb |
06:08:23 | FromDiscord | <Phil> So that's what I'm troubleshooting |
06:09:33 | FromDiscord | <Phil> I guess "who calls who" is bad wording, "who defines who" would be more accurate |
06:10:15 | FromDiscord | <Elegantbeef> No clue if wandbox works for you but this is the best example https://wandbox.org/permlink/tltHRDPkGcapJJfC |
06:10:54 | FromDiscord | <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:14 | FromDiscord | <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:07 | FromDiscord | <Elegantbeef> It was showing it only considers isntantation and declaration |
06:14:42 | FromDiscord | <Elegantbeef> Instantation is above module i think |
06:15:48 | * | kenran joined #nim |
06:16:07 | FromDiscord | <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:17 | FromDiscord | <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:54 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cpy |
09:04:22 | FromDiscord | <Elegantbeef> Shallowcopy doesnt exist for arc/orc |
09:04:23 | FromDiscord | <Goel> (edit) "https://play.nim-lang.org/#ix=4cpy" => "https://play.nim-lang.org/#ix=4cpz" |
09:04:30 | FromDiscord | <Elegantbeef> Nim is moving to orc by default |
09:04:51 | FromDiscord | <Elegantbeef> So packages need to take that into account |
09:05:31 | FromDiscord | <Elegantbeef> https://github.com/jangko/nimPNG/issues/73 |
09:06:04 | FromDiscord | <Goel> Oh haven't noticed that, thanks |
09:15:13 | FromDiscord | <enthus1ast> is there a way to get information about an imported module? Like its path in the filesystem? |
09:16:37 | FromDiscord | <enthus1ast> on compiletime would be enough \:) |
09:18:13 | FromDiscord | <enthus1ast> i could maybe do the same search that nimble does |
09:18:16 | FromDiscord | <Phil> I also despaired at this question enthus1ast |
09:18:20 | FromDiscord | <enthus1ast> but this feels meh |
09:18:21 | FromDiscord | <Elegantbeef> I do not think it's possible to take a symbol and get it's path |
09:18:37 | FromDiscord | <Phil> The conclusion I came to is "Allow the user to do string interpolation in importNimja and the extends thingies" |
09:18:48 | FromDiscord | <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:25 | FromDiscord | <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:34 | FromDiscord | <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:59 | FromDiscord | <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:22 | FromDiscord | <Phil> No wait, you can't know the module name |
09:25:23 | FromDiscord | <Phil> Err |
09:25:25 | FromDiscord | <enthus1ast> yeah |
09:25:41 | FromDiscord | <Phil> I keep coming back to "your only choice is letting the users decide" |
09:25:51 | * | dnh joined #nim |
09:26:14 | FromDiscord | <enthus1ast> at least this was one idea i had |
09:26:15 | FromDiscord | <enthus1ast> yeah i should also let the user decide |
09:26:43 | FromDiscord | <enthus1ast> but at least provide a convienient way to get the path to a module |
09:26:44 | FromDiscord | <Elegantbeef> Well i'm going to go but ping me to what you guys are talking about↵(@Phil) |
09:27:02 | FromDiscord | <Elegantbeef> I might have some abuse ideas that can solve it |
09:27:08 | FromDiscord | <enthus1ast> the issue is, that nimja's import is relative to the sourceDir |
09:27:19 | FromDiscord | <enthus1ast> but this cannot work, when you have modules |
09:27:19 | FromDiscord | <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:21 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/macros.html#getProjectPath ? |
09:28:25 | FromDiscord | <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:38 | FromDiscord | <enthus1ast> yes thats what is used internally |
09:28:53 | FromDiscord | <Elegantbeef> Anyway i'm now really going to go |
09:29:32 | FromDiscord | <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:28 | FromDiscord | <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:17 | FromDiscord | <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:40 | FromDiscord | <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:23 | FromDiscord | <Phil> sent a long message, see http://ix.io/4cq2 |
09:55:24 | FromDiscord | <enthus1ast> ok i see |
10:03:51 | FromDiscord | <Phil> Is enabling expressions in importnimja / extends that hard? |
10:04:07 | FromDiscord | <enthus1ast> have not looked into it |
10:04:13 | FromDiscord | <enthus1ast> \:) |
10:04:14 | FromDiscord | <enthus1ast> yet |
10:04:41 | FromDiscord | <enthus1ast> currently i just use the param as a string |
10:04:58 | FromDiscord | <enthus1ast> i could parse it as an expression or so |
10:05:54 | FromDiscord | <enthus1ast> but it must work on compiletime though |
10:06:35 | FromDiscord | <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:09 | FromDiscord | <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:45 | FromDiscord | <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:28 | FromDiscord | <enthus1ast> but i'll look into it |
10:16:28 | * | PMunch joined #nim |
10:24:10 | * | dtomato joined #nim |
10:59:46 | NimEventer | New 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:05 | FromDiscord | <untoreh> sent a code paste, see https://paste.rs/po4 |
11:42:07 | * | arkurious joined #nim |
11:42:42 | FromDiscord | <ChocolettePalette> Yes, the third evocation should be withX(false)↵(@untoreh) |
11:43:41 | PMunch | Hmm, what a weird error message |
11:45:29 | FromDiscord | <ChocolettePalette> I believe that parameters with default values should be passed after all the parameters without these |
11:45:58 | FromDiscord | <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:56 | FromDiscord | <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:49 | FromDiscord | <wiga> Is if/return a thing in nim? |
12:33:52 | FromDiscord | <wiga> Smth like↵if thing.len == 0: return |
12:48:58 | * | derpydoo joined #nim |
12:53:58 | FromDiscord | <Rika> sure? |
12:54:05 | FromDiscord | <Rika> what error do you get |
12:54:13 | FromDiscord | <Rika> that makes you think it doesnt |
13:25:29 | Amun-Ra | there's no default return value if that's what he mean |
13:33:38 | FromDiscord | <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:21 | FromDiscord | <wiga> I remember having a syntax error of some sort when i did it last time but i dont remember why exactly |
13:34:28 | FromDiscord | <wiga> And what was the error |
13:34:39 | FromDiscord | <wiga> And if it was caused by external reasons |
13:35:02 | Amun-Ra | that wasn't return related for sure |
13:35:09 | FromDiscord | <wiga> Alright |
13:35:18 | FromDiscord | <wiga> Imma retry later then |
13:35:21 | FromDiscord | <wiga> Ty |
13:35:37 | Amun-Ra | (or return type was incorrect) |
13:37:28 | FromDiscord | <wiga> Like just to make the process die if it doesnt meet the condition |
13:37:43 | FromDiscord | <wiga> on jester specifically |
13:38:20 | FromDiscord | <Rika> on jester you have to respond with a response |
13:38:25 | FromDiscord | <Rika> i think |
13:38:28 | FromDiscord | <wiga> yes |
13:38:55 | FromDiscord | <wiga> so it'd be like if thing.len == 0: resp "no" |
13:39:13 | FromDiscord | <wiga> But will it exexcute the rest of the code? |
13:39:20 | FromDiscord | <wiga> (edit) "exexcute" => "exexute" |
13:39:26 | FromDiscord | <wiga> (edit) "exexute" => "execute" |
13:39:28 | FromDiscord | <Rika> yes |
13:39:32 | FromDiscord | <wiga> Stupid keyboard |
13:39:32 | FromDiscord | <Rika> iirc? |
13:39:37 | qwr | in a way there is default return value - it is the default value of result variable |
13:40:10 | FromDiscord | <wiga> In reply to @Rika "yes": Which is what i dont want to happen |
13:50:51 | FromDiscord | <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:52 | FromDiscord | <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:43 | FromDiscord | <Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=4crK |
14:30:47 | FromDiscord | <Hamid_Bluri> i don't know what happens here |
14:33:11 | Amun-Ra | auxym: 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:17 | strogon14 | How can I detect windows 32-bit vs 64-bit at compile time (i.e. with when-clause)? |
15:36:41 | FromDiscord | <mratsim> In reply to @strogon14 "How can I detect": when sizeof(int) == 4: 32-bit stuff |
15:41:17 | FromDiscord | <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:06 | FromDiscord | <Goel> Any native nim library for encode/decode of `.gif` files? |
17:06:53 | FromDiscord | <mratsim> In reply to @Goel "Any native nim library": https://nimble.directory/search?query=gif |
17:37:36 | strogon14 | mratsim: thanks, I'll try that. |
17:43:59 | * | rez quit (Quit: much snoozes...) |
18:03:35 | * | rez joined #nim |
18:16:12 | FromDiscord | <treeform> In reply to @Goel "Any native nim library": My lib, pixie has a gif decoder, even animated gif support. |
18:17:17 | FromDiscord | <treeform> https://github.com/treeform/pixie/blob/master/src/pixie/fileformats/gif.nim |
18:30:47 | * | rockcavera joined #nim |
18:38:51 | Amun-Ra | that's what I plan to do in my lib, too |
18:39:09 | Amun-Ra | I'm focusing more on old gfx formats |
18:42:56 | FromDiscord | <Phil> sent a long message, see http://ix.io/4ctp |
18:43:27 | FromDiscord | <Phil> I don't even have an excuse of the models being complicated or anything |
18:44:16 | FromDiscord | <Phil> Cost me the last 2 days or sth |
19:40:50 | FromDiscord | <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:11 | FromDiscord | <Phil> Wait, that character is literally there, that's not hidden unicode |
19:44:38 | FromDiscord | <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:33 | elph | Hey 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:47 | elph | (sorry if this is double posting, my client disconnected) |
20:25:54 | FromDiscord | <Horizon [She/Her]> What library should i use for including a header file in Nim? |
20:26:46 | FromDiscord | <Horizon [She/Her]> Wanting to make this code work in Nim |
20:26:54 | FromDiscord | <Horizon [She/Her]> https://haste.powercord.dev/tirujaloqu |
20:27:06 | FromDiscord | <Horizon [She/Her]> Just testing how well Go could be used within Nim |
20:31:27 | FromDiscord | <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:09 | elph | @hotdog, thanks! I'll have a look |
20:33:45 | FromDiscord | <Horizon [She/Her]> Just ended up writing my own glue |
20:46:25 | elph | @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:23 | FromDiscord | <hotdog> In reply to @elph "<@472459996068839424>, thanks, it works": Great! |
21:05:56 | FromDiscord | <Horizon [She/Her]> https://github.com/Mythical-Forest-Collective/GoNim simple test |
21:06:16 | FromDiscord | <Horizon [She/Her]> Is there the possibility of GC conflicts for bigger codebases in Golang? |
21:06:30 | FromDiscord | <Horizon [She/Her]> If so, would using `goroutines` for the GC be better? |
21:07:29 | * | fallback joined #nim |
21:08:31 | FromDiscord | <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:23 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |
23:49:06 | * | krux02 quit (Quit: Leaving) |
23:53:09 | FromDiscord | <Patitotective> <@&371760044473319454> |
23:56:42 | FromDiscord | <albassort> >telegram |
23:57:41 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |
23:59:22 | FromDiscord | <albassort> @Yardanico come here you fuck |
23:59:47 | FromDiscord | <Emmanuel4 Elishaboy> sent a long message, see http://ix.io/4cuk |