<< 22-07-2021 >>

00:00:10FromDiscord<@bracketmaster-5a708063d73408ce4> its not really working for me for some reason
00:00:15FromDiscord<Jakraes> Oh gotcha, I'll stick with the first example you gave, seems like the best option
00:00:19FromDiscord<@bracketmaster-5a708063d73408ce4> cannot add to node kind\: nnkEmpty
00:00:29FromDiscord<ElegantBeef> `result = newStmtList()`
00:00:32FromDiscord<ElegantBeef> then run the loop
00:00:54FromDiscord<ElegantBeef> the default value for a nimnode is an EmptyNode
00:02:14FromDiscord<@bracketmaster-5a708063d73408ce4> TY!
00:02:16FromDiscord<@bracketmaster-5a708063d73408ce4> that worked
00:06:39FromDiscord<ElegantBeef> Well if it didnt i'd have to retire from my non existent macro writing career
00:39:30FromDiscord<@bracketmaster-5a708063d73408ce4> heh
00:40:05FromDiscord<@bracketmaster-5a708063d73408ce4> so previously, I had the for loop generate code that echoed 1 through 5
00:40:29FromDiscord<@bracketmaster-5a708063d73408ce4> now I'm looking to generate code that builds and array of [1,2,3,4,5]
00:40:39FromDiscord<@bracketmaster-5a708063d73408ce4> doesn't look like this can be done with quote do
00:40:55FromDiscord<ElegantBeef> Eh it complicates it needlessly to do so
00:42:07FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3tEs quite simple to do without quote do
00:42:07FromDiscord<checkersai> In reply to @checkersai "Is there a nim": I went ahead and just used sdl2nim
00:42:14FromDiscord<@bracketmaster-5a708063d73408ce4> well, I'll try the stmt way then
00:42:30FromDiscord<ElegantBeef> Well you could use pixie + gflw or sdl to show the image
00:42:58FromDiscord<checkersai> I'm not trying to show an image
00:43:21FromDiscord<checkersai> I literally want to draw individual pixels onto the window
00:43:38FromDiscord<checkersai> Because I'm trying to write a 3d software renderer
00:44:02FromDiscord<checkersai> I'm following along with this: https://github.com/ssloy/tinyrenderer
00:44:05fn<R2D299> itHub: 7"A brief computer graphics / rendering course"
00:45:03FromDiscord<ElegantBeef> I mean yea it's all going to be about the same
00:45:39FromDiscord<checkersai> yeah
00:45:59FromDiscord<checkersai> I wrote a quick and dirty backend
00:46:10FromDiscord<checkersai> But I can draw triangles and stuff
00:46:41FromDiscord<@bracketmaster-5a708063d73408ce4> @\_discord\_202953368958795776\:t2bot.io \: check this out - https://github.com/BracketMaster/nimRasterizer
00:46:42FromDiscord<ElegantBeef> Are those all software rendered examples, or do they branch out to opengl?
00:46:43fn<R2D299> itHub: 7"A humble triangle rasterizer in Nim."
00:47:28FromDiscord<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:34FromDiscord<checkersai> In reply to @ElegantBeef "Are those all software": the course is basically "write a basic simplified clone of opengl"
00:50:26FromDiscord<checkersai> the point is to learn the general process happening under the hood
01:07:06FromDiscord<@bracketmaster-5a708063d73408ce4> StmtList↵ Bracket↵ IntLit 1↵ IntLit 2
01:07:07FromDiscord<@bracketmaster-5a708063d73408ce4> how can i build the following with nnks?
01:10:00FromDiscord<ElegantBeef> I showed you how in the last link
01:10:11FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3tEs
01:45:47*Guest27 joined #nim
01:57:55FromDiscord<Hatcom> how do you check if a variable is empty or nil?
01:59:04FromDiscord<Hatcom> i've tried `.isNil()`, `== nil`, and `.isNone` and none of them have worked.
02:04:38FromDiscord<carmysilna> What's the expression?
02:05:37*TakinOver quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:06:57FromDiscord<ElegantBeef> Only nilable types can be nil in nim, which means `ref T`
02:07:12FromDiscord<ElegantBeef> Or pointers of course
02:07:53FromDiscord<Hatcom> sent a code paste, see https://paste.rs/f3h
02:08:21FromDiscord<Hatcom> where magic_number is an integer
02:08:23FromDiscord<ElegantBeef> Ok so yea int cannot be nil
02:08:38FromDiscord<Hatcom> but what if the user enters nothing?
02:08:45FromDiscord<ElegantBeef> i can show you what i'd do
02:08:53FromDiscord<Hatcom> do
02:10:14FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tEA
02:10:16FromDiscord<ElegantBeef> Atleast for a single input this works
02:10:23FromDiscord<ElegantBeef> If you have more i'd point you towards `options`
02:10:39FromDiscord<ElegantBeef> Options gives you that python style "Hey this can have None"
02:10:50FromDiscord<generic linux user> sent a code paste, see https://play.nim-lang.org/#ix=3tEB
02:10:55FromDiscord<generic linux user> anyway to write it in single line?
02:11:11FromDiscord<ElegantBeef> Well you could do `and`
02:11:21FromDiscord<Hatcom> ig if i parsed it as a str
02:11:22FromDiscord<Hatcom> sent a code paste, see https://play.nim-lang.org/#ix=3tEC
02:11:36FromDiscord<generic linux user> it is taking it a string
02:11:52FromDiscord<Hatcom> but my var is an int
02:11:53FromDiscord<Hatcom> so
02:12:37FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tED
02:14:18FromDiscord<Hatcom> as my full code
02:14:23FromDiscord<Hatcom> sent a code paste, see https://play.nim-lang.org/#ix=3tEF
02:14:31FromDiscord<Hatcom> like wtf
02:14:34FromDiscord<Hatcom> sent a long message, see http://ix.io/3tEG
02:14:35*mib joined #nim
02:15:34FromDiscord<Hatcom> the exact same declaration for magic_number worked earlier
02:16:21FromDiscord<ElegantBeef> Well that code will not work
02:16:27mibhey, 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:42FromDiscord<ElegantBeef> `osProc.startProcesses`
02:16:50*lain quit (Quit: kthxbai)
02:16:54mibcurrently i have a simple proc that just takes the needed arguments and echos the name
02:17:15FromDiscord<ElegantBeef> hatcom an int will always `!= ""`
02:17:26mibbut when iterating over the list and spawning the proc for each item, they only echo 8 items before the program exits
02:17:28FromDiscord<ElegantBeef> I tested it and it doesnt error
02:17:32*lain joined #nim
02:17:36FromDiscord<Hatcom> yes but i converted the int to a str
02:17:40FromDiscord<Hatcom> via $
02:17:44FromDiscord<ElegantBeef> Yes
02:17:56mibthere 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:57FromDiscord<ElegantBeef> !eval echo $0
02:18:27FromDiscord<ElegantBeef> You've also got two places where an invalid input can be entered and will crash the program
02:18:27mibso 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:55FromDiscord<ElegantBeef> Ah sorry it's `execProcesses`
02:18:59FromDiscord<ElegantBeef> https://nim-lang.org/docs/osproc.html#execProcesses%2CopenArray%5Bstring%5D%2Cproc%28int%29%2Cproc%28int%2CProcess%29
02:19:15FromDiscord<ElegantBeef> Also without code hard to diagnose the issue
02:23:03mibhere is the code
02:23:35miba majority of it is just setup to read paths correctly and stuff, shouldnt affect the actual for loop spawning tasks at all
02:24:11FromDiscord<ElegantBeef> sent a code paste, see https://play.nim-lang.org/#ix=3tEJ
02:24:15mibbut once it hits the for loop, unless i add an "echo(name)" in the loop, it will only print 8 names
02:24:17FromDiscord<ElegantBeef> Though that EOF issue is odd
02:27:01FromDiscord<ElegantBeef> So this crashes in the for loop with the `spawn` statement?
02:30:39mibit doesnt report any crash or anything, it just exits seemingly normally
02:30:46mibbut it only prints 8 of the items in the list
02:31:39FromDiscord<ElegantBeef> Echo is supposed to be threadsafe so this is odd
02:32:18FromDiscord<ElegantBeef> I removed all your code and tested and all 16 lines are printed
02:32:44mibhm, thats really weird
02:34:13mibi removed all code and tested it, only printed 7
02:35:13FromDiscord<ElegantBeef> This is basically what you're running? https://play.nim-lang.org/#ix=3tEL
02:36:33mibyeah that exactly
02:37:27FromDiscord<ElegantBeef> `nim -v`?
02:59:35FromDiscord<ElegantBeef> mib has died and we'll never forget them
03:01:54FromDiscord<generic linux user> nooooo
03:10:08miboh sorry, i was gone for a bit
03:11:01mibnim -v is 1.4.8
03:11:48mibif 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:07FromDiscord<ElegantBeef> That's very odd, "exe" makes me with windows?
03:12:10FromDiscord<ElegantBeef> (edit) "with" => "think"
03:13:10mibyeah im working with windows
03:13:36FromDiscord<ElegantBeef> Hmm with wine i get 12 printed
03:13:44mibseems windows-specific, if i run on nim playground it will print all of them
03:13:52mibhuh, thats really odd
03:27:22*Guest27 quit (Ping timeout: 246 seconds)
03:27:28FromDiscord<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:53FromDiscord<Bung> @ElegantBeef am coming
04:11:08FromDiscord<ElegantBeef> some joke about not needing to know that here
04:11:45FromDiscord<Bung> hehe, any news for me ?
04:12:03FromDiscord<ElegantBeef> Nope
04:13:07FromDiscord<Bung> hmm if I choose use some text template would be so complicated..
04:15:05FromDiscord<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:37FromDiscord<Bung> I think I'll need command tool move your implementation details from your head to mine.
04:24:23FromDiscord<ElegantBeef> Well it's just making the fromVM for everything including objects which is just a bunch of exprs of `ident, value`
04:24:37FromDiscord<ElegantBeef> I thought it needed syms which is what scared me, but yea it's not needed
04:24:49FromDiscord<ElegantBeef> Also there is an annoying thing with variants
04:25:52FromDiscord<ElegantBeef> each branch has to init the object 😄
04:28:57FromDiscord<bung87 (Bung)> sounds simple
04:29:16FromDiscord<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:54FromDiscord<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:10FromDiscord<generic linux user> if it is from the standard base library then why import tho
06:08:38FromDiscord<generic linux user> i cant find it tho
06:08:59FromDiscord<karma_corrections> Yeah I couldn't find it either
06:09:58FromDiscord<generic linux user> then were did it come from
06:10:13FromDiscord<generic linux user> google should take me to github source if it doesnt have doc
06:10:24FromDiscord<ElegantBeef> How many modules do you have imported 😄
06:11:34FromDiscord<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:12FromDiscord<karma_corrections> It's a proc that returns a bool
06:12:34FromDiscord<ElegantBeef> https://github.com/nimterop/nimterop/blob/b568863527d8b700922774e64a41db50f9b701cb/nimterop/globals.nim#L163
06:12:36FromDiscord<generic linux user> name is correct?
06:12:47FromDiscord<karma_corrections> Aye nice thanks
06:13:11FromDiscord<karma_corrections> Forgot about templates
06:13:17FromDiscord<karma_corrections> I haven't used nim in soooo long
06:13:41FromDiscord<ElegantBeef> What editor are you using, and why doesnt your goto definition work 😄
06:14:16FromDiscord<leorize> genotrance is shashlick around these parts, but he left quite some time ago
06:14:44FromDiscord<karma_corrections> Haha I haven't loaded the source into my editor yet
06:15:09FromDiscord<karma_corrections> Oh I remember that name yeah. Left as in?
06:23:11FromDiscord<leorize> he stopped programming for fun
06:23:40*fredrikhr joined #nim
06:24:05FromDiscord<karma_corrections> Ah ok
06:37:06FromDiscord<Bung> is there limitation in CI test in TempDir ? I do file io write then read , it shows cannot open when reading
06:38:33FromDiscord<Bung> in github workflow
06:49:07FromDiscord<Bung> nvm
06:52:27FromDiscord<generic linux user> svn
06:53:40FromDiscord<saem> cvs
06:58:07FromDiscord<Bung> @ElegantBeef I found even other module relys on my server should import under scorpermacros , that's bit annoy.
06:58:53FromDiscord<ElegantBeef> I dont follow
06:59:35FromDiscord<Bung> okay 🙂
06:59:48FromDiscord<ElegantBeef> Are you talking about import order still
07:00:01FromDiscord<Bung> yes, macrocache thing
07:00:03FromDiscord<ElegantBeef> Cause if so, yes the only way around that is to have an `init`
07:00:30FromDiscord<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:31FromDiscord<Bung> that need user manualy call that
07:02:39FromDiscord<Bung> but still macrocache is quite usefull
07:02:52FromDiscord<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:46FromDiscord<ElegantBeef> `sudo apt install libpq5` probably
07:04:10FromDiscord<Bung> check your lib dir see if any libpq.so exists
07:22:57FromDiscord<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:51FromDiscord<ynfle (ynfle)> @BracketMaster, LIke this \`\`\`nim
08:18:15FromDiscord<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:55FromDiscord<ynfle (ynfle)> Can `lent T` not be used in for a parameter?
12:15:05FromDiscord<konsumlamm> no
12:18:41FromDiscord<ynfle (ynfle)> Y not? Would it not be useful to have an immutable var?
12:20:02FromDiscord<konsumlamm> it would
12:20:04FromDiscord<konsumlamm> ask Araq
12:20:34FromDiscord<konsumlamm> the main reason is probably that noone has implemented it
12:22:42FromDiscord<ynfle (ynfle)> Haha lol ok
12:23:11FromDiscord<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:30FromDiscord<clyybber> ynfile: because parameters are essentially lent already
12:54:37*fredrikhr quit (Read error: Connection reset by peer)
12:54:40FromDiscord<ynfle (ynfle)> They aren't passed by pointer though
12:54:48FromDiscord<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:56FromDiscord<ynfle (ynfle)> @rishavs↵\`\`\`nim
13:05:26FromDiscord<ynfle (ynfle)> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/867754086891520080):
13:05:26FromDiscord<ynfle (ynfle)> sent a code paste, see https://play.nim-lang.org/#ix=3tGM
13:12:28FromDiscord<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:49FromDiscord<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:36FromDiscord<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:33FromDiscord<carmysilna> Isn't it for functions that are supposed to never return a valid value?
15:40:09FromDiscord<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:10FromDiscord<Bung> I think it indicate the function body is loop or throw error,
15:40:45FromDiscord<Bung> that's same as typescript never type
15:42:05FromDiscord<Rika> yes, either loop that never breaks or no control path doesnt raise an exception
15:43:20FromDiscord<haxscramper> Nim noreturn is also used in control flow analysis
15:44:24FromDiscord<haxscramper> For example `case` expression branches must either be an expression, or be unconditionally noreturn
15:44:25FromDiscord<haxscramper> `continue`/`break`/`raise`/`quit`/`return` are noreturn statements as well
15:47:56FromDiscord<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:08FromDiscord<Rika> isnt that js
15:51:58FromDiscord<Rika> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#numeric_literals
15:52:04FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3tHQ
16:01:46FromDiscord<Bung> this make me confusing https://github.com/nim-lang/RFCs/issues/187
16:02:10FromDiscord<Bung> js: use BigInt64Array or BigInt instead of Number for int64, int, uint64, uint
16:03:43FromDiscord<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:54FromDiscord<Bung> @timotheecour can you confirm this ?
16:35:06FromDiscord<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:02FromDiscord<Bung> ah, I get that, so it's for maping pointer offset ?
16:38:00FromDiscord<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:07emeryis it possible to use `NimNode` at runtime to implement code translation tools?
16:47:11emerystuff like `stdout.writeLine newEmptyNode().repr` doesn't work at runtime
16:48:48emeryI can do what I want with a macro but I'd rather have the generated code in a discrete file to inspect
16:49:55FromDiscord<Bung> I think you can use compiler package parse your code then do translation
16:51:35FromDiscord<@bracketmaster-5a708063d73408ce4> @ynfle - thx
17:07:30FromDiscord<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:08FromDiscord<RattleyCooper> nimdocs.com is down or just me?
17:47:24fn<Prestige99> it's down
17:47:38FromDiscord<Hi02Hi> its down
17:48:00fn<Prestige99> never used that site though
17:48:03FromDiscord<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:38FromDiscord<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:02FromDiscord<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:29FromDiscord<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:23FromDiscord<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:46FromDiscord<RattleyCooper> In reply to @treeform "Can you open a": How do I check for multiple installations?
18:15:13FromDiscord<treeform> In reply to @RattleyCooper "How do I check": find your `~/.nimble/pgks` folder
18:15:18FromDiscord<treeform> it will have a folder for every install
18:15:29FromDiscord<treeform> ws-#.#.# or some thing is the format
18:15:58FromDiscord<RattleyCooper> Ok, I only have 1 installed, I'll open an issue
18:16:21FromDiscord<treeform> ok
18:18:55FromDiscord<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:05FromDiscord<haxscramper> Also I have `pquote do:` that works like `quote do:`, but generates PNode
18:23:57FromDiscord<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:49FromDiscord<checkersai> is an `array[X, array[Y, T]]` contiguous in memory?
19:26:33FromDiscord<exelotl> Yep
19:27:13FromDiscord<checkersai> cool
19:37:40*xet7 joined #nim
20:00:08federico3some proc names are treated specially so that `*`(a, b) can be used in "a * b" without a dot after "a"
20:01:31federico3can I do that with other proc names?
20:05:56FromDiscord<carmysilna> sent a code paste, see https://play.nim-lang.org/#ix=3tJN
20:06:02FromDiscord<treeform> In reply to @RattleyCooper "nimdocs.com is down or": Nim docs is up again. Some thing just Killed the nim process.
20:48:23FromDiscord<krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=3tK6
20:48:53FromDiscord<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:45FromDiscord<haxscramper> It would only show types from a single branch
21:08:40FromDiscord<haxscramper> IIRC there is no way around that. https://github.com/nim-lang/RFCs/issues/337 might address this in the future
21:09:40FromDiscord<saem> does it seem sound that enum string values can be non-unique within the enum's set of values?
21:09:52FromDiscord<haxscramper> Nim doc could've operated on the raw AST, but that would loose other info
21:10:06FromDiscord<haxscramper> Yes, sounds perfectly fine to me
21:10:35FromDiscord<saem> yet we're particular about the numbering and declaration order... I guess.
21:10:36FromDiscord<haxscramper> From what I can tell enum string values are just shorthand for overriding $
21:10:45FromDiscord<planetis> [Clonkk](https://matrix.to/#/@rf.c:matrix.org), haxscramper thanks guys
21:10:48FromDiscord<ElegantBeef> They're also used in `parseEnum` so that'll be odd
21:11:10FromDiscord<saem> that too
21:11:15FromDiscord<haxscramper> Yes, that is strange but not unheard of
21:11:28FromDiscord<ElegantBeef> Ah it does raise an exception
21:11:36FromDiscord<ElegantBeef> Well actually a compile time error 😄
21:11:51FromDiscord<haxscramper> Ah, well, then we are good
21:12:07FromDiscord<saem> "good"
21:12:39FromDiscord<haxscramper> "Don't should yourself and you will be fine"
21:13:29FromDiscord<ElegantBeef> Seems odd there isnt a `parseEnumVal` or better named that doesnt look at the string representation
21:13:44FromDiscord<ElegantBeef> Or a overload for `useStringName`
21:13:48FromDiscord<ElegantBeef> (edit) "for" => "with"
21:13:50FromDiscord<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:28FromDiscord<haxscramper> It don't think it is the same class of errors
21:14:50FromDiscord<haxscramper> Duplicate enum strings is a serialization problem
21:15:15FromDiscord<haxscramper> And only if you use string enum values instead of int representation
21:15:24FromDiscord<saem> serdes along JSON/etc API boundaries with enums isn't all that uncommon.
21:16:03FromDiscord<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:09FromDiscord<haxscramper> If you have repeated enum string it is a compile error as @ElegantBeef just said
21:16:40FromDiscord<saem> fair enough, it at least shows up when you go to use it.
21:17:20FromDiscord<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:40FromDiscord<ElegantBeef> Or your own parseEnum of course
21:18:26FromDiscord<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:37FromDiscord<haxscramper> `allowDuplicates: static[bool] = false` and `when allowDuplicates`
21:22:22FromDiscord<ElegantBeef> Yea i know how it'd work 😄
21:37:48*fputs_ left #nim (#nim)
23:03:02FromDiscord<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:16FromDiscord<carmysilna> You could probably add a Nimble task
23:09:12FromDiscord<deech> I'm looking for deeper integration.
23:09:17FromDiscord<deech> But thanks!
23:22:08FromDiscord<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:33FromDiscord<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:56FromDiscord<creonico> So I can only assign nil to reference types?
23:27:06FromDiscord<ElegantBeef> Yes that's what nil means
23:27:14FromDiscord<ElegantBeef> it's a ptr that points to nothing
23:27:31FromDiscord<creonico> And would casting it to uint32 type give me 0?
23:27:32FromDiscord<ElegantBeef> If you want this "optional" behaviour checkout `options`
23:27:37FromDiscord<ElegantBeef> yes
23:28:44FromDiscord<saem> Is `graphics_queue_family` an opaque id that you receive some how?
23:34:45FromDiscord<creonico> yes
23:36:34FromDiscord<saem> you could also consider making a distinct type to model the behaviour you want.
23:38:21FromDiscord<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