<< 19-05-2021 >>

00:00:48FromDiscord<timotheecour> an issue is not convenient for review feedback; i was suggesting 1st a PR in nim repo (which won't be merged, but just to get more visibility from nim folks feedback), and then a PR in homebrew-core (which will get feedback from homebrew devs)
00:01:09FromDiscord<timotheecour> (edit) "an issue is not convenient for review feedback; i was suggesting 1st a PR in nim repo (which won't be merged, but just to get more visibility from nim folks ... feedback)," added "to get"
00:01:30FromDiscord<timotheecour> (edit) "an issue is not convenient for review feedback; i was suggesting 1st a PR in nim repo (which won't be merged, but just to get more visibility from nim folks to get feedback), and then ... a" added "after this is good, re-open"
00:02:23FromDiscord<timotheecour> (edit) "devs)" => "devs); or directly a PR in homebrew-core but then you likely won't get as much visibility from nim ppl"
00:08:13kayabaNerve... sounds decently cursed to me :P but thanks for the advice
00:20:34*clyybber quit (Quit: WeeChat 3.1)
00:38:42*azed quit (Quit: WeeChat 3.1)
00:44:39*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:45:05*njoseph joined #nim
00:53:43*willyboar quit (Quit: Konversation terminated!)
00:54:40*nphg1 joined #nim
00:57:59*nphg quit (Ping timeout: 265 seconds)
01:07:41*casaca quit (Ping timeout: 240 seconds)
01:15:11*casaca joined #nim
01:18:49*krux02 quit (Remote host closed the connection)
01:28:11PrestigeAnyone using godot-nim? I tried building the example but get a segfault when running the program (godot 3.3, linux, nim 1.4.6)
01:32:26FromDiscord<ElegantBeef> I suggest using gd-nim, but i can checkout the stub if you want
01:33:34Prestigegd-nim? I'm not seeing it on nimble or github
01:35:50*arkurious quit (Quit: Leaving)
01:37:50FromDiscord<ElegantBeef> ah sorry just gdnim https://github.com/geekrelief/gdnim
01:38:08Prestigeah
01:38:10FromDiscord<ElegantBeef> Geekrelief did some work and made it less annoying, but it also supports other things like HCR
01:38:15FromDiscord<Rika> smh beef
01:38:19Prestigehell yeah
01:38:29FromDiscord<Rika> dont u remember the exact name of at least 200 nim packages
01:38:30FromDiscord<Rika> smh
01:38:43Prestige^ newb
01:38:55PrestigeThought you were our AI package manager
01:38:58FromDiscord<ElegantBeef> Yea i'm leaving nim now, going to an even more obscure package
01:39:02FromDiscord<ElegantBeef> (edit) "package" => "language"
01:39:56Prestige"WARNING gdnim is not battle tested / production ready. Use godot-nim if you need something stable."
01:40:03PrestigeI can't even get godot-nim to work lel
01:40:34FromDiscord<Rika> beef about to move to beef
01:41:04FromDiscord<ElegantBeef> Well give me a minute and i'll test it for you
01:42:46*Tlangir joined #nim
01:45:17FromDiscord<ElegantBeef> worked fine on 1.4.6 and 3.2, now to get 3.3
01:45:29Prestige:o
01:50:22FromDiscord<ElegantBeef> Seems worked with 3.3 aswell
01:50:35Prestigehm what steps are you taking?
01:50:58FromDiscord<ElegantBeef> Cloning repo, setting the godot path var, and then nake build
01:51:12PrestigeWhere is that exporting for you?
01:51:18Prestigelike, the build
01:52:44FromDiscord<ElegantBeef> I'm just hitting the play button
01:53:06Prestigeoh, I see
01:53:14PrestigeI thought this was supposed to be building the whole project
01:53:14FromDiscord<ElegantBeef> Should i try a build?
01:53:27FromDiscord<ElegantBeef> nake build will build the files hooked up in a file
01:53:49FromDiscord<ElegantBeef> gdnim is better in this regard as it has a CLI for generating new files and it auto subscribes
01:55:31PrestigeSick, so this is working. Thanks
02:53:53*thomasross quit (Ping timeout: 240 seconds)
02:55:12FromDiscord<garett> In reply to @ElegantBeef "Yea i'm leaving nim": I hope you're joking, but if not, which language?
02:56:39FromDiscord<ElegantBeef> I'm joking
02:57:03FromDiscord<ElegantBeef> I've drank too much koolaid to leave
02:57:35FromDiscord<garett> I was put off by the compile time added by `winim`, but now that I've stopped using it, things are nice and snappy again
02:57:50FromDiscord<garett> I only declared the bare minimum API that I needed.
02:58:20FromDiscord<garett> I love being able to declare `{.importc.}` procs locally
02:58:49FromDiscord<garett> Though you can also do that in C in some cases
03:01:50FromDiscord<ElegantBeef> Something something IC soon tm
03:03:33FromDiscord<garett> Beef, what are you writing in Nim?
03:04:20FromDiscord<ElegantBeef> Presently? Working on a heterogeneous sequence library
03:06:07FromDiscord<ElegantBeef> Shameless spam is shameless https://github.com/beef331/hseq
03:10:58FromDiscord<garett> Interesting. What use case inspired this?
03:11:42FromDiscord<ElegantBeef> Was an idea i had a while ago, just got motivated to do it 😄
03:11:48FromDiscord<garett> Cool
03:13:53FromDiscord<garett> sent a code paste, see https://play.nim-lang.org/#ix=3nh1
03:13:58FromDiscord<garett> into all the necessary stuff to make it easy
03:14:34FromDiscord<garett> And another macro to rewrite Nim into GLSL, but it was just a learning exercise
03:15:44FromDiscord<garett> Nim is really attractive to me for writing CPU and GPU code together
03:16:32FromDiscord<garett> I couldn't figure out how to get my `comapi` macro to accept `comapi IUnknown:...`
03:17:12FromDiscord<Rika> @ElegantBeef not a fan of the api
03:17:28FromDiscord<ElegantBeef> Which part?
03:18:05FromDiscord<Rika> `foreachMut`
03:18:08FromDiscord<Rika> eeh
03:18:23FromDiscord<Rika> are we making a new naming scheme or what
03:18:36FromDiscord<ElegantBeef> blame forloop macros not having a sym'd character
03:18:51FromDiscord<Rika> no, i mean dont we usually say `mforeach`
03:19:57FromDiscord<ElegantBeef> well i did have `for x in hseqMItems` but i didnt know what to name it after finding the issue with bindsym
03:21:02*Tlangir quit (Remote host closed the connection)
03:21:25*Tlangir joined #nim
03:25:19FromDiscord<Rika> `This caseof and else only works at the root level, and if it's omitted the body is ran for all kinds in the seq`↵theres prolly a really easy way to go past this limitation
03:26:14FromDiscord<ElegantBeef> Yea it's not too difficult just look for `caseof` and when found replace that with the casestmt
03:26:39FromDiscord<Rika> are you not using pattern matching?
03:26:46FromDiscord<ElegantBeef> Nope
03:26:48FromDiscord<Rika> you can even remove "caseof" and make it a real regular case statement
03:26:51FromDiscord<Rika> why not?
03:27:12FromDiscord<ElegantBeef> It doesnt tickle my fancy
03:27:35FromDiscord<Rika> why
03:27:38FromDiscord<Rika> thats gross
03:28:11FromDiscord<Rika> at least rename it to something else
03:28:14FromDiscord<Rika> idk typeIs?
03:28:17FromDiscord<Rika> (edit) "typeIs?" => "`typeIs`?"
03:28:56FromDiscord<ElegantBeef> How would i make it a regular casestmt?
03:29:41FromDiscord<ElegantBeef> I could use a casestmt macro if `of` compiles there, but aside from that the entire point is for the users to interact with typedescs not enums
03:29:44FromDiscord<Rika> youd just check the case'd variable if it matches a given ident
03:30:00FromDiscord<Rika> its a "real" case statement in the syntax
03:30:07FromDiscord<Rika> but you're transforming the whole thing
03:30:35FromDiscord<ElegantBeef> I dont quite follow
03:30:50FromDiscord<ElegantBeef> instead of `caseof` what would he programmer write?
03:31:33FromDiscord<ElegantBeef> (edit) "`caseof`" => "`caseof int`"
03:32:14*spiderstew joined #nim
03:32:22FromDiscord<garett> Beef, looking at `foreach` and `iterImpl` etc, inspiring 🙂
03:33:25FromDiscord<Rika> In reply to @ElegantBeef "instead of `caseof int`": either `typeIs int` or `case typeof(x): of int:`;
03:33:35FromDiscord<Rika> unless you're using a typed macro
03:33:39*spiderstew_ quit (Ping timeout: 260 seconds)
03:33:49FromDiscord<Rika> in which case typeIs is the only feasible option i guess
03:36:14FromDiscord<ElegantBeef> I suppose i could remove the caseof completely and make a casestmt macro like i said so we can use `int` instead of `TestTypeInt` or w/e the enum name is
03:37:19FromDiscord<Rika> i just dont like the very similar name "caseof"
03:37:30FromDiscord<Rika> its not really relevant if its a type youre passing in
03:37:55FromDiscord<ElegantBeef> Well the reason you pass the type is so you dont have to use the enum, and i guess a casestmt macro would handle it
03:38:22FromDiscord<Rika> ignore the backend details
03:38:26FromDiscord<Rika> think of it as a user
03:38:41FromDiscord<Rika> a user (prolly) doesnt know whatever the hell youre doing in the back
03:38:45FromDiscord<ElegantBeef> I am that's why i'm designing it to only think about the type
03:38:55FromDiscord<Rika> yet you use "caseof"
03:39:11FromDiscord<ElegantBeef> I see your point
03:39:25FromDiscord<Rika> okay
03:43:32*azed joined #nim
04:35:28ForumUpdaterBotNew thread by Xioren: At what likelihood do likely/unlikely become useful?, see https://forum.nim-lang.org/t/8000
04:44:32*Kumool joined #nim
04:44:58*rockcavera quit (Remote host closed the connection)
05:14:11*azed quit (Ping timeout: 240 seconds)
06:09:09*narimiran joined #nim
06:30:51ForumUpdaterBotNew Nimble package! unalix - Small, dependency-free, fast Nim package (and CLI tool) for removing tracking fields from URLs., see https://github.com/AmanoTeam/Unalix-nim
06:54:36*hyiltiz quit (Ping timeout: 252 seconds)
06:57:14*PMunch joined #nim
07:05:01*pietroppeter joined #nim
07:06:58*hyiltiz joined #nim
07:54:22*jess quit (Killed (grumble (My fellow staff so-called 'friends' are about to hand over account data to a non-staff member. If you care about your data, drop your NickServ account NOW before that happens.)))
07:55:01Clonkk[m]Is there a ``rsync`` equivalent in ``std/os`` ?
07:55:02Clonkk[m](or other library)
08:00:27PMunchI don't think so
08:00:42PMunchI mean you can call rsync
08:09:09*hendursaga quit (Ping timeout: 240 seconds)
08:14:55*hendursaga joined #nim
08:21:13*krux02 joined #nim
08:29:46Clonkk[m]Yeah but that's not portable.
08:30:02Clonkk[m]and ``copyDir`` doesn't preserve symbolic link
08:32:27Clonkk[m]leorize: Here's a new idea for nim-sys 😛
08:52:21*jess joined #nim
09:04:00*krux02 quit (Remote host closed the connection)
09:04:45*krux02 joined #nim
09:14:22*pietroppeter quit (Quit: Connection closed for inactivity)
09:16:46*omnigoat quit (Ping timeout: 240 seconds)
09:17:16*r4vi quit (Ping timeout: 268 seconds)
09:18:24*surma quit (Read error: Connection reset by peer)
09:25:07*clyybber joined #nim
09:34:45*omnigoat joined #nim
09:36:19*surma joined #nim
09:37:33*r4vi joined #nim
09:50:43*Tlangir quit (Remote host closed the connection)
10:09:26*tane joined #nim
10:25:06*PMunch quit (Ping timeout: 240 seconds)
10:36:11FromDiscord<Ashwin> hey guys is there any way to download the docs ?
10:39:17*PMunch joined #nim
10:42:56Clonkk[m]You can use devdocs.io, it has Nim documentation and an offline mode. Otherwise, the doc is built by github so you can probably just download it there
10:44:53*sagax quit (Ping timeout: 252 seconds)
10:44:57FromDiscord<Ashwin> ty!
11:04:30ForumUpdaterBotNew thread by Masiarek2: String ( int, string and char) - convert into Table, see https://forum.nim-lang.org/t/8001
11:17:38*aeverr quit (Remote host closed the connection)
11:20:41*Arrrrrrrr joined #nim
11:31:00*arkurious joined #nim
11:36:27*aeverr joined #nim
11:40:36*aeverr quit (Client Quit)
11:58:26*fantis joined #nim
12:06:08*jess quit (Changing host)
12:06:08*jess joined #nim
12:13:39Arrrrrrrrchat.nim.net when
12:15:55*aeverr joined #nim
12:37:14leorize[m]Clonkk: nim-sys gotta wait til I get cps to a comfortable support level
12:37:20leorize[m]we are getting close though :p
12:37:55Clonkk[m]<leorize[m] "we are getting close though :p"> No hurry, I was remembering when you asked for suggestion in nim-sys 😀
12:38:09Clonkk[m]> <@leorize:envs.net> we are getting close though :p
12:38:09Clonkk[m] * No hurry, I just remembered you asking for suggestion in nim-sys 😀
12:39:44*teiresias quit (Quit: ZNC - https://znc.in)
12:44:20Zoom[m]Hey, are there any plans regarding freenode takeover? Official Matrix channel, perhaps? ;)
12:51:52FromDiscord<Rika> what happened?
12:53:29FromDiscord<Rika> ah https://news.ycombinator.com/item?id=27153338
12:53:50FromDiscord<Rika> ah #2
12:53:53FromDiscord<Rika> (comment in link)
12:54:22*ddevault left #nim ("See you on libera.chat")
13:01:44Zoom[m]@Rika: "A previous copy of this was a draft. This one isn't - its the real thing.":
13:01:44Zoom[m]https://www.kline.sh/
13:05:48*jess quit (Quit: so long and thanks for all the fish)
13:14:06*blitzworksD1337d is now known as BlitzWorks
13:14:28*rockcavera joined #nim
13:15:40leorize[m]if this is fixed we can just convert the current gitter room into the central hub: https://gitlab.com/gitterHQ/webapp/-/issues/2711
13:15:48leorize[m]the problem is that it's not fixed :p
13:17:05CodeBitCookie[m]Hello everyone
13:17:06*natrys joined #nim
13:17:28CodeBitCookie[m]I found a blog about what the best programming language
13:17:32CodeBitCookie[m]according to this guy its nim
13:17:33CodeBitCookie[m]https://ckkashyap.blogspot.com/2015/02/nim-is-best-programming-language.html
13:17:37CodeBitCookie[m]:D yay go nim
13:18:01CodeBitCookie[m] * I found a blog about what the best programming language is
13:18:03PMunchFrom 2015 even, Nim has gotten a lot better since then
13:18:26PMunchAnd damn, I would've never imagined Freenode going through a takeover..
13:19:49FromDiscord<Rika> not a lot of us thought itd happen i believe
13:25:09leorize[m]I can move the current Nim spaces to matrix.org to gain federation support then we can bridge directly to discord
13:25:34leorize[m]but if we wanna speak to irc users we gotta bridge to an irc server too
13:25:46FromDiscord<Rika> bridge directly to discord? how
13:26:10leorize[m]look at #science
13:26:20leorize[m]it's bridged directly to matrix
13:26:46FromDiscord<Rika> what the fuckj
13:26:56FromDiscord<Rika> okay
13:26:58FromDiscord<Rika> interesting
13:27:01Clonkk[m]Which is why Nim science is much prettier when sharing formatted message than #Nim on Element 😀
13:27:22Clonkk[m] * Which is why Nim science is much prettier when sharing formatted message than #Nim on Element 😀. Also editting message spams people
13:27:28Clonkk[m] * Which is why Nim science is much prettier when sharing formatted message than #Nim on Element 😀. Also editting message spams people. Isn't it ?
13:27:46FromDiscord<Rika> editing messages on discord or matrix?
13:28:01Clonkk[m]Editting message on Matrix spam users on Discord
13:28:13FromDiscord<Rika> i believe it still does so on the direct bridge
13:30:02Clonkk[m]Possibly, but at least we'd get the formatting back
13:30:27FromDiscord<Rika> formatting?
13:31:29Clonkk[m]When people send snippet of code, it's kinda ugly
13:32:53aeverrah i understand
13:32:59aeverrah wrong client, i'm rika on discord
13:33:04*xace quit (Remote host closed the connection)
13:33:28*xace joined #nim
13:35:33*xace quit (Remote host closed the connection)
13:35:53*xace joined #nim
13:37:32*xace quit (Remote host closed the connection)
13:37:57*xace joined #nim
13:39:16*xace quit (Remote host closed the connection)
13:39:33*xace joined #nim
13:48:21*lritter joined #nim
13:57:02*lritter quit (Quit: Leaving)
13:57:23*lritter joined #nim
14:00:35*Vladar joined #nim
14:03:57*bfgcoding[m] joined #nim
14:04:03bfgcoding[m]Hello Everyone
14:07:03*deepend left #nim ("WeeChat 2.8")
14:07:43*Arrrrrrrr quit (Remote host closed the connection)
14:17:28bfgcoding[m]Question for people as I'm am new to Nim and trying to build a library to test it out. Is there a way for me to import a local package in another project? For example say I'm building a math library and want to test it in another nim project how would I import that file? Thank you in advance for your time :D
14:19:49FromDiscord<willyboar> If you create your local project with nimble init you can nimble install inside your project
14:20:15FromDiscord<willyboar> Then you are able to use it in any of your projects
14:20:33ForumUpdaterBotNew Nimble package! catnip - Assembler for runtime code generation, see https://github.com/RSDuck/catnip
14:21:13bfgcoding[m]Awesome thanks I wasn't a 100% that was going to work :D
14:24:14*PMunch quit (Quit: leaving)
14:24:29*kuon joined #nim
14:36:28*voidpi quit (Quit: leaving)
15:09:13*kuon quit (Quit: Leaving)
15:10:00*kayabaNerve quit (Ping timeout: 268 seconds)
15:13:20*sagax joined #nim
15:27:59*pietroppeter joined #nim
15:37:16*noeontheend joined #nim
15:37:53*noeontheend quit (Client Quit)
15:38:09*noeontheend joined #nim
15:38:44*noeontheend quit (Client Quit)
15:39:54*noeontheend joined #nim
15:46:46*noeontheend quit (Quit: noeontheend)
15:46:59*noeontheend joined #nim
15:47:19*noeontheend quit (Client Quit)
15:48:16*noeontheend joined #nim
15:49:33*noeontheend quit (Client Quit)
15:49:49*noeontheend joined #nim
15:50:39*noeontheend quit (Client Quit)
15:50:55*noeontheend joined #nim
15:52:43*noeontheend quit (Client Quit)
15:52:59*noeontheend joined #nim
16:00:35*lritter quit (Quit: Leaving)
16:03:39FromDiscord<quarternion> When I create a slice of a string, does it allocate new memory for the slice, or it is just a view like c++ `string_view`? For example, `let s = "nim"; let slice = s[0 .. 1]`.
16:05:12*avass joined #nim
16:09:29laincatpart
16:09:31laincatfuck
16:09:33*laincat left #nim (#nim)
16:10:24*noeontheend quit (Quit: noeontheend)
16:11:07FromDiscord<Rika> lol
16:11:08*noeontheend joined #nim
16:11:36FromDiscord<Rika> In reply to @quarternion "When I create a": right now i believe its a copy, but in the future it might become a view
16:16:50*qwertfisch left #nim (#nim)
16:28:17*NimBot joined #nim
16:30:54FromDiscord<quarternion> @Rika Thanks. Right now I am looking for a way to convert non null-terminated c character array into nim string. I browsed the manual but couldn't find one.
16:32:20FromDiscord<quarternion> Do I have to create a new null-terminated string with `strncpy`, so that nim string can accept it?
16:39:39FromDiscord<Rika> i cant help now, its late for me
16:39:50FromDiscord<Rika> just hope someone else is active to see you
16:40:07leorize[m]you can convert it by just copying each characters, or just use the nim string as the buffer in the first place
16:41:31leorize[m]so `addr buf[0]` will get you the beginning of the buffer which you can write into
16:41:49leorize[m]`setLen()` can be used to set the buffer size before you use it
16:42:11leorize[m]you can also use it to set the correct size after you are done with writing to it
17:11:41ForumUpdaterBotNew thread by Pietroppeter: IRC freenode staff exodus, see https://forum.nim-lang.org/t/8002
17:26:19FromDiscord<kodkuce> today i wrote some script in python and was like this python is retarded compered to nim
17:31:57*fantis quit (Ping timeout: 240 seconds)
17:33:44*bfgcoding[m] quit (Ping timeout: 245 seconds)
17:33:44*lnxw37d4 quit (Ping timeout: 245 seconds)
17:33:51*bfgcoding[m] joined #nim
17:34:03*lnxw37d4 joined #nim
17:35:01termerlol kodkuce
17:41:46*noeontheend quit (Ping timeout: 252 seconds)
18:02:57FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3nkc
18:08:07*arecaceae quit (Remote host closed the connection)
18:11:26*arecaceae joined #nim
18:15:11FromDiscord<haxscramper> `instantiationInfo(fullPaths = true)`
18:15:33FromDiscord<haxscramper> (edit) "true)`" => "true).filename.cstirng`"
18:15:41FromDiscord<haxscramper> Or without `fullPaths`
18:17:51FromDiscord<exelotl> ahh thanks
18:22:31*fantis joined #nim
18:27:21FromDiscord<Goat> In reply to @kodkuce "today i wrote some": I'm writing a program for myself in NIm and Python at the same time. It's an interesting learning experience
18:30:03FromDiscord<Goat> For the python version I'm using a third-party module to base it on. For the Nim version I'm rewriting the same module in Nim but using custom types instead of relying on objects
18:31:13FromDiscord<jtiai> I've been writing python code for over 12 years and it's been hard to forget certain habits...
18:34:35FromDiscord<jtiai> But I managed to write very little OS in Nim and now I'm good speed to write an emulator.
18:34:48termerDoes anyone know if there's a way in the standard library (or some module in it) to get an Enum value out of an Ordinal int?
18:35:04termeror will I just have to write a function per-enum?
18:36:41FromDiscord<jtiai> Shouldn't template be able to do it?
18:37:13termerI'm not sure, I'm pretty new to Nim lol
18:38:39FromDiscord<haxscramper> `YourEnum(<yourInt>)`
18:39:19FromDiscord<haxscramper> `type E = enum A, B; echo E(1)`
18:39:41termeroh, thanks
18:39:44termerthat's much simpler than I thought
18:50:40*letto quit (Quit: Konversation terminated!)
18:50:51*clyybber quit (Quit: WeeChat 3.1)
18:52:39*letto joined #nim
19:19:28giacoIf I have a huge seq and I pass it to a proc (s:seq), the proc will receive a full copy if it due to "seq and strings have value semantics", right?
19:21:31FromDiscord<haxscramper> no
19:21:48FromDiscord<haxscramper> if object is larger than certain size it is passed by reference
19:21:51FromDiscord<Recruit_main707> it will receive the size, the length, and a pointer
19:21:56FromDiscord<Recruit_main707> iirc
19:23:45giacoHow can I have control on this?
19:24:09FromDiscord<Recruit_main707> on what
19:24:55FromDiscord<Recruit_main707> > if object is larger than certain size it is passed by reference↵you can avoid this by adding the {.bycopy.} pragma to the object declaration
19:29:38giacoSo bycopy and byref pragmas and "var" keyword in proc signatures is how you turn off autopilot while retaining safety measures, correct?
19:31:06giacoAnd what's the equivalent of "var" to force that parameter to be passed by value but just for that function
19:32:48FromDiscord<haxscramper> you can just copy it inside of a function
19:37:13*grobe0ba quit (Quit: ZNC 1.7.5 - https://znc.in)
19:37:24*grobe0ba joined #nim
19:37:38*pietroppeter quit (Quit: Connection closed for inactivity)
19:45:34*joast quit (Quit: Leaving.)
19:51:33*kenran joined #nim
19:58:19FromDiscord<Recruit_main707> `(a: int)` is by value↵`(a: var int)` is by implicit reference↵`(a: ref/ptr int)` is by explicit managed/unmanaged reference
19:59:07FromDiscord<Recruit_main707> `(a: var ref/ptr int)` is an implicit pointer to an explicit managed/unmanaged pointer
20:02:02*kenran quit (Quit: leaving)
20:08:02*joast joined #nim
20:20:18*mwbrown quit (Ping timeout: 260 seconds)
20:21:42*FromDiscord quit (Ping timeout: 260 seconds)
20:22:45*FromDiscord joined #nim
20:26:50*mwbrown joined #nim
20:28:15*fifth joined #nim
20:32:13*noeontheend joined #nim
20:32:19*narimiran quit (Ping timeout: 258 seconds)
20:47:26*fifth quit (Ping timeout: 240 seconds)
20:48:49*fifth joined #nim
20:49:54*fifth quit (Client Quit)
20:51:21*fifth joined #nim
20:51:30*noeontheend quit (Quit: noeontheend)
20:52:00*noeontheend joined #nim
20:54:20leorize[m]giaco: note that seq are always passed by reference
20:54:55leorize[m]copies happens only when you issue an explicit copy via `var s = passedSeq` or similar operations
20:55:02leorize[m]if you want mutability then `var` is your friend
20:59:38FromGitter<bung87> hey , any idea how to build a service other network machine can find without static specific ip port ?
20:59:48FromGitter<bung87> local network
21:03:06*thomasross joined #nim
21:12:15*Vladar quit (Quit: Leaving)
21:15:04*fifth quit (Quit: WeeChat 3.1)
21:20:13FromDiscord<jtiai> By sending and listening to broadcast messages.
21:20:48*fifth joined #nim
21:22:24FromDiscord<jtiai> UDP ones since TCP doesn't support broadcasts.
21:23:42giacoleorize[m]: this kinda confuse me. So a seq object acts like a value for assignments, but as a reference when used as argument
21:23:44FromDiscord<jtiai> Or another option is to have dedicated discovery service.
21:30:05leorize[m]giaco: think of a seq as a pair of pointers and length
21:30:33leorize[m]then unless you perform a copy, it's cheaper to just take these around
21:31:31giacoSure, but it is easier to user, but harder to grok
21:32:27*uvegbot quit (Remote host closed the connection)
21:32:53*uvegbot joined #nim
21:32:56leorize[m]you can just think of it like this: parameter passing has near zero overhead in nim
21:33:18leorize[m]you don't have to care too much about what actually happens unless it takes a toll in your performance
21:35:22*tane quit (Quit: Leaving)
21:42:06giacoSo even if I create huge non-ref object on the stack and pass it around as argument, it would end up as passed as immutable ref?
21:43:59*hendursaga quit (Quit: hendursaga)
21:53:56*hendursaga joined #nim
21:55:19*hsh joined #nim
21:57:24*hsh quit (Client Quit)
21:59:36leorize[m]giaco yep
21:59:44leorize[m]copies will only happen if necessary
22:00:34giacoThanks for the guideline. Thinking it as "the cheapest way" makes sense.
22:04:21ForumUpdaterBotNew thread by Abc: Compiler bug?: Infinite loop when compiling pegging CPU, see https://forum.nim-lang.org/t/8003
22:06:28FromGitter<bung87> @jtiai Thanks!
22:11:49FromDiscord<brainproxy> I have a `const myThings = @["foo", "bar"]` and I'd like to pass it to a macro which will loop over it to produce `nnkOfBranch`.↵↵However, in the macro `for thing in myThings: ...` doesn't seem to do anything, like the loop is just ignored
22:11:58FromDiscord<brainproxy> I'm a 100% n00b at Nim macros
22:23:39*azed joined #nim
22:30:11*natrys quit (Ping timeout: 240 seconds)
22:37:57FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3nl6
22:38:12FromDiscord<brainproxy> (edit) "https://play.nim-lang.org/#ix=3nl6" => "https://play.nim-lang.org/#ix=3nl7"
22:38:22FromDiscord<brainproxy> (edit) "https://play.nim-lang.org/#ix=3nl7" => "https://play.nim-lang.org/#ix=3nl8"
22:40:03FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3nl9
22:41:13FromDiscord<InventorMatt> sent a code paste, see https://play.nim-lang.org/#ix=3nla
22:42:36FromDiscord<reilly> Is pragmagic/godot-nim meaningfully better than GDScript? I prefer Nim as a language, but the seamlessness of GDScript is making it hard to justify using godot-nim when I can't even get a simple script to play nice.
22:43:11FromDiscord<reilly> By "meaningfully better," I mean is it faster, would it potentially have better debugging (I doubt it), etc.
22:43:22*natrys joined #nim
22:48:37FromDiscord<reilly> I would like to be able to use Nim libraries, but that's kind of a moot point if I can't even get it to work to begin with. Some better documentation would be nice.
22:50:17FromDiscord<geekrelief> In reply to @reilly "I would like to": I prefer nim to gdscript, but there tradeoffs to consider. What issue are you running into with godot-nim?
22:51:39FromDiscord<geekrelief> Also I have my own fork of godot-nim https://github.com/geekrelief/gdnim if you're having issues getting godot-nim setup.
22:53:47FromDiscord<juan_carlos> Nim is faster than GDScript, because uses GDNative, GDNative is designed to be faster than GDScript.
23:02:42*mwbrown quit (Quit: Exiting)
23:03:27FromDiscord<brainproxy> In reply to @InventorMatt "trying making it a": thanks, that didn't exactly, but led me down a promising path
23:03:48FromDiscord<brainproxy> is it possible at compile time to combine two `const` arrays of the same type?
23:04:31FromDiscord<brainproxy> say I have `const foo = ["a", "b"]` and `const bar = ["c", "d"]`, can I "concat" them somehow?
23:04:51FromDiscord<brainproxy> I'm googl'ing around, but haven't hit on a working suggestion yet
23:05:01FromDiscord<brainproxy> (edit) "exactly," => "exactly work out,"
23:05:26FromDiscord<InventorMatt> there isn't anything builtin that can do that. you would have to make a macro for it
23:05:35FromDiscord<brainproxy> oh god
23:05:41FromDiscord<brainproxy> lol
23:05:55FromDiscord<brainproxy> it's a macro rabbit hole 😄
23:06:16FromDiscord<brainproxy> (edit) "oh god" => "omg"
23:06:53*giaco quit (Quit: WeeChat 2.8)
23:08:15FromDiscord<InventorMatt> once you understand the basis of macros they can become as simple as writing procs sometimes
23:08:31FromDiscord<ElegantBeef> Yea, personally i find the confusing thing just the AST
23:10:49*azed quit (Quit: WeeChat 3.1)
23:12:08FromDiscord<reilly> In reply to @geekrelief "I prefer nim to": I'll give this a try shortly, this looks like it may be much more usable. The issue with `{.pure.}` you mention in the prerequisites is from December 2020 and isn't marked as resolved, and Nim 1.4.6 was released last April. Do I need to downgrade, or is the latest stable version okay?
23:14:06FromDiscord<geekrelief> In reply to @reilly "I'll give this a": I tried with devel the other day `{.pure.}` isn't fixed, but it's no longer an issue.
23:14:24FromDiscord<geekrelief> I haven't tried stable.
23:14:37FromDiscord<geekrelief> I'm running on a specific that I mention in the issue.
23:15:18FromDiscord<geekrelief> Devel builds slower than `3b963a81`
23:17:49FromDiscord<geekrelief> Stable should work, but if it doesn't I have a workaround.
23:18:28*mwbrown joined #nim
23:19:19*mwbrown quit (Client Quit)
23:20:00FromDiscord<geekrelief> btw, if tcc works on your platform. I'd recommend it for development. It compiles way faster than gcc.
23:34:18*natrys quit (Quit: natrys)
23:39:42FromDiscord<InventorMatt> In reply to @brainproxy "say I have `const": https://play.nim-lang.org/#ix=3nln something like this should work for that
23:40:56FromDiscord<brainproxy> In reply to @InventorMatt "https://play.nim-lang.org/#ix=3nln something like t": thanks! will give it a shot
23:46:29FromDiscord<reilly> In reply to @geekrelief "btw, if tcc works": Still haven't had a chance to test anything, but I will soon. Regarding TCC, do you think being limited to x86 would have any real drawbacks? Since TCC is so much faster, being able to use it everywhere might be nice, but not if I'd be missing out on anything.
23:47:22FromDiscord<geekrelief> I plan on using tcc for dev and gcc / vcc for release builds.
23:47:43FromDiscord<geekrelief> tcc isn't as well supported as gcc/vcc but so far so good
23:54:18FromDiscord<geekrelief> Once IC lands, I can ditch tcc for gcc or vcc.