00:06:13 | * | wallabra quit (Ping timeout: 244 seconds) |
00:07:40 | * | wallabra joined #nim |
00:12:15 | arkanoid | await are not executed inside a finally block, even if the even loop is running |
00:18:20 | * | derpydoo joined #nim |
00:27:21 | * | ehmry quit (Ping timeout: 260 seconds) |
00:29:31 | * | ehmry joined #nim |
00:43:42 | arkanoid | here's a minimal example that shows the problem https://play.nim-lang.org/#ix=4ehr |
01:03:20 | arkanoid | this is even more strange https://play.nim-lang.org/#ix=4ehw |
01:12:59 | arkanoid | you know you're wasting time on a language issue when ... https://play.nim-lang.org/#ix=4ehx |
01:18:03 | * | tinytoast quit (Remote host closed the connection) |
01:18:12 | * | tinystoat joined #nim |
01:23:08 | FromDiscord | <Elegantbeef> Seems less like a language issue and more like a binding interaction issue, but idk |
01:33:03 | FromDiscord | <Girvo> Q: how does one clear/zero an array? |
01:33:10 | FromDiscord | <Elegantbeef> `reset` |
01:33:24 | FromDiscord | <Girvo> Nice 🙂 |
01:33:25 | FromDiscord | <Girvo> Cheers |
01:37:58 | FromDiscord | <Girvo> Array equality? I can use `diff` I guess? Or just write a simple iterator over them |
01:38:08 | FromDiscord | <Girvo> Array _value_ equality, I mean |
01:38:20 | FromDiscord | <Elegantbeef> `==` works by default if that's what you mean |
01:39:39 | FromDiscord | <Elegantbeef> If they're two different sized arrays you know what i'll say 😛 |
01:39:46 | FromDiscord | <Girvo> 😛 |
01:39:50 | FromDiscord | <Girvo> Okay sweet as |
01:39:53 | FromDiscord | <Elegantbeef> Something about opened doors |
01:40:13 | FromDiscord | <Elegantbeef> Wait not doors, uhhh rays? |
01:40:32 | FromDiscord | <Rika> You want to what? Open a ray! |
01:40:35 | FromDiscord | <Rika> (edit) "ray!" => "ray?" |
01:40:42 | FromDiscord | <Elegantbeef> hmm |
01:46:07 | * | arkurious quit (Quit: Leaving) |
01:58:09 | * | nisstyre quit (Changing host) |
01:58:09 | * | nisstyre joined #nim |
02:05:44 | * | rockcavera quit (Remote host closed the connection) |
02:12:34 | * | derpydoo quit (Ping timeout: 250 seconds) |
02:16:18 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=4ehC |
02:16:39 | FromDiscord | <Elegantbeef> Nim does not have inference on object constructors |
02:16:44 | FromDiscord | <Girvo> Fair enough 🙂 |
02:16:48 | FromDiscord | <Elegantbeef> The solution is to make a constructor |
02:16:59 | FromDiscord | <Girvo> Easy as |
02:20:28 | FromDiscord | <Girvo> Okay I'm doing something wrong here |
02:21:42 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=4ehD |
02:22:00 | FromDiscord | <Elegantbeef> `slaveId =` for named parameters |
02:22:09 | FromDiscord | <Elegantbeef> aalso you need the generic parameter in the constructor still |
02:22:18 | FromDiscord | <Girvo> Yeah just realised your second point |
02:23:09 | FromDiscord | <Girvo> That got it 🙂 |
02:23:10 | FromDiscord | <Girvo> Cheers |
02:27:09 | FromDiscord | <Girvo> Modbus writing and reading is now working fully, yay. And is using properly static buffers instead of `seq` (though it also supports them) |
02:39:31 | FromDiscord | <Elegantbeef> Also due to how typeclasses work you should be able to do `WriteMultiRegParams[EndianNumbers]` assuming it's a typeclass |
02:39:54 | FromDiscord | <Elegantbeef> \Typeclasses bind to a single type unless prefixed with `distinct` |
02:59:30 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
03:00:05 | * | pbsds joined #nim |
03:13:32 | FromDiscord | <Bung> what's this meaning `type Amount[date: static[int]] = distinct float` |
03:14:20 | FromDiscord | <Bung> found in https://github.com/nim-lang/Nim/issues/6026 |
03:18:00 | FromDiscord | <Elegantbeef> It's a distinct float with a int annotation |
03:19:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ehG |
03:21:36 | FromDiscord | <Bung> so the final structure will be like ? |
03:22:07 | FromDiscord | <Elegantbeef> Both are internally floats but are not the same type |
03:22:18 | FromDiscord | <Elegantbeef> `static int` is just a value discriminated type |
03:22:55 | FromDiscord | <Bung> I haven't seen this real be used, is it designed ? |
03:23:01 | FromDiscord | <Elegantbeef> Of course it is |
03:23:13 | FromDiscord | <Elegantbeef> You dont ever need to use the generic parameters in a type definition |
03:24:01 | FromDiscord | <Bung> oh, that sound like case of |
03:24:12 | FromDiscord | <Elegantbeef> I infact use this specifically https://github.com/beef331/truss3d/blob/master/src/truss3D/shaders.nim#L9 |
03:24:52 | FromDiscord | <Elegantbeef> Well actually it's not static, but meh same thing |
03:24:59 | FromDiscord | <Elegantbeef> `static int` is basically a type |
03:25:01 | FromDiscord | <Bung> I understand now, it only affect type inferrence |
03:25:15 | FromDiscord | <Elegantbeef> It doesnt only effect type inferrence |
03:25:15 | FromDiscord | <Elegantbeef> It's a distinct type |
03:25:36 | FromDiscord | <Elegantbeef> `Amount[0]` and `Amount[1]` require conversion to eachother and or from `float` |
03:28:18 | FromDiscord | <Bung> yep, float to them, but still in domain of type inferrence |
03:29:20 | FromDiscord | <Elegantbeef> I dont see how but i'll just shush |
03:57:17 | * | Jjp137 quit (Quit: Leaving) |
04:03:04 | * | Jjp137 joined #nim |
04:37:13 | * | Onionhammer quit (Quit: Ping timeout (120 seconds)) |
04:39:19 | * | Onionhammer joined #nim |
06:14:51 | * | dnh joined #nim |
06:24:50 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
06:44:37 | * | PMunch joined #nim |
06:52:05 | * | Amun-Ra quit (Ping timeout: 268 seconds) |
07:08:06 | * | jjido joined #nim |
07:15:34 | * | m5zs7k quit (Ping timeout: 244 seconds) |
07:16:38 | * | m5zs7k joined #nim |
07:26:44 | * | kenran joined #nim |
07:26:49 | * | kenran quit (Remote host closed the connection) |
07:34:41 | * | Amun-Ra joined #nim |
07:46:26 | madprops | helo nimbros |
07:50:31 | FromDiscord | <Prestige> Hello |
08:01:32 | FromDiscord | <fwsgonzo> Hey all, is it possible to program the AST so that if you don't call a given function from inside another given function, you get an error message? |
08:01:36 | FromDiscord | <fwsgonzo> (edit) "an" => "a compile-time" |
08:10:05 | FromDiscord | <Elegantbeef> What's even the point of having the second function in main scope |
08:10:38 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eie |
08:16:18 | FromDiscord | <fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=4eih |
08:16:39 | FromDiscord | <fwsgonzo> (edit) "https://play.nim-lang.org/#ix=4eih" => "https://play.nim-lang.org/#ix=4eii" |
08:16:53 | FromDiscord | <Elegantbeef> Just use destructors? |
08:17:16 | FromDiscord | <Elegantbeef> Destructors + effect system |
08:18:34 | FromDiscord | <fwsgonzo> That would make the Nim implementation too different from VCL. VCL is more C-like and simpler in nature. I agree that a simple return value could contain all the needed stuff, but for example:↵There is a function called RECV which is the top level request entry function. In it you can return: SYNTH, HASH etc. If you return other valid return states like DELIVER you should get a compilation error. |
08:20:44 | FromDiscord | <fwsgonzo> sent a code paste, see https://paste.rs/5H6 |
08:20:59 | FromDiscord | <fwsgonzo> (edit) "https://play.nim-lang.org/#ix=4eik" => "https://play.nim-lang.org/#ix=4eij" |
08:21:11 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
08:21:13 | FromDiscord | <Elegantbeef> I feel like you could use the type system |
08:21:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4eil |
08:28:23 | PMunch | You could do something like this: https://play.nim-lang.org/#ix=4eio |
08:28:36 | PMunch | It's not a compilation error though.. |
08:29:14 | PMunch | I tried to set `calledEndThing` to be {.compileTime.}, but unfortunately that didn't work |
08:29:33 | PMunch | And of course it's much harder to guarantee that endThing will always be called |
08:29:57 | PMunch | E.g. with the effects system you will only be able to tell if one branch has endThing, but not if every branch has endThing AFAIK |
08:34:43 | FromDiscord | <Elegantbeef> Here's how you'd do that statically pmunch https://play.nim-lang.org/#ix=4eiq |
08:35:04 | FromDiscord | <Elegantbeef> Even with the ability to say which procedure it needs to call |
08:35:43 | FromDiscord | <Elegantbeef> Though it doesnt ensure that every path calls it cause I dont feel like implementing static analysis in macros or at this hour |
08:45:38 | PMunch | That only checks if it is called directly though |
08:46:13 | PMunch | If you create a procedure say e.g. `cleanup` and try to call `endThing` from there then this won't pick that up |
08:50:03 | FromDiscord | <Elegantbeef> Sure but that's what implementing static analysis would be fore |
08:50:41 | FromDiscord | <demotomohiro> I think you can create a macro as a pragma that check the AST of body of the given procedure. |
08:51:33 | FromDiscord | <Elegantbeef> Yea you need to walk all procedure calls, checking their code, and get definitive call logic in there, just what a compiler does 😛 |
09:01:15 | PMunch | Yeah it should certainly be possible to traverse the syntax tree and get the implementation of the procedure calls until you find a call to your procedure in a node (need to watch out for recursion though). |
09:02:01 | PMunch | It won't be able to traverse into callbacks though |
09:13:03 | * | kenran joined #nim |
09:20:56 | FromDiscord | <fwsgonzo> That is very nice. I can use that example to show how Nim AST programming could simplify the porting of VCL logic to Nim |
09:21:44 | FromDiscord | <fwsgonzo> (edit) "Nim" => "Nim. Certain things will translate well to proper abstractions and types, and other things can perhaps be caught at compile-time using AST programming" |
09:23:56 | FromDiscord | <planetis> Or you can make a DSL this way you make sure it's used as it should be. |
09:24:43 | FromDiscord | <fwsgonzo> VCL is already a DSL, but it's not run inside isolation. I am using a custom-made emulator to run a VCL-alternative in the cache. It could be any language, including Nim |
09:25:31 | FromDiscord | <fwsgonzo> Considering all the work that goes into making a sane language, I don't think it's something for me.) |
09:25:34 | FromDiscord | <fwsgonzo> (edit) "me.)" => "me 🙂" |
09:43:46 | FromDiscord | <System64 ~ Flandre Scarlet> I have a question, are things like arrays, structs and so on cleaned up automatically by garbage collector when you interop with a C library?↵because I read that https://git.sr.ht/~exelotl/nim-tilengine and↵> Note: these bindings do use manual memory management, so you must call map.delete() etc. to avoid leaks. |
09:47:13 | NimEventer | New thread by sls1005: Nimscript and GPL, see https://forum.nim-lang.org/t/9557 |
09:49:35 | FromDiscord | <ChocolettePalette> If it was safely created within nim, then you don't have to do anything↵(@System64 ~ Flandre Scarlet) |
09:50:13 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ChocolettePalette "If it was safely": what do you mean by that? The lib is written in C |
09:52:29 | FromDiscord | <demotomohiro> Garbage collector clean up ref object or seqs in heap and doesn't clean up arrays or object types in stack. |
09:53:18 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Garbage collector clean up": even Java and C# don't clean up stack I think? |
09:53:48 | FromDiscord | <demotomohiro> In reply to @System64 "even Java and C#": http://zevv.nl/nim-memory/ |
09:54:32 | FromDiscord | <demotomohiro> Things in stack is clean up when the function returns. |
09:56:24 | FromDiscord | <System64 ~ Flandre Scarlet> Yeah that's what I meant, so don't need a GC for that |
09:57:24 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/system64MC/NimTilengine/tree/master/src↵And is that memory safe? |
10:06:46 | FromDiscord | <exelotl> @System64 ~ Flandre Scarlet if you wanna have C types get automatically cleaned up when there are no more references to them, you can use ARC/ORC and either wrap them in `ref` objects or implement the refcounting yourself. See this thread: https://forum.nim-lang.org/t/9006 |
10:07:38 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4eiP |
10:08:07 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @exelotl "<@380360389377916939> if you wanna": Ah alright, and are the performances still good? |
10:10:12 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "If you pass an": So what I did in my binding is unsafe? |
10:12:57 | FromDiscord | <exelotl> There will be some performance overhead but it doesnt matter too much for this library because refcounting and pointer indirection at the procedure calls is never gonna be the bottleneck (compared to the rendering code in the engine) |
10:13:38 | FromDiscord | <demotomohiro> You would better to learn how stacks works and you can judge safe or not yourself. http://zevv.nl/nim-memory/ |
10:15:11 | FromDiscord | <demotomohiro> I don't know where your binding calls C functions and how called C functions works. |
10:39:59 | FromDiscord | <exelotl> In reply to @exelotl "<@380360389377916939> if you wanna": I should say this is also harder than it sounds because you need to know if the library is still holding onto something or not. For example when you load a map, Tilengine can create palettes for it, which you can access, but you can also make your own palettes. |
10:41:13 | FromDiscord | <System64 ~ Flandre Scarlet> So probably manual management is easier? |
10:41:40 | FromDiscord | <exelotl> yeah, it saves a lot of hassle in this case |
10:42:11 | FromDiscord | <System64 ~ Flandre Scarlet> One rule : You don't use it anymore? Put it in the trash |
10:42:46 | * | kenran quit (Remote host closed the connection) |
10:44:09 | FromDiscord | <System64 ~ Flandre Scarlet> But in any case, I think Nim's manual memory management is safer than C, as long as I don't do weird things |
11:02:52 | * | jjido joined #nim |
11:21:41 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
11:48:41 | * | jjido joined #nim |
12:01:17 | FromDiscord | <exelotl> hmm, shouldn't `high(set[T])` work? |
12:15:57 | * | jmdaemon quit (Ping timeout: 240 seconds) |
12:18:43 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4ejl |
12:19:01 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=4ejl" => "https://play.nim-lang.org/#ix=4ejm" |
12:19:33 | FromDiscord | <jmgomez> from std/hashes |
12:20:17 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=4ejm" => "https://play.nim-lang.org/#ix=4ejn" |
12:20:25 | FromDiscord | <enthus1ast> mh, maybe different encoding? |
12:20:31 | FromDiscord | <enthus1ast> yeah strange |
12:21:05 | FromDiscord | <enthus1ast> is `file == "skdtest"` ? |
12:22:48 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4ejo |
12:25:29 | FromDiscord | <untoreh> can I find out the actual variable being destroyed by a call of `nimDestroyAndDispose` ? |
12:32:18 | FromDiscord | <jmgomez> In reply to @enthus1ast "mh, maybe different encoding?": seems win file system is utf-16 but nim should be converting it to utf-8 |
12:32:46 | FromDiscord | <jmgomez> In reply to @enthus1ast "is `file == "skdtest"`": it isnt! hmm will try char by char.. |
12:33:26 | * | derpydoo joined #nim |
12:36:54 | FromDiscord | <jmgomez> In reply to @jmgomez "Why this two hashes": Im clearly blind.. it's outputing skdtest LOL |
12:37:08 | FromDiscord | <jmgomez> (edit) "skdtest" => "skdtest" |
12:43:38 | FromDiscord | <haxscramper> In reply to @Tanguy "Do we have any": I'm in process of writing the python script to pull data from the GH repository, but so far I've determined there were 1960 unique users who created issue and/or commented on issues |
12:43:39 | FromDiscord | <haxscramper> in the repo |
12:44:16 | FromDiscord | <haxscramper> Also average time to close the issue is ~375.48103347551967 days |
12:44:56 | FromDiscord | <Tanguy> That's useful data, but also nim is the first language I used where I had to open an issue on the compiler 🙂 |
12:45:25 | FromDiscord | <Tanguy> In reply to @haxscramper "Also average time to": Are you taking into account still opened tickets? Not sure how to take them into account though |
12:46:01 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/4pc |
12:46:16 | FromDiscord | <haxscramper> gives `32441588.3345203` seconds which is ~375 days according to google |
12:49:48 | FromDiscord | <haxscramper> https://mega.nz/file/Z4cz3DCB#Lfjg_g69nJJGQU5cfjSONaePFyjyoQ7CSYF6BUxKktc here is an SQLIte db if you are interested |
12:50:03 | FromDiscord | <haxscramper> (edit) "https://mega.nz/file/Z4cz3DCB#Lfjg_g69nJJGQU5cfjSONaePFyjyoQ7CSYF6BUxKktc here is an SQLIte db if you are interested ... " added "with current info" |
12:51:28 | FromDiscord | <haxscramper> In reply to @haxscramper "gives `32441588.3345203` seconds which": to actually close the (`closed_at` is not null) takes ~206 days |
12:52:06 | NimEventer | New thread by sls1005: Calling conversions for C macros, see https://forum.nim-lang.org/t/9558 |
13:02:57 | FromDiscord | <Horizon [She/Her]> How would i expose the automatically generated main function to Emscripten? |
13:09:40 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
13:11:46 | FromDiscord | <Horizon [She/Her]> I'm trying to compile my Nim code to standalone wasm |
13:15:15 | FromDiscord | <haxscramper> automatically generated main is `main()` as in regular C program and IIRC it is called automatically |
13:15:19 | FromDiscord | <Horizon [She/Her]> Eyyy i got it to work! I had to write my own main and pass the `--nomain` flag though, so if anyone knows a better way to do that... |
13:15:33 | FromDiscord | <Horizon [She/Her]> In reply to @haxscramper "automatically generated main is": Emscripten doesn't seem to see that |
13:15:46 | FromDiscord | <Horizon [She/Her]> I can get the output if ya want? |
13:16:08 | FromDiscord | <haxscramper> Then `--nomain` is as good solution as any, it doesn't really feel like a hack-in if you are worried about that |
13:16:28 | FromDiscord | <haxscramper> emscripten can be a bit umm annoying like that |
13:16:38 | FromDiscord | <Horizon [She/Her]> Hm does Nim not do any special stuff for initialising the GCs or? |
13:16:56 | FromDiscord | <Horizon [She/Her]> Yeah the main proc is actually cleaner xD |
13:18:26 | FromDiscord | <Rika> In reply to @Event Horizon "Hm does Nim not": depends on the GC; some dont need init |
13:18:35 | FromDiscord | <Rika> init is done when `NimMain` is called |
13:19:06 | FromDiscord | <Horizon [She/Her]> In reply to @Rika "depends on the GC;": How about with `arc` then? |
13:20:05 | FromDiscord | <haxscramper> https://github.com/haxscramper/hack/blob/4b3672348cef91bb8e9441d29c127e73be5d4b69/testing/c/wasm/niminterop/main.c because <IDR what reason> I just wrote a clean `main.c` that kickstarted everything |
13:23:07 | * | rockcavera joined #nim |
13:23:08 | * | rockcavera quit (Changing host) |
13:23:08 | * | rockcavera joined #nim |
13:23:50 | * | arkurious joined #nim |
13:24:00 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4ejG |
13:24:04 | FromDiscord | <Horizon [She/Her]> But also fair enough |
13:26:11 | FromDiscord | <Horizon [She/Her]> sent a code paste, see https://paste.rs/E9w |
13:26:15 | FromDiscord | <Horizon [She/Her]> Emscripten is annoying with Nim, i can see that now |
13:28:27 | PMunch | @Rika, you still need NimMain to initialize global variables |
13:29:15 | FromDiscord | <Rika> technically i never said that NimMain isnt a required call but i guess the implication was there |
13:29:16 | FromDiscord | <Rika> xddddddddd |
13:30:09 | PMunch | But yeah `--nomain` stops the generation of a main function which just calls NimMain. You can use `proc main() {.importc: "NimMain".}` to get a procedure you can call to run NimMain from whatever entrypoint you need |
13:31:46 | * | LuxuryMode joined #nim |
13:39:32 | FromDiscord | <Horizon [She/Her]> Ah neat |
13:41:20 | FromDiscord | <Horizon [She/Her]> It's still annoying that this... Workaround is needed |
13:41:45 | FromDiscord | <Phil> In reply to @PMunch "But yeah `--nomain` stops": TBH writing your own main function is one of the main best practices that I immediately copied from python |
13:42:18 | PMunch | What do you mean? |
13:42:59 | FromDiscord | <Horizon [She/Her]> Emscripten doesn't seem to like Nim's generated main function and refuses to compile unless i create my own (which doesn't handle the NimMain stuff) |
13:44:23 | FromDiscord | <Horizon [She/Her]> (The one created when you just compile it by default) |
13:44:25 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ejS |
13:58:24 | * | PMunch quit (Quit: Leaving) |
14:03:58 | FromDiscord | <Rika> `when isMainModule: main()` though? |
14:04:08 | FromDiscord | <Rika> idk if thats the right constant name |
14:05:05 | FromDiscord | <Snowball^> VS code run button does not work |
14:05:22 | FromDiscord | <Snowball^> it just tells me to select a exstension for nim that i have allready installe |
14:05:25 | FromDiscord | <Snowball^> how do i fix? |
14:05:31 | FromDiscord | <Snowball^> (edit) "installe" => "installed" |
14:13:26 | FromDiscord | <Snowball^> and yes nim is installed |
14:24:36 | FromDiscord | <Phil> I don't really use nim's run button, I set up a vscode task to compile on save |
14:24:55 | FromDiscord | <Phil> (edit) "nim's" => "vscode's" | "button," => "button for nim," |
14:25:00 | FromDiscord | <vindaar> yeah, that's the equivalent of the ugly `name` comparison in python (without the main could be called even if the file is imported in another file, if anyone is unaware). And yes, that's the right name↵(@Rika) |
14:26:13 | FromDiscord | <vindaar> (btw it's really useful that code in a `when` block at top level is still at top level, i.e. `import` under `when isMainModule` still works. Allows to only import things required if a module is used as a standalone, e.g. using `cligen` to dispatch as a CL handler) |
14:27:53 | FromDiscord | <Snowball^> In reply to @Isofruit "I don't really use": how do i do that? |
14:34:22 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ek4 |
14:34:25 | FromDiscord | <Phil> Generally: The docs about this are here: https://code.visualstudio.com/Docs/editor/tasks |
14:36:53 | FromDiscord | <Snowball^> ok ty |
15:01:16 | * | wallabra joined #nim |
15:18:34 | FromDiscord | <ChocolettePalette> Seems very much like json format to me IMHO↵(@Phil) |
15:24:56 | FromDiscord | <Phil> In reply to @ChocolettePalette "Seems very much like": and? |
15:39:08 | FromDiscord | <Rika> im confused about what you are trying to convey lol |
15:39:12 | FromDiscord | <Rika> yeah thats json |
16:13:40 | * | derpydoo quit (Ping timeout: 250 seconds) |
16:31:29 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
17:13:29 | NimEventer | New thread by EnteryName: Question about patterns, see https://forum.nim-lang.org/t/9559 |
17:22:49 | * | joast joined #nim |
17:31:33 | * | derpydoo joined #nim |
20:08:39 | * | derpydoo quit (Quit: derpydoo) |
20:52:31 | * | jmdaemon joined #nim |
21:33:41 | * | jjido joined #nim |
21:39:18 | * | derpydoo joined #nim |
21:55:28 | FromDiscord | <geekrelief> How can I test for the existence of a C `#define` from nim? I want to check if `_DLL` is defined and do conditional compilation on that. |
21:57:52 | FromDiscord | <geekrelief> I guess in this case maybe I can example system.appType, but I wonder if there's a general answer to my question. |
21:57:58 | FromDiscord | <geekrelief> (edit) "example" => "examine" |
22:00:25 | FromDiscord | <guttural666> how do I avoid a name conflict here? these nones should be scoped to the respective enums, right? that's what I thought at least https://media.discordapp.net/attachments/371759389889003532/1035674423749005364/unknown.png |
22:01:24 | FromDiscord | <geekrelief> In reply to @guttural666 "how do I avoid": what version of nim are you running? |
22:01:47 | FromDiscord | <guttural666> In reply to @geekrelief "what version of nim": v1.6.6 |
22:02:16 | FromDiscord | <geekrelief> someone correct me if I'm wrong, but you can try using {.pure.} on the enums |
22:03:05 | FromDiscord | <geekrelief> I think overloadable enums are going to be the default in the future |
22:05:46 | FromDiscord | <Prestige> Is that actually a compile error? I'm pretty sure I've done the same thing and it worked just fine |
22:06:52 | FromDiscord | <geekrelief> maybe you need a flag or an experimental pragma? |
22:07:02 | FromDiscord | <geekrelief> https://github.com/nim-lang/Nim/blob/a6189fbb988ae9c9e6760cb901e792e043b9086b/tests/enum/toverloadable_enums.nim |
22:07:03 | FromDiscord | <guttural666> pure works, thanks! |
22:07:09 | FromDiscord | <geekrelief> oh ok great! |
22:17:28 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
22:36:57 | * | derpydoo quit (Quit: derpydoo) |
22:39:13 | FromDiscord | <Elegantbeef> If they're in different modules it works, or if you dont have overloadable enums or if you use pure↵(@Prestige) |
22:39:41 | * | wallabra quit (Ping timeout: 260 seconds) |
22:39:59 | * | pyrex joined #nim |
22:40:46 | * | wallabra joined #nim |
22:44:53 | FromDiscord | <guttural666> why would anything but pure be the default, what's the intention behind that |
22:45:08 | FromDiscord | <guttural666> who would want their namespaces littered in such a way? |
22:45:42 | FromDiscord | <Elegantbeef> This is Nim and you ask that? |
22:45:52 | FromDiscord | <Elegantbeef> Nim is all about writing code without namespaces |
22:46:13 | FromDiscord | <Elegantbeef> You say "import this module\` and you get all it's exported symbols first class |
22:46:33 | FromDiscord | <Elegantbeef> The only downside with this is that overloadable enums were not default so same enum names could not be used |
22:50:10 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:50:37 | * | dnh joined #nim |
23:25:58 | FromDiscord | <guttural666> makes sense |