00:00:10 | FromDiscord | <@bracketmaster-5a708063d73408ce4> its not really working for me for some reason |
00:00:15 | FromDiscord | <Jakraes> Oh gotcha, I'll stick with the first example you gave, seems like the best option |
00:00:19 | FromDiscord | <@bracketmaster-5a708063d73408ce4> cannot add to node kind\: nnkEmpty |
00:00:29 | FromDiscord | <ElegantBeef> `result = newStmtList()` |
00:00:32 | FromDiscord | <ElegantBeef> then run the loop |
00:00:54 | FromDiscord | <ElegantBeef> the default value for a nimnode is an EmptyNode |
00:02:14 | FromDiscord | <@bracketmaster-5a708063d73408ce4> TY! |
00:02:16 | FromDiscord | <@bracketmaster-5a708063d73408ce4> that worked |
00:06:39 | FromDiscord | <ElegantBeef> Well if it didnt i'd have to retire from my non existent macro writing career |
00:39:30 | FromDiscord | <@bracketmaster-5a708063d73408ce4> heh |
00:40:05 | FromDiscord | <@bracketmaster-5a708063d73408ce4> so previously, I had the for loop generate code that echoed 1 through 5 |
00:40:29 | FromDiscord | <@bracketmaster-5a708063d73408ce4> now I'm looking to generate code that builds and array of [1,2,3,4,5] |
00:40:39 | FromDiscord | <@bracketmaster-5a708063d73408ce4> doesn't look like this can be done with quote do |
00:40:55 | FromDiscord | <ElegantBeef> Eh it complicates it needlessly to do so |
00:42:07 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3tEs quite simple to do without quote do |
00:42:07 | FromDiscord | <checkersai> In reply to @checkersai "Is there a nim": I went ahead and just used sdl2nim |
00:42:14 | FromDiscord | <@bracketmaster-5a708063d73408ce4> well, I'll try the stmt way then |
00:42:30 | FromDiscord | <ElegantBeef> Well you could use pixie + gflw or sdl to show the image |
00:42:58 | FromDiscord | <checkersai> I'm not trying to show an image |
00:43:21 | FromDiscord | <checkersai> I literally want to draw individual pixels onto the window |
00:43:38 | FromDiscord | <checkersai> Because I'm trying to write a 3d software renderer |
00:44:02 | FromDiscord | <checkersai> I'm following along with this: https://github.com/ssloy/tinyrenderer |
00:44:05 | fn | <R2D299> itHub: 7"A brief computer graphics / rendering course" |
00:45:03 | FromDiscord | <ElegantBeef> I mean yea it's all going to be about the same |
00:45:39 | FromDiscord | <checkersai> yeah |
00:45:59 | FromDiscord | <checkersai> I wrote a quick and dirty backend |
00:46:10 | FromDiscord | <checkersai> But I can draw triangles and stuff |
00:46:41 | FromDiscord | <@bracketmaster-5a708063d73408ce4> @\_discord\_202953368958795776\:t2bot.io \: check this out - https://github.com/BracketMaster/nimRasterizer |
00:46:42 | FromDiscord | <ElegantBeef> Are those all software rendered examples, or do they branch out to opengl? |
00:46:43 | fn | <R2D299> itHub: 7"A humble triangle rasterizer in Nim." |
00:47:28 | FromDiscord | <checkersai> In reply to @@bracketmaster-5a708063d73408ce4 "@\_discord\_202953368958795776\:t2bot.io \: check t": yeah that's pretty much what I'm doing |
00:48:22 | * | Mister_Magister quit (Quit: bye) |
00:48:45 | * | Mister_Magister joined #nim |
00:49:34 | FromDiscord | <checkersai> In reply to @ElegantBeef "Are those all software": the course is basically "write a basic simplified clone of opengl" |
00:50:26 | FromDiscord | <checkersai> the point is to learn the general process happening under the hood |
01:07:06 | FromDiscord | <@bracketmaster-5a708063d73408ce4> StmtList↵ Bracket↵ IntLit 1↵ IntLit 2 |
01:07:07 | FromDiscord | <@bracketmaster-5a708063d73408ce4> how can i build the following with nnks? |
01:10:00 | FromDiscord | <ElegantBeef> I showed you how in the last link |
01:10:11 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3tEs |
01:45:47 | * | Guest27 joined #nim |
01:57:55 | FromDiscord | <Hatcom> how do you check if a variable is empty or nil? |
01:59:04 | FromDiscord | <Hatcom> i've tried `.isNil()`, `== nil`, and `.isNone` and none of them have worked. |
02:04:38 | FromDiscord | <carmysilna> What's the expression? |
02:05:37 | * | TakinOver quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
02:06:57 | FromDiscord | <ElegantBeef> Only nilable types can be nil in nim, which means `ref T` |
02:07:12 | FromDiscord | <ElegantBeef> Or pointers of course |
02:07:53 | FromDiscord | <Hatcom> sent a code paste, see https://paste.rs/f3h |
02:08:21 | FromDiscord | <Hatcom> where magic_number is an integer |
02:08:23 | FromDiscord | <ElegantBeef> Ok so yea int cannot be nil |
02:08:38 | FromDiscord | <Hatcom> but what if the user enters nothing? |
02:08:45 | FromDiscord | <ElegantBeef> i can show you what i'd do |
02:08:53 | FromDiscord | <Hatcom> do |
02:10:14 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tEA |
02:10:16 | FromDiscord | <ElegantBeef> Atleast for a single input this works |
02:10:23 | FromDiscord | <ElegantBeef> If you have more i'd point you towards `options` |
02:10:39 | FromDiscord | <ElegantBeef> Options gives you that python style "Hey this can have None" |
02:10:50 | FromDiscord | <generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3tEB |
02:10:55 | FromDiscord | <generic linux user> anyway to write it in single line? |
02:11:11 | FromDiscord | <ElegantBeef> Well you could do `and` |
02:11:21 | FromDiscord | <Hatcom> ig if i parsed it as a str |
02:11:22 | FromDiscord | <Hatcom> sent a code paste, see https://play.nim-lang.org/#ix=3tEC |
02:11:36 | FromDiscord | <generic linux user> it is taking it a string |
02:11:52 | FromDiscord | <Hatcom> but my var is an int |
02:11:53 | FromDiscord | <Hatcom> so |
02:12:37 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tED |
02:14:18 | FromDiscord | <Hatcom> as my full code |
02:14:23 | FromDiscord | <Hatcom> sent a code paste, see https://play.nim-lang.org/#ix=3tEF |
02:14:31 | FromDiscord | <Hatcom> like wtf |
02:14:34 | FromDiscord | <Hatcom> sent a long message, see http://ix.io/3tEG |
02:14:35 | * | mib joined #nim |
02:15:34 | FromDiscord | <Hatcom> the exact same declaration for magic_number worked earlier |
02:16:21 | FromDiscord | <ElegantBeef> Well that code will not work |
02:16:27 | mib | hey, I was trying out nim by making a very simple project. i have a list of filenames that i want to execute a command on, and im able to do this normally with the os module, but im having a weird issue after trying to make these commands run in parallel. |
02:16:42 | FromDiscord | <ElegantBeef> `osProc.startProcesses` |
02:16:50 | * | lain quit (Quit: kthxbai) |
02:16:54 | mib | currently i have a simple proc that just takes the needed arguments and echos the name |
02:17:15 | FromDiscord | <ElegantBeef> hatcom an int will always `!= ""` |
02:17:26 | mib | but when iterating over the list and spawning the proc for each item, they only echo 8 items before the program exits |
02:17:28 | FromDiscord | <ElegantBeef> I tested it and it doesnt error |
02:17:32 | * | lain joined #nim |
02:17:36 | FromDiscord | <Hatcom> yes but i converted the int to a str |
02:17:40 | FromDiscord | <Hatcom> via $ |
02:17:44 | FromDiscord | <ElegantBeef> Yes |
02:17:56 | mib | there are 16 total items, i added an extra echo before that which will echo the name in the list, and it suddenly corrects the issue and spawns all 16 procs |
02:17:57 | FromDiscord | <ElegantBeef> !eval echo $0 |
02:17:59 | NimBot | 0 |
02:18:27 | FromDiscord | <ElegantBeef> You've also got two places where an invalid input can be entered and will crash the program |
02:18:27 | mib | so im just unsure why the threadpool seems to be accepting the tasks correctly only when i have this entirely unrelated echo in the code |
02:18:55 | FromDiscord | <ElegantBeef> Ah sorry it's `execProcesses` |
02:18:59 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/osproc.html#execProcesses%2CopenArray%5Bstring%5D%2Cproc%28int%29%2Cproc%28int%2CProcess%29 |
02:19:15 | FromDiscord | <ElegantBeef> Also without code hard to diagnose the issue |
02:23:01 | mib | https://pastebin.com/AbhsXhJ8 |
02:23:03 | mib | here is the code |
02:23:35 | mib | a majority of it is just setup to read paths correctly and stuff, shouldnt affect the actual for loop spawning tasks at all |
02:24:11 | FromDiscord | <ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tEJ |
02:24:15 | mib | but once it hits the for loop, unless i add an "echo(name)" in the loop, it will only print 8 names |
02:24:17 | FromDiscord | <ElegantBeef> Though that EOF issue is odd |
02:27:01 | FromDiscord | <ElegantBeef> So this crashes in the for loop with the `spawn` statement? |
02:30:39 | mib | it doesnt report any crash or anything, it just exits seemingly normally |
02:30:46 | mib | but it only prints 8 of the items in the list |
02:31:39 | FromDiscord | <ElegantBeef> Echo is supposed to be threadsafe so this is odd |
02:32:18 | FromDiscord | <ElegantBeef> I removed all your code and tested and all 16 lines are printed |
02:32:44 | mib | hm, thats really weird |
02:34:13 | mib | i removed all code and tested it, only printed 7 |
02:35:13 | FromDiscord | <ElegantBeef> This is basically what you're running? https://play.nim-lang.org/#ix=3tEL |
02:36:33 | mib | yeah that exactly |
02:37:27 | FromDiscord | <ElegantBeef> `nim -v`? |
02:59:35 | FromDiscord | <ElegantBeef> mib has died and we'll never forget them |
03:01:54 | FromDiscord | <generic linux user> nooooo |
03:10:08 | mib | oh sorry, i was gone for a bit |
03:11:01 | mib | nim -v is 1.4.8 |
03:11:48 | mib | if i rerun the exe it prints in a random order (expected) but it will also randomly print either 7 or 8 of them |
03:12:07 | FromDiscord | <ElegantBeef> That's very odd, "exe" makes me with windows? |
03:12:10 | FromDiscord | <ElegantBeef> (edit) "with" => "think" |
03:13:10 | mib | yeah im working with windows |
03:13:36 | FromDiscord | <ElegantBeef> Hmm with wine i get 12 printed |
03:13:44 | mib | seems windows-specific, if i run on nim playground it will print all of them |
03:13:52 | mib | huh, thats really odd |
03:27:22 | * | Guest27 quit (Ping timeout: 246 seconds) |
03:27:28 | FromDiscord | <checkersai> Probably worth making an issue on github |
03:42:17 | * | mib quit (Quit: https://mibbit.com Online IRC Client) |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:39 | * | supakeen joined #nim |
04:08:48 | * | arkurious quit (Quit: Leaving) |
04:09:53 | FromDiscord | <Bung> @ElegantBeef am coming |
04:11:08 | FromDiscord | <ElegantBeef> some joke about not needing to know that here |
04:11:45 | FromDiscord | <Bung> hehe, any news for me ? |
04:12:03 | FromDiscord | <ElegantBeef> Nope |
04:13:07 | FromDiscord | <Bung> hmm if I choose use some text template would be so complicated.. |
04:15:05 | FromDiscord | <ElegantBeef> I dont think it's as complicated as i thought it would be now, but just havent got off my arse to implement it |
04:21:37 | FromDiscord | <Bung> I think I'll need command tool move your implementation details from your head to mine. |
04:24:23 | FromDiscord | <ElegantBeef> Well it's just making the fromVM for everything including objects which is just a bunch of exprs of `ident, value` |
04:24:37 | FromDiscord | <ElegantBeef> I thought it needed syms which is what scared me, but yea it's not needed |
04:24:49 | FromDiscord | <ElegantBeef> Also there is an annoying thing with variants |
04:25:52 | FromDiscord | <ElegantBeef> each branch has to init the object 😄 |
04:28:57 | FromDiscord | <bung87 (Bung)> sounds simple |
04:29:16 | FromDiscord | <ElegantBeef> Well it's not overly complex but doesnt annoy me any less |
05:24:30 | * | voltist joined #nim |
05:26:24 | * | voltist7 joined #nim |
05:26:30 | * | voltist7 quit (Client Quit) |
05:26:43 | * | voltist5 joined #nim |
05:26:59 | * | voltist5 quit (Client Quit) |
05:30:41 | * | voltist quit (Ping timeout: 265 seconds) |
05:56:52 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
06:06:54 | FromDiscord | <karma_corrections> Anybody know where the `nBl` proc might be coming from? I can't figure out if it's from the standard library or this package I'm using |
06:08:10 | FromDiscord | <generic linux user> if it is from the standard base library then why import tho |
06:08:38 | FromDiscord | <generic linux user> i cant find it tho |
06:08:59 | FromDiscord | <karma_corrections> Yeah I couldn't find it either |
06:09:58 | FromDiscord | <generic linux user> then were did it come from |
06:10:13 | FromDiscord | <generic linux user> google should take me to github source if it doesnt have doc |
06:10:24 | FromDiscord | <ElegantBeef> How many modules do you have imported 😄 |
06:11:34 | FromDiscord | <karma_corrections> Well I'm trying to trace a confusing error in nimterop (I don't know genotrance's handle), and it's being used everywhere but I can't find were it was defined |
06:12:12 | FromDiscord | <karma_corrections> It's a proc that returns a bool |
06:12:34 | FromDiscord | <ElegantBeef> https://github.com/nimterop/nimterop/blob/b568863527d8b700922774e64a41db50f9b701cb/nimterop/globals.nim#L163 |
06:12:36 | FromDiscord | <generic linux user> name is correct? |
06:12:47 | FromDiscord | <karma_corrections> Aye nice thanks |
06:13:11 | FromDiscord | <karma_corrections> Forgot about templates |
06:13:17 | FromDiscord | <karma_corrections> I haven't used nim in soooo long |
06:13:41 | FromDiscord | <ElegantBeef> What editor are you using, and why doesnt your goto definition work 😄 |
06:14:16 | FromDiscord | <leorize> genotrance is shashlick around these parts, but he left quite some time ago |
06:14:44 | FromDiscord | <karma_corrections> Haha I haven't loaded the source into my editor yet |
06:15:09 | FromDiscord | <karma_corrections> Oh I remember that name yeah. Left as in? |
06:23:11 | FromDiscord | <leorize> he stopped programming for fun |
06:23:40 | * | fredrikhr joined #nim |
06:24:05 | FromDiscord | <karma_corrections> Ah ok |
06:37:06 | FromDiscord | <Bung> is there limitation in CI test in TempDir ? I do file io write then read , it shows cannot open when reading |
06:38:33 | FromDiscord | <Bung> in github workflow |
06:49:07 | FromDiscord | <Bung> nvm |
06:52:27 | FromDiscord | <generic linux user> svn |
06:53:40 | FromDiscord | <saem> cvs |
06:58:07 | FromDiscord | <Bung> @ElegantBeef I found even other module relys on my server should import under scorpermacros , that's bit annoy. |
06:58:53 | FromDiscord | <ElegantBeef> I dont follow |
06:59:35 | FromDiscord | <Bung> okay 🙂 |
06:59:48 | FromDiscord | <ElegantBeef> Are you talking about import order still |
07:00:01 | FromDiscord | <Bung> yes, macrocache thing |
07:00:03 | FromDiscord | <ElegantBeef> Cause if so, yes the only way around that is to have an `init` |
07:00:30 | FromDiscord | <ElegantBeef> The way it lets you get around import order is by having some procedure after the subscription to get all of them |
07:01:31 | FromDiscord | <Bung> that need user manualy call that |
07:02:39 | FromDiscord | <Bung> but still macrocache is quite usefull |
07:02:52 | FromDiscord | <rishavs (Rishav Sharan)> on ubuntu, I am getting `could not load: libpq.so(.5|)` error while using db\_postgres. I am assuming that the libpq lib is needed before my code works. What is the best way to solve this |
07:03:46 | FromDiscord | <ElegantBeef> `sudo apt install libpq5` probably |
07:04:10 | FromDiscord | <Bung> check your lib dir see if any libpq.so exists |
07:22:57 | FromDiscord | <rishavs (Rishav Sharan)> Thanks. installing libpq5 fixed the issue |
07:25:01 | * | Vladar joined #nim |
07:26:09 | * | max22- joined #nim |
07:26:26 | * | max22- quit (Remote host closed the connection) |
07:26:49 | * | max22- joined #nim |
08:06:08 | * | SebastianM joined #nim |
08:12:32 | * | xet7 joined #nim |
08:12:34 | * | tiorock joined #nim |
08:12:34 | * | tiorock quit (Changing host) |
08:12:34 | * | tiorock joined #nim |
08:12:34 | * | rockcavera is now known as Guest9305 |
08:12:34 | * | tiorock is now known as rockcavera |
08:15:49 | * | Guest9305 quit (Ping timeout: 258 seconds) |
08:17:51 | FromDiscord | <ynfle (ynfle)> @BracketMaster, LIke this \`\`\`nim |
08:18:15 | FromDiscord | <ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=3tFT |
08:38:44 | * | SebastianM quit (Quit: Bye) |
08:58:48 | * | xet7 quit (Remote host closed the connection) |
11:14:10 | * | arkurious joined #nim |
11:44:52 | * | max22- quit (Ping timeout: 250 seconds) |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:40 | * | supakeen joined #nim |
12:12:55 | FromDiscord | <ynfle (ynfle)> Can `lent T` not be used in for a parameter? |
12:15:05 | FromDiscord | <konsumlamm> no |
12:18:41 | FromDiscord | <ynfle (ynfle)> Y not? Would it not be useful to have an immutable var? |
12:20:02 | FromDiscord | <konsumlamm> it would |
12:20:04 | FromDiscord | <konsumlamm> ask Araq |
12:20:34 | FromDiscord | <konsumlamm> the main reason is probably that noone has implemented it |
12:22:42 | FromDiscord | <ynfle (ynfle)> Haha lol ok |
12:23:11 | FromDiscord | <ynfle (ynfle)> @Araq Any reason that `lent T` can't be used for a parameter? |
12:30:06 | * | max22- joined #nim |
12:38:48 | * | Guest27 joined #nim |
12:39:18 | * | Guest27 quit (Client Quit) |
12:52:30 | FromDiscord | <clyybber> ynfile: because parameters are essentially lent already |
12:54:37 | * | fredrikhr quit (Read error: Connection reset by peer) |
12:54:40 | FromDiscord | <ynfle (ynfle)> They aren't passed by pointer though |
12:54:48 | FromDiscord | <ynfle (ynfle)> I guess the compiler could optimize that |
12:55:02 | * | fredrikhr joined #nim |
13:01:24 | * | max22- quit (Ping timeout: 268 seconds) |
13:04:56 | FromDiscord | <ynfle (ynfle)> @rishavs↵\`\`\`nim |
13:05:26 | FromDiscord | <ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/867754086891520080): |
13:05:26 | FromDiscord | <ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=3tGM |
13:12:28 | FromDiscord | <rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3tGQ |
13:15:00 | * | Onionhammer7 joined #nim |
13:16:31 | * | LyndsySimon_ joined #nim |
13:18:44 | * | Jjp137 quit (Ping timeout: 255 seconds) |
13:18:46 | * | Onionhammer quit (Ping timeout: 255 seconds) |
13:18:46 | * | fn quit (Ping timeout: 255 seconds) |
13:18:47 | * | LyndsySimon quit (Ping timeout: 255 seconds) |
13:18:47 | * | LyndsySimon_ is now known as LyndsySimon |
13:18:53 | * | Onionhammer7 is now known as Onionhammer |
13:25:58 | * | fn joined #nim |
14:01:32 | * | Vladar quit (Quit: Leaving) |
14:04:49 | FromDiscord | <ynfle (ynfle)> If you use the `uri` module to parse the whole URL, then you can get the queries like that |
15:13:05 | * | Jjp137 joined #nim |
15:22:25 | * | max22- joined #nim |
15:22:36 | FromDiscord | <planetis> Anyone knows whats the point of the .noreturn pragma? It's used in functions that raise, however the c compiler complains about "function declared with "noreturn" does return" |
15:36:33 | FromDiscord | <carmysilna> Isn't it for functions that are supposed to never return a valid value? |
15:40:09 | FromDiscord | <Clonkk> I assume `noreturn` pragma in Nim is there to emulate the C `noreturn` attribute, which is an optimization hint that you give to the C compiler |
15:40:10 | FromDiscord | <Bung> I think it indicate the function body is loop or throw error, |
15:40:45 | FromDiscord | <Bung> that's same as typescript never type |
15:42:05 | FromDiscord | <Rika> yes, either loop that never breaks or no control path doesnt raise an exception |
15:43:20 | FromDiscord | <haxscramper> Nim noreturn is also used in control flow analysis |
15:44:24 | FromDiscord | <haxscramper> For example `case` expression branches must either be an expression, or be unconditionally noreturn |
15:44:25 | FromDiscord | <haxscramper> `continue`/`break`/`raise`/`quit`/`return` are noreturn statements as well |
15:47:56 | FromDiscord | <Bung> what's the `0n` means ? "BigInt64Array The contents are initialized to 0n" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array |
15:50:08 | FromDiscord | <Rika> isnt that js |
15:51:58 | FromDiscord | <Rika> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#numeric_literals |
15:52:04 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3tHQ |
16:01:46 | FromDiscord | <Bung> this make me confusing https://github.com/nim-lang/RFCs/issues/187 |
16:02:10 | FromDiscord | <Bung> js: use BigInt64Array or BigInt instead of Number for int64, int, uint64, uint |
16:03:43 | FromDiscord | <Bung> so BigInt64Array is array of bigint, the title metioned there with BigInt at same position. |
16:04:52 | * | fredrikhr quit (Quit: Disconnecting) |
16:05:54 | FromDiscord | <Bung> @timotheecour can you confirm this ? |
16:35:06 | FromDiscord | <timotheecour> it's maybe poorly worded but the idea would be to use it in the implementation of `int64` to preserve 64-bit semantics; it's one of the options worth considering. |
16:37:02 | FromDiscord | <Bung> ah, I get that, so it's for maping pointer offset ? |
16:38:00 | FromDiscord | <Bung> even it contains only one element |
16:41:31 | * | rockcavera quit (Read error: Connection reset by peer) |
16:41:55 | * | rockcavera joined #nim |
16:41:55 | * | rockcavera quit (Changing host) |
16:41:55 | * | rockcavera joined #nim |
16:46:07 | emery | is it possible to use `NimNode` at runtime to implement code translation tools? |
16:47:11 | emery | stuff like `stdout.writeLine newEmptyNode().repr` doesn't work at runtime |
16:48:48 | emery | I can do what I want with a macro but I'd rather have the generated code in a discrete file to inspect |
16:49:55 | FromDiscord | <Bung> I think you can use compiler package parse your code then do translation |
16:51:35 | FromDiscord | <@bracketmaster-5a708063d73408ce4> @ynfle - thx |
17:07:30 | FromDiscord | <Ayy Lmao> Does anyone have any experience using nimgl or imgui? When I call `igCreateContext()` using `--cc:vcc`, I get the error: `error C2233: 'tyArraylESWtzMXx1doP9aJU66a9ciw': arrays of objects containing zero-size arrays are illegal` but I don't get that error when I don't use `--cc:vcc` |
17:08:05 | * | rockcavera quit (Remote host closed the connection) |
17:24:08 | FromDiscord | <RattleyCooper> nimdocs.com is down or just me? |
17:47:24 | fn | <Prestige99> it's down |
17:47:38 | FromDiscord | <Hi02Hi> its down |
17:48:00 | fn | <Prestige99> never used that site though |
17:48:03 | FromDiscord | <RattleyCooper> @treeform I've been trying to run the examples from your `ws` library but for some reason all the custom exceptions aside from `WebSocketError` are throwing an undeclared identifier error. I see they exist in the source so I am not sure what's going on. |
17:50:38 | FromDiscord | <Hi02Hi> even if it was up, treeform doesnt trust it enough to have it work on any page. the github page says "It is alpha quality, so if you want to be included in the allowed authors list, open a pull request." |
17:52:02 | FromDiscord | <RattleyCooper> I'm not trying to host any docs I was looking for the docs for his `ws` library. It's ok though, I'm sure it'll be back up eventually. If I can figure out why these undeclared identifier errors are popping up I can probably just look at the examples |
17:52:29 | FromDiscord | <RattleyCooper> (edit) "I'm not trying to host any docs I was looking for the docs for his `ws` library. It's ok though, I'm sure it'll be back up eventually. If I can figure out why these undeclared identifier errors are popping up I can probably just look at the examples ... " added "and figure it out" |
18:11:23 | FromDiscord | <treeform> In reply to @RattleyCooper "<@!107140179025735680> I've been trying": Can you open a Issue with an reproducible example and stack trace? If you put in the time to chase it down, i'll fix it. Make sure you only have one WS installed and none of your modules are called ws. |
18:13:46 | FromDiscord | <RattleyCooper> In reply to @treeform "Can you open a": How do I check for multiple installations? |
18:15:13 | FromDiscord | <treeform> In reply to @RattleyCooper "How do I check": find your `~/.nimble/pgks` folder |
18:15:18 | FromDiscord | <treeform> it will have a folder for every install |
18:15:29 | FromDiscord | <treeform> ws-#.#.# or some thing is the format |
18:15:58 | FromDiscord | <RattleyCooper> Ok, I only have 1 installed, I'll open an issue |
18:16:21 | FromDiscord | <treeform> ok |
18:18:55 | FromDiscord | <haxscramper> In addition to `compiler/ast` you can also try to use my library for `PNode` manipulations - https://haxscramper.github.io/hnimast/src/hnimast/hast_common.html . I do a ton of nim codegen, and this library is designed to make operations on `NimNode` and `PNode` completely interoperable |
18:20:05 | FromDiscord | <haxscramper> Also I have `pquote do:` that works like `quote do:`, but generates PNode |
18:23:57 | FromDiscord | <dom96> In reply to @treeform "find your `~/.nimble/pgks` folder": Pro-tip: you can also use `nimble list --installed | grep "ws"` |
18:31:52 | * | mahlon_ is now known as mahlon |
19:24:49 | FromDiscord | <checkersai> is an `array[X, array[Y, T]]` contiguous in memory? |
19:26:33 | FromDiscord | <exelotl> Yep |
19:27:13 | FromDiscord | <checkersai> cool |
19:37:40 | * | xet7 joined #nim |
20:00:08 | federico3 | some proc names are treated specially so that `*`(a, b) can be used in "a * b" without a dot after "a" |
20:01:31 | federico3 | can I do that with other proc names? |
20:05:56 | FromDiscord | <carmysilna> sent a code paste, see https://play.nim-lang.org/#ix=3tJN |
20:06:02 | FromDiscord | <treeform> In reply to @RattleyCooper "nimdocs.com is down or": Nim docs is up again. Some thing just Killed the nim process. |
20:48:23 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3tK6 |
20:48:53 | FromDiscord | <krisppurg> (edit) "https://play.nim-lang.org/#ix=3tK6" => "https://play.nim-lang.org/#ix=3tK7" |
20:52:41 | * | xet7 quit (Ping timeout: 255 seconds) |
21:07:45 | FromDiscord | <haxscramper> It would only show types from a single branch |
21:08:40 | FromDiscord | <haxscramper> IIRC there is no way around that. https://github.com/nim-lang/RFCs/issues/337 might address this in the future |
21:09:40 | FromDiscord | <saem> does it seem sound that enum string values can be non-unique within the enum's set of values? |
21:09:52 | FromDiscord | <haxscramper> Nim doc could've operated on the raw AST, but that would loose other info |
21:10:06 | FromDiscord | <haxscramper> Yes, sounds perfectly fine to me |
21:10:35 | FromDiscord | <saem> yet we're particular about the numbering and declaration order... I guess. |
21:10:36 | FromDiscord | <haxscramper> From what I can tell enum string values are just shorthand for overriding $ |
21:10:45 | FromDiscord | <planetis> [Clonkk](https://matrix.to/#/@rf.c:matrix.org), haxscramper thanks guys |
21:10:48 | FromDiscord | <ElegantBeef> They're also used in `parseEnum` so that'll be odd |
21:11:10 | FromDiscord | <saem> that too |
21:11:15 | FromDiscord | <haxscramper> Yes, that is strange but not unheard of |
21:11:28 | FromDiscord | <ElegantBeef> Ah it does raise an exception |
21:11:36 | FromDiscord | <ElegantBeef> Well actually a compile time error 😄 |
21:11:51 | FromDiscord | <haxscramper> Ah, well, then we are good |
21:12:07 | FromDiscord | <saem> "good" |
21:12:39 | FromDiscord | <haxscramper> "Don't should yourself and you will be fine" |
21:13:29 | FromDiscord | <ElegantBeef> Seems odd there isnt a `parseEnumVal` or better named that doesnt look at the string representation |
21:13:44 | FromDiscord | <ElegantBeef> Or a overload for `useStringName` |
21:13:48 | FromDiscord | <ElegantBeef> (edit) "for" => "with" |
21:13:50 | FromDiscord | <saem> There are things like `discard` to ensure a value isn't forgotten as that leads to bugs, but some data entry for an enum value string, which seems like a similar class of error is ignored. |
21:14:28 | FromDiscord | <haxscramper> It don't think it is the same class of errors |
21:14:50 | FromDiscord | <haxscramper> Duplicate enum strings is a serialization problem |
21:15:15 | FromDiscord | <haxscramper> And only if you use string enum values instead of int representation |
21:15:24 | FromDiscord | <saem> serdes along JSON/etc API boundaries with enums isn't all that uncommon. |
21:16:03 | FromDiscord | <ElegantBeef> Considering you cannot use parseEnum on them i feel like that's not an issue, though i'd like to be proven wrong 😄 |
21:16:09 | FromDiscord | <haxscramper> If you have repeated enum string it is a compile error as @ElegantBeef just said |
21:16:40 | FromDiscord | <saem> fair enough, it at least shows up when you go to use it. |
21:17:20 | FromDiscord | <ElegantBeef> I imagine there are some cases where you'd want share values and even if you want to use parse enum with them, you could always store them in an `array[enum, string]` |
21:17:40 | FromDiscord | <ElegantBeef> Or your own parseEnum of course |
21:18:26 | FromDiscord | <ElegantBeef> Like i said it's kinda odd there isnt a way around the parsing with duplicate string values in the stdlib |
21:18:46 | * | max22- quit (Quit: Leaving) |
21:21:37 | FromDiscord | <haxscramper> `allowDuplicates: static[bool] = false` and `when allowDuplicates` |
21:22:22 | FromDiscord | <ElegantBeef> Yea i know how it'd work 😄 |
21:37:48 | * | fputs_ left #nim (#nim) |
23:03:02 | FromDiscord | <deech> Anyone know of efforts to get nimble to generate Nix recipes? Not a third party tool that parses a .nimble file but adding that functionality to the nimble tool itself |
23:04:16 | FromDiscord | <carmysilna> You could probably add a Nimble task |
23:09:12 | FromDiscord | <deech> I'm looking for deeper integration. |
23:09:17 | FromDiscord | <deech> But thanks! |
23:22:08 | FromDiscord | <creonico> Do I always have to cast the `nil` when assigning it to any type? `var graphics_queue_family:uint32 = nil;` `Error: type mismatch: got <typeof(nil)> but expected 'uint32'` |
23:24:33 | FromDiscord | <saem> uint32 isn't a reference type so you can't assign nil to it. You'd have to cast it, but there are probably more fundamental things you want to consider about your design. |
23:25:56 | FromDiscord | <creonico> So I can only assign nil to reference types? |
23:27:06 | FromDiscord | <ElegantBeef> Yes that's what nil means |
23:27:14 | FromDiscord | <ElegantBeef> it's a ptr that points to nothing |
23:27:31 | FromDiscord | <creonico> And would casting it to uint32 type give me 0? |
23:27:32 | FromDiscord | <ElegantBeef> If you want this "optional" behaviour checkout `options` |
23:27:37 | FromDiscord | <ElegantBeef> yes |
23:28:44 | FromDiscord | <saem> Is `graphics_queue_family` an opaque id that you receive some how? |
23:34:45 | FromDiscord | <creonico> yes |
23:36:34 | FromDiscord | <saem> you could also consider making a distinct type to model the behaviour you want. |
23:38:21 | FromDiscord | <saem> I'm presuming you don't want to really add, subtract, etc... so the vast majority of integer operations are unnecessary. You likely only want a range and a func for a predicate to check if it's valid (not zero?)? |
23:50:42 | * | stkrdknmibalz joined #nim |