<< 03-06-2021 >>

00:57:20*nphg joined #nim
00:59:36*nphg1 quit (Ping timeout: 252 seconds)
01:02:21FromGitter<kaushalmodi> Hello, is this a bug? I am defining a `+=` template within the scope of another template. But then I call that template twice, I get ⏎ ⏎ > Error: ambiguous call; both in.+=(p`gensym0: ptr T, offset`gensym0: int) [declared in /usercode/in.nim(2, 12)] and in.+=(p`gensym1: ptr T, offset`gensym1: int) [declared in /usercode/in.nim(2, 12)] match for: (ptr int, int literal(1)) ⏎ ⏎
01:02:21FromGitter... https://play.nim-lang.org/#ix=3oBZ ... [https://gitter.im/nim-lang/Nim?at=60b82a1d43fc4a24c5deb56b]
01:06:01*Tanger joined #nim
01:18:18*Tanger quit (Ping timeout: 252 seconds)
01:28:57ForumUpdaterBotNew thread by Kaushalmodi: Help fixing an ambiguous call error, see https://forum.nim-lang.org/t/8075
01:29:35*tPsLXZtPz joined #nim
01:29:36*tPsLXZtPz left #nim (#nim)
01:31:04*qoVPTFEWdJSM joined #nim
01:31:04*qoVPTFEWdJSM left #nim (#nim)
01:32:10*krux02 quit (Remote host closed the connection)
01:36:29*cktbCVdyWkf joined #nim
01:36:29*cktbCVdyWkf left #nim (#nim)
01:36:59*QJumDgxQzK joined #nim
01:36:59*QJumDgxQzK left #nim (#nim)
01:37:12*nqKXAdxfNtt joined #nim
01:37:12*nqKXAdxfNtt left #nim (#nim)
01:39:36*uptvSyljJo joined #nim
01:39:36*uptvSyljJo left #nim (#nim)
01:56:31FromDiscord<ElegantBeef> I swear if i see another person do pointer arithmetic manually offsetting the index i'll cry!
01:56:51FromDiscord<ElegantBeef> kaushalmodi consider https://play.nim-lang.org/#ix=3oCd πŸ˜›
01:57:06*Tanger joined #nim
01:57:14FromGitter<kaushalmodi> ElegantBeef: Unfortunately I needed that in my C-mapping library
01:57:29FromDiscord<ElegantBeef> I mean that's not what i'm complaining about πŸ˜„
01:57:58FromDiscord<ElegantBeef> I was talking about the `+ sizeOf(T) offset`
01:58:56FromGitter<kaushalmodi> I am not getting it. What's incorrect with `+% (offset * sizeof(T)))` (pasting it from my code)
01:59:10FromDiscord<ElegantBeef> Not incorrect just doing work you dont need to
01:59:17FromDiscord<ElegantBeef> Look at the link i provided it does the same thing
02:00:05FromGitter<kaushalmodi> I somehow selectively glanced at the `block:` part of it because that's what I ended up doing :D https://play.nim-lang.org/#ix=3oCa
02:00:17FromDiscord<ElegantBeef> 2 casts and an offset all on one line, vs 1 cast + `[]`
02:02:16FromGitter<kaushalmodi> I am trying to understand that code.. why is the `.addr` needed? You are already casting it to a ptr and the return type is a ptr
02:03:07FromDiscord<ElegantBeef> It's casted to a `ptr UncheckedArray[T]` so indexing returns `T` so you musut get addr
02:03:49FromGitter<kaushalmodi> ah, right!
02:04:03FromDiscord<ElegantBeef> It's the same thing just imo slightly more readable, but YMMV
02:04:42FromGitter<kaushalmodi> btw using the block: breaks the docgen :| ⏎ ⏎ Without the block:, I get the docgen create docs for the internal templates: https://kaushalmodi.github.io/ptr_math/
02:05:05FromGitter<kaushalmodi> But without the block:, I cannot use `ptrMath:` more than once in a given scope
02:05:45FromGitter<kaushalmodi> does negative indexing work? I also have ⏎ ⏎ ```cast[ptr T](cast[ByteAddress](p) -% (offset * sizeof(T)))``` [https://gitter.im/nim-lang/Nim?at=60b838f914d9cd234a737d93]
02:05:59FromGitter<kaushalmodi> (I'll try it out)
02:06:33FromDiscord<ElegantBeef> Seems like it
02:07:17FromDiscord<ElegantBeef> remember `unchecked` means "unsafe" πŸ˜›
02:09:21FromGitter<kaushalmodi> Using the UncheckArray ptr indexing doesn't work.. ⏎ ⏎ > ptr_math.nim(106, 10) Error: template instantiation too nested ⏎ ⏎ I think, because of https://github.com/kaushalmodi/ptr_math/blob/c41e36be09e465a075b91a5a38c1c1fdcb241557/src/ptr_math.nim#L94 [https://gitter.im/nim-lang/Nim?at=60b839d0850bfa2d3bfb312b]
02:12:31FromDiscord<ElegantBeef> Templates dont seem to be the right way around, but a macro hides what can be done
02:13:44*zuckerberg[m] quit (Ping timeout: 245 seconds)
02:13:53*zuckerberg[m] joined #nim
02:31:34*arkurious quit (Quit: Leaving)
02:48:49FromDiscord<garett> @ElegantBeef do you know whether it is safe to store a proc in an alloc'ed object?
02:49:10FromDiscord<garett> It is unclear to me whether its environment will ever be GC'ed
02:49:30FromDiscord<garett> I can't call GC_ref/unref on a proc
02:50:39FromDiscord<garett> At first, I considered calling `=destroy` on it before dealloc'ing the object, but now I think that is a bad idea in general, since more than one object could be pointing to the same proc
02:51:01FromDiscord<ElegantBeef> Well the environment is held in a reference, so might not work with arc/orc, but should with a GC eh?
02:51:23FromDiscord<garett> Seems like maybe you can only safely store a proc in a ref object
02:52:15FromDiscord<garett> But it seems like there should be GC_ref/unref signatures that accept a proc
02:53:07FromDiscord<garett> Maybe I can just write my own πŸ˜›
02:53:37FromDiscord<garett> `proc GC_ref(x: proc) {.magic: "GCref", benign.}`
03:02:01*Tanger quit (Ping timeout: 260 seconds)
03:08:17FromDiscord<garett> That doesn't seem to work 😦
03:08:36FromDiscord<garett> I suppose I can wrap the proc in a ref object and use GC_ref/unref on that :\
03:28:06*Tanger joined #nim
03:53:39*spiderstew_ joined #nim
03:55:57*spiderstew quit (Ping timeout: 248 seconds)
04:11:26FromDiscord<garett> I found a workaround
04:12:12*a_chou joined #nim
05:09:23*a_chou quit (Quit: a_chou)
05:19:40*asdflkj quit (Ping timeout: 258 seconds)
05:19:40*Jjp137 quit (Ping timeout: 258 seconds)
05:19:57*Jjp137 joined #nim
05:36:57*narimiran joined #nim
05:46:10*pzy joined #nim
05:46:38*pzy quit (Remote host closed the connection)
05:50:37*KpuCko0 joined #nim
05:50:44*KpuCko0 quit (Remote host closed the connection)
05:53:03*vhost-25 joined #nim
05:53:39*vhost-25 quit (Remote host closed the connection)
05:55:14*slrtbtfs[m]7 joined #nim
05:55:39*slrtbtfs[m]7 quit (Remote host closed the connection)
07:13:31*teasea quit (Quit: teasea)
07:13:55*teasea joined #nim
07:33:19*jackhill9 joined #nim
07:33:25*jackhill9 quit (Remote host closed the connection)
07:36:34FromDiscord<sin> are there any programming languages written in nim?
07:36:59FromDiscord<haxscramper> https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6
07:37:06FromDiscord<haxscramper> and nim compiler is written in nim
07:41:34FromDiscord<ElegantBeef> There is also #langdev dedicated to language development πŸ˜„
07:46:36*Tanger quit (Ping timeout: 252 seconds)
08:02:38*Guest6447 joined #nim
08:02:58*Guest6447 quit (Remote host closed the connection)
08:15:44*Guest894 joined #nim
08:15:58*Guest894 quit (Remote host closed the connection)
08:57:27*ssiyad joined #nim
08:57:50*ssiyad quit (Remote host closed the connection)
09:09:50*krux02 joined #nim
09:29:52*creme[m]15 joined #nim
09:29:52*creme[m]15 quit (Remote host closed the connection)
09:39:30*Kristina-t joined #nim
09:39:53*Kristina-t quit (Remote host closed the connection)
09:59:39*Zoom joined #nim
10:10:23*Vladar joined #nim
10:36:17ForumUpdaterBotNew Nimble package! sayhissatsuwaza - Say hissatsuwaza (special attack) on your terminal., see https://github.com/jiro4989/sayhissatsuwaza
10:36:20*PMunch joined #nim
10:41:27FromDiscord<Rika> kinda odd program but okay lmao
10:53:39FromDiscord<no name fits> Can I make my own templates for nimble?
10:53:47PMunchHaha, I have no idea what that even does :P
10:53:55FromDiscord<no name fits> Oh maybe I should've asked in #nimble
10:53:55PMunch@no name fits, define template
10:54:05PMunchThere's a #nimble?
10:54:35FromDiscord<hotdog> @no name fits like this kind of thing? https://github.com/treeform/nimtemplate
10:54:49FromDiscord<no name fits> Like when you ↡$ init nimble↡↡It asks you what kind of project and you can pick library, exe (or something) and hybrid. I usually just want to change some stuff it generates in the nimble file
10:54:59FromDiscord<no name fits> And I do it for every project
10:55:34FromDiscord<no name fits> Oh yeah I guess I could just fork a template on git
10:56:04PMunchSeems like it's pretty hard-coded in Nimble: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/init.nim#L23
10:56:38FromDiscord<no name fits> Or I guess not fork... Is there a way to copy a git, but make it its own repo? Like where it has no connection to where it was forked/cloned from?
10:57:02FromDiscord<hotdog> Clone it then delete .git and run `git init`
10:57:10FromDiscord<no name fits> oh, simple
10:57:22FromDiscord<no name fits> thanks guys!
10:59:29FromDiscord<hotdog> Something like `alias mkproject='git clone https://github.com/USER/TEMPLATE && mv TEMPLATE $1 && cd $1 && rm -rf .git && git init'` in your .bashrc (or similar) could be useful
11:04:41FromDiscord<no name fits> I'll have to look into that some other time. Right now manually deleting and init is fine
11:05:21FromDiscord<no name fits> I try to not spend too long on config stuff each day, lest I end up spending 3 hours setting up an env and no coding πŸ‘€
11:05:59FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3oDL
11:06:50FromDiscord<no name fits> I didn't even know you could do `= discard`?
11:07:18FromDiscord<Rika> its right
11:07:21FromDiscord<Rika> whats the issue?
11:07:35FromDiscord<Rika> "doesnt feel right" isnt really an issue is it
11:09:20FromDiscord<no name fits> You don't need the `[0]` though I believe. You can just do `[]`
11:09:42FromDiscord<Rika> uh, data is a sequence
11:09:45FromDiscord<Rika> you need `[0]`
11:09:46FromDiscord<no name fits> oh nvm
11:09:54FromDiscord<no name fits> oh right
11:10:07FromDiscord<no name fits> I see it now...
11:10:15FromDiscord<Rika> @jtiai what exactly is the issue?
11:10:55FromDiscord<jtiai> In reply to @Rika "whats the issue?": Well "data" is not use in my code at all I just needed it to make pointer to a pointer.
11:11:47FromDiscord<Rika> i dont understand
11:12:23FromDiscord<jtiai> As in C `void ` takes in pointer to a pointer and underlying code modifies that pointer.
11:12:58FromDiscord<Rika> do you know what the (void ) part of void should actually be? because usually that's used for "generics" in c
11:14:31FromDiscord<Airbus5717> If I disable the GC↡Will some features be disabled too ?
11:15:38FromDiscord<Rika> no, but they will be unusable
11:15:54FromDiscord<Rika> strings, sequences, ref objects can be used but will leak memory
11:16:10FromDiscord<Rika> it is recommended you opt for --gc:orc instead
11:17:32FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=3oDO
11:17:34FromDiscord<no name fits> What's wrong with just doing something like this? https://play.nim-lang.org/#ix=3oDN
11:17:55FromDiscord<no name fits> of course you can just make it a void pointer but you know
11:19:07FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3oDP
11:20:03FromDiscord<jtiai> In reply to @Rika "you can probably just": Exact, void is allocated by foo.
11:20:57FromDiscord<Rika> then ptrData can be nil
11:21:14FromDiscord<Rika> ah i guess you need to give a type
11:21:22FromDiscord<Rika> `var ptrData: pointer`
11:54:57*brad[] joined #nim
11:55:13*brad[] quit (Remote host closed the connection)
12:10:36*ladyashley97 joined #nim
12:16:17*Zoom quit (Ping timeout: 258 seconds)
12:18:42*aligator12315 joined #nim
12:19:02*aligator12315 quit (Remote host closed the connection)
12:26:59*Zoom joined #nim
12:36:05*arkurious joined #nim
12:39:20*krux02 quit (Remote host closed the connection)
12:39:29*federico3 joined #nim
12:39:34*federico3 left #nim (#nim)
12:47:12FromDiscord<exelotl> `var ptrData = nil` and `var ptrData: pointer` should be equivalent
12:49:37FromDiscord<exelotl> and yep, rika's solution is good, except I don't think openArray works here (at least not until view types land)
12:50:44FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3oEc
12:50:48FromDiscord<Rika> !eval var a = nil; echo typeof a
12:50:50NimBotCompile failed: /usercode/in.nim(1, 5) Error: invalid type: 'typeof(nil)' for var
12:50:57PMunchCan you do `var ptrData = nil` I'd assume it complained about missing type
12:51:00FromDiscord<Rika> you need the :pointer part
12:51:08FromDiscord<exelotl> oh interesting
12:51:38FromDiscord<exelotl> I guess that makes some sense
12:51:57FromDiscord<Airbus5717> In reply to @Rika "it is recommended you": Hmm is that explained in nim in action book?
12:52:04FromDiscord<Rika> not that i know of?
12:52:12FromDiscord<Airbus5717> The GC stuff
12:52:30FromDiscord<Rika> wheres that article by zevv when you need it
12:52:36FromDiscord<Rika> was it zevv idk
12:52:42FromDiscord<InventorMatt> i believe nim in action is older than orc and arc anyways
12:52:50PMunch!eval var a = nil.pointer; echo typeof(a)
12:52:52NimBotpointer
12:52:55FromDiscord<Rika> they certainly are
12:53:00FromDiscord<exelotl> yeah, arc and orc didn't exist when Nim in Action was written
12:53:00FromDiscord<Rika> it certainly is
12:53:47FromDiscord<Airbus5717> Hmmm
12:55:17PMunchDoes ARC/ORC programs need to link against nimrtl?
12:55:19PMunchI'm guessing no
12:56:28leorize[m]PMunch: yes
12:56:44PMunchIt has to?
12:57:02leorize[m]you still need the allocator, the exception handler, etc.
12:57:44PMunchOh I was talking about the nimrtl.dll library for when you want to load multiple Nim-made DLLs into a system
12:58:22PMunchI was just thinking since we no longer need to set up the thread GC stuff that maybe we didn't need that either
12:58:24leorize[m]same story if you wanna move refs between them
12:58:46leorize[m]the allocator must be shared
12:59:04leorize[m]and a lot of globals, too
13:03:49*Zoom quit (Ping timeout: 258 seconds)
13:03:55PMunchHmm, I see
13:05:36*xet7 joined #nim
13:06:32ForumUpdaterBotNew Nimble package! preserves - Preserves data model and serialization format, see https://preserves.gitlab.io/preserves/
13:07:15*Zoom joined #nim
13:08:08ForumUpdaterBotNew thread by Nxnl: Odd issues with HttpClient and AsyncHttpClient, see https://forum.nim-lang.org/t/8078
13:34:45*hyiltiz quit (Quit: hyiltiz)
13:49:17FromDiscord<Bung> @Araq have you checked this https://github.com/karaxnim/karax/commit/9237a1c20d71c8630ec8a960ccae7a238898c996#r51538670
13:55:15*Fryziu joined #nim
13:55:25*Fryziu quit (Remote host closed the connection)
14:05:26*sacredfrog quit (Quit: ZNC 1.8.2 - https://znc.in)
14:05:46*sacredfrog joined #nim
14:24:45*fantis quit (Remote host closed the connection)
14:25:44*hyiltiz joined #nim
14:25:59*fantis joined #nim
14:30:37*hyiltiz quit (Ping timeout: 248 seconds)
14:33:20*Jesin quit (Quit: Leaving)
14:35:10*hyiltiz joined #nim
14:35:10*hyiltiz quit (Changing host)
14:35:10*hyiltiz joined #nim
14:35:11*ocrete12 joined #nim
14:35:33*ocrete12 quit (Remote host closed the connection)
14:45:11*sz0 joined #nim
14:47:39*tane joined #nim
14:56:12*gig21 joined #nim
14:56:30*gig21 quit (Remote host closed the connection)
15:05:35FromDiscord<hamidb80> again with nim 1.4.8 😐 https://media.discordapp.net/attachments/371759389889003532/850027438842052638/unknown.png
15:09:00*Jesin joined #nim
15:09:27FromDiscord<jtiai> Apparently some detection has changed since lately nimble has been flagged as malware...
15:10:37FromDiscord<jtiai> In reply to @exelotl "and yep, rika's solution": This worked perfectly. Thanks for that. Now I just need to figure out how to get rid of square root, it's just too slow...
15:13:18*Jesin quit (Remote host closed the connection)
15:18:58FromDiscord<xDd> Guys can u point me to some best resources to learn nim especially memory management in case of ARC/ORC
15:22:32*SebastianM joined #nim
15:24:41FromDiscord<Hi02Hi> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html
15:24:59FromDiscord<exelotl> oh neat I forgot about that one
15:25:54FromDiscord<exelotl> araq's talk from last year is also good: https://www.youtube.com/watch?v=aUJcYTnPWCg
15:27:15*theelous3 joined #nim
15:35:45FromDiscord<kintrix> Hey, random question:↡Is there a way to replace only the first occurrence of something in a string with a `replace` or something? Or do I need to write my own proc for that
15:53:38*Zoom quit (Ping timeout: 258 seconds)
15:54:16*breitenj- joined #nim
15:54:45*breitenj- quit (Remote host closed the connection)
15:57:07*ladyashley97 quit (Quit: Connection closed)
16:01:03FromDiscord<kintrix> Well, I ended up implementing a custom function Β―\_(ツ)_/Β―
16:01:25FromDiscord<kintrix> Just wanted to make sure it does not already exist in the std
16:25:10FromDiscord<exelotl> I had a quick look and couldn't see anything
16:25:24SebastianMkintrix: If you would like to check what functions are available in the library you can use nimgrep. e.g nimgrep proc path-to-file
16:35:47FromDiscord<kintrix> Well, I just did a few google searches
16:36:06FromDiscord<kintrix> and looked at what strutils had
16:41:26*fredericve joined #nim
16:41:44*fredericve quit (Remote host closed the connection)
17:01:12*theelous3 quit (Read error: Connection reset by peer)
17:03:16*SebastianM left #nim (#nim)
17:14:02FromGitter<kaushalmodi> kintrix: May be you can provide a PR to update strutils.replace where it gets a third optional arg numOccurrences, which defaults to 0 (do all replacements )
17:17:31*RuthIkegah[m]18 joined #nim
17:17:33*RuthIkegah[m]18 quit (Remote host closed the connection)
17:19:13*sagax quit (Quit: Konversation terminated!)
17:19:17FromDiscord<kintrix> I'm still really new to Nim, but that is a good idea. I might do it when I get more comfortable with stuff \:P
17:19:26*sagax joined #nim
17:20:57FromGitter<kaushalmodi> kintrex: ⏎ ⏎ > I'm still really new to Nim ⏎ ⏎ If you were able to write your custom proc, you're already past that barrier :) ... [https://gitter.im/nim-lang/Nim?at=60b90f79a10461235db6afcb]
17:21:52FromGitter<kaushalmodi> Once you submit a PR, you will get help with improving docs and tests if needed for the new feature
17:22:39FromDiscord<kintrix> Well, I just do not know if my crude implementation is good enough Β―\_(ツ)_/Β―
17:22:49FromDiscord<kintrix> But yeah, alright
17:23:07FromDiscord<kintrix> I'm kind of busy right now, but might try to do that PR some time
17:23:13FromGitter<kaushalmodi> πŸ‘
17:23:18FromDiscord<kintrix> (edit) "is" => "would be"
17:24:27FromDiscord<brainproxy> so, encountering this weird thing, not sure if anyone has come across it before...↡↡on macOS, on first-run of a `.app` bundle downloaded from the Internet, when you get the dialog re: "do you want to run this thing downloaded from the Internet" and then click Open, the OS insists on passing a `-psn_[pid]` parameter to the executable in the bundle
17:25:26FromDiscord<brainproxy> this is causing a problem for an app I work on, and there are some ways to work around it, but it just seems so strange, not sure if maybe there's a way in the `Info.plist` or something to tell macOS to not pass that parameter
17:25:48FromDiscord<brainproxy> it only happens on the first run of a newly downloaded app, never on subsequent runs
17:35:24*sagax quit (Quit: Konversation terminated!)
17:41:52FromDiscord<brainproxy> alright, well, it's just known 🍎 πŸ’©
17:41:55FromDiscord<brainproxy> https://github.com/bitcoin/bitcoin/blame/b6e34afe9735faf97d6be7a90fafd33ec18c0cbb/src/util/system.cpp#L383-L389
17:42:11FromDiscord<brainproxy> just one example of how projects deal with this crap
18:08:19FromDiscord<mlokis> What is the structure of seq? i would like to cast it to raw form and modify it manually. This is because i don't want setLen to set the old elements that were truncated to zero value. For example elements can reference allocated memory and i want to reuse that memory if possible.
18:12:20*Zoom joined #nim
18:14:56*sacredfrog quit (Quit: ZNC 1.8.2 - https://znc.in)
18:15:37*sacredfrog joined #nim
18:18:11*abm joined #nim
18:23:40FromDiscord<haxscramper> IIRC it is a pointer to `[cap; data]`
18:24:07FromDiscord<haxscramper> And it is not guaranteed to be this way
18:30:32*muppeth joined #nim
18:30:42*muppeth quit (Remote host closed the connection)
19:02:08*Gustavo6046 joined #nim
19:03:38*troydm9 joined #nim
19:04:13*troydm9 quit (Remote host closed the connection)
19:14:43*kl3 joined #nim
19:14:47*kl3 is now known as Guest70258
19:15:10*Guest70258 quit (Remote host closed the connection)
19:16:53FromGitter<ynfle> @mlokis, what are you trying to do?
19:26:01*julienth3719 joined #nim
19:26:03*julienth3719 quit (Remote host closed the connection)
19:47:02FromDiscord<System64 ~ Flandre Scarlet> Hello!
19:47:28FromDiscord<ElegantBeef> Hello
19:48:17FromDiscord<System64 ~ Flandre Scarlet> How are you?
19:57:25FromDiscord<Varriount> In reply to @mlokis "What is the structure": @mlokis I'm not sure that would work, even if you cast the sequence. Is this a performance problem in your code currently?
19:59:11FromDiscord<System64 ~ Flandre Scarlet> Does someone use c2nim please? I have some trouble with it
20:03:16FromDiscord<ElegantBeef> Asking your actual question can provide more help than asking to ask
20:06:13FromDiscord<System64 ~ Flandre Scarlet> So I try to c2nim that, it worked successfully but when I use the outputed .nim file, this nim file has several errors, I correct some errors, new errors appears https://media.discordapp.net/attachments/371759389889003532/850103100902473738/Tilengine.h
20:06:35FromDiscord<System64 ~ Flandre Scarlet> This is the nim file, I try to interop with a dll https://media.discordapp.net/attachments/371759389889003532/850103192754585690/Tilengine.nim
20:13:25*dalurka joined #nim
20:13:54*dalurka quit (Remote host closed the connection)
20:15:13*Zevv joined #nim
20:15:15*Zevv left #nim (#nim)
20:15:46*Zevv joined #nim
20:20:06FromDiscord<mlokis> In reply to @Varriount "<@!343028072095809536> I'm not sure": i em writing ecs and this way i can implement on place object pooling
20:23:53FromGitter<ynfle> @ System64 ~ Flandre Scarlet, c2nim requires some modifications after being run sometimes
20:24:39*narimiran quit (Ping timeout: 258 seconds)
20:24:49FromDiscord<System64 ~ Flandre Scarlet> which ones should I do? I don't want to break something
20:25:02FromDiscord<mlokis> when i remove object i just swap it with the last element and truncate, i want to offer the option for user (mainly me) to reuse dead components as components will contain pointers to heap and reusing them can greatly decreas allocations. Now that i think about it maybe i can just introduce additional pool. though this would be more elegant.
20:26:54*xet7 quit (Remote host closed the connection)
20:27:12*Vladar quit (Quit: Leaving)
20:29:03FromDiscord<ElegantBeef> In reply to @System64 "which ones should I": Well try to compile the file then fix the errors that present is an easy way to know which are the issues
20:29:18FromDiscord<ElegantBeef> Alternatively checkout Nico, it's similar to tile engine πŸ˜„
20:29:58FromDiscord<System64 ~ Flandre Scarlet> with scanline rendering too?
20:30:47FromDiscord<ElegantBeef> No but it has the abillity to apply post process shaders
20:30:54FromDiscord<System64 ~ Flandre Scarlet> oh interesting
20:32:28FromDiscord<System64 ~ Flandre Scarlet> How can I declare that? (I know how to declare a variable but declaring that is a bit weird) https://media.discordapp.net/attachments/371759389889003532/850109698808086608/unknown.png
20:35:57FromDiscord<ElegantBeef> i dont know what it's supposed to be
20:36:41FromDiscord<System64 ~ Flandre Scarlet> I try to interop with a dll
20:36:57ForumUpdaterBotNew thread by Mantielero: CSV: paring in js, see https://forum.nim-lang.org/t/8079
20:44:27FromDiscord<ElegantBeef> Sure but what's it in C land
20:45:11FromDiscord<System64 ~ Flandre Scarlet> C land?
20:45:20FromDiscord<ElegantBeef> What is `dllExport` supposed to be
20:45:33*Sargun12 joined #nim
20:46:10*Sargun12 quit (Remote host closed the connection)
20:47:12*tane quit (Quit: Leaving)
20:47:35FromDiscord<System64 ~ Flandre Scarlet> I dunno, I took the header file and c2nim'ed it
20:47:46FromDiscord<ElegantBeef> Well you need to read the header and know what you need to keep/do
20:47:50FromDiscord<ElegantBeef> It's not magic
20:48:14FromDiscord<ElegantBeef> Really you might not even need any of that stuff in the define blocks
20:48:35FromDiscord<System64 ~ Flandre Scarlet> I need the structs and variables and functions
20:48:44FromDiscord<System64 ~ Flandre Scarlet> and enums too
20:48:53FromDiscord<ElegantBeef> So remove everything that's not a type def
20:49:06FromDiscord<System64 ~ Flandre Scarlet> and a function
20:49:57FromDiscord<ElegantBeef> well remove line 21 to 69 and it might work, but idk what some of these C macros are supposed to do
20:50:47FromDiscord<System64 ~ Flandre Scarlet> Still have that https://media.discordapp.net/attachments/371759389889003532/850114310666846248/unknown.png
20:51:13FromDiscord<System64 ~ Flandre Scarlet> and this order thing is.. Weird
20:51:45FromDiscord<ElegantBeef> replace those lowercase `t`s with `T` and you'll be on the path of happiness
20:52:24FromDiscord<ElegantBeef> The order thing isnt that weird, Nim requires enums to go in ascending order
20:52:38FromDiscord<ElegantBeef> C does not
20:52:51FromDiscord<System64 ~ Flandre Scarlet> ah so it won't break?
20:53:11FromDiscord<ElegantBeef> Well if you just swap their order to be proper it'll be fine
20:53:12*xet7 joined #nim
20:53:43FromDiscord<System64 ~ Flandre Scarlet> like that? https://media.discordapp.net/attachments/371759389889003532/850115053587791922/unknown.png
20:53:54FromDiscord<ElegantBeef> Seems to be ascending order
20:54:25FromDiscord<System64 ~ Flandre Scarlet> The 2 last errors https://media.discordapp.net/attachments/371759389889003532/850115229940711435/unknown.png
20:54:40FromDiscord<ElegantBeef> The last one i'll let you solve, i dont know what line 60 is
20:54:57FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/850115358949900339/unknown.png
20:55:00ForumUpdaterBotNew thread by Zoom: Tetronimia: a version of *that* game for your terminal, see https://forum.nim-lang.org/t/8080
20:56:15FromDiscord<System64 ~ Flandre Scarlet> I did that and BOOM! https://media.discordapp.net/attachments/371759389889003532/850115685223759902/unknown.png
20:56:44FromDiscord<ElegantBeef> Well firstly you just made an enum that doesnt compile
20:57:23FromDiscord<ElegantBeef> Just make blend50 `BlendMix` or dont have `BlendMix`
20:57:45FromDiscord<System64 ~ Flandre Scarlet> done
20:58:08FromDiscord<ElegantBeef> And those errors are due to me telling you to delete the type aliases
20:58:11FromDiscord<ElegantBeef> Whoops πŸ˜„
20:58:26FromDiscord<System64 ~ Flandre Scarlet> unfortunately I don't have more time now :/↡But I can continue tomorrow
20:59:02FromDiscord<ElegantBeef> Well line 36 to 52 in the c2nim'd file has the type defs you just copy those and paste them above the types/proc defs and you'll be golden
20:59:51FromDiscord<System64 ~ Flandre Scarlet> Alright !
21:03:36*Nikky9 joined #nim
21:04:05*Nikky9 quit (Remote host closed the connection)
21:12:05*beshr quit (Remote host closed the connection)
21:16:49FromDiscord<mlokis> i am amazingly annoyed by this bug: https://github.com/pragmagic/vscode-nim/issues/193. I probably can fix it but that requires me recalling how to setup extension debug environment witch is a bother if my pr gets ignored in a same way as mentioned issue so far.
21:22:44*Bitweasil1 joined #nim
21:23:14*Bitweasil1 quit (Remote host closed the connection)
21:31:14FromDiscord<exelotl> @mlokis maybe give saem's nim vscode extension a try? It's the most actively maintained one, so even if the bug is still present it's the one that would be best to contribute to.
21:36:04*Zoom quit (Quit: Leaving)
21:36:08*ZoomZoomZoom joined #nim
21:36:30ZoomZoomZoomHey, anyone knows if the upcoming neovim release is about to bring any goodies for Nim coding?
21:37:31ZoomZoomZoomI still keep my config Vim-compatible except for leorize's nim.nvim
21:38:13ZoomZoomZoomDo I miss on any cool features already available?
21:39:25*bsund joined #nim
21:40:02*bsund quit (Remote host closed the connection)
21:40:48leorize[m]nvim-compe is pretty nice but that's about it afaict
21:48:42*jjhorton[m]19 joined #nim
21:49:19ZoomZoomZoomOk, thanks
21:49:25*jjhorton[m]19 quit (Remote host closed the connection)
21:58:52*fputs joined #nim
22:05:50FromDiscord<Varriount> On which platforms does Nim use TLS emulation?
22:17:49*summerisle29 joined #nim
22:18:24*summerisle29 quit (Remote host closed the connection)
22:22:53*crem1 quit (Ping timeout: 250 seconds)
22:31:41*crem1 joined #nim
22:35:48*Han joined #nim
22:36:20*Han quit (Remote host closed the connection)
22:37:07leorize[m]windows and the bsds atm
22:46:39*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
22:58:22*ZoomZoomZoom quit (Ping timeout: 258 seconds)
22:58:46*wrkrcoop joined #nim
22:58:46*Gustavo6046 joined #nim
22:59:09*wrkrcoop quit (Remote host closed the connection)
23:05:00*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
23:05:36*Gustavo6046 joined #nim
23:08:03*PMunch quit (Quit: leaving)
23:24:36*schizo22 joined #nim
23:24:46*schizo22 quit (Remote host closed the connection)
23:33:50*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
23:37:30*Gustavo6046 joined #nim
23:44:36*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
23:44:55*Gustavo6046 joined #nim
23:52:36*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
23:53:05*Gustavo6046 joined #nim
23:56:13*Gustavo6046 quit (Client Quit)
23:57:32*Gustavo6046 joined #nim
23:59:58*abm quit (Read error: Connection reset by peer)