00:00:48 | FromDiscord | <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:09 | FromDiscord | <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:30 | FromDiscord | <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:23 | FromDiscord | <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:13 | kayabaNerve | ... 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:11 | Prestige | Anyone 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:26 | FromDiscord | <ElegantBeef> I suggest using gd-nim, but i can checkout the stub if you want |
01:33:34 | Prestige | gd-nim? I'm not seeing it on nimble or github |
01:35:50 | * | arkurious quit (Quit: Leaving) |
01:37:50 | FromDiscord | <ElegantBeef> ah sorry just gdnim https://github.com/geekrelief/gdnim |
01:38:08 | Prestige | ah |
01:38:10 | FromDiscord | <ElegantBeef> Geekrelief did some work and made it less annoying, but it also supports other things like HCR |
01:38:15 | FromDiscord | <Rika> smh beef |
01:38:19 | Prestige | hell yeah |
01:38:29 | FromDiscord | <Rika> dont u remember the exact name of at least 200 nim packages |
01:38:30 | FromDiscord | <Rika> smh |
01:38:43 | Prestige | ^ newb |
01:38:55 | Prestige | Thought you were our AI package manager |
01:38:58 | FromDiscord | <ElegantBeef> Yea i'm leaving nim now, going to an even more obscure package |
01:39:02 | FromDiscord | <ElegantBeef> (edit) "package" => "language" |
01:39:56 | Prestige | "WARNING gdnim is not battle tested / production ready. Use godot-nim if you need something stable." |
01:40:03 | Prestige | I can't even get godot-nim to work lel |
01:40:34 | FromDiscord | <Rika> beef about to move to beef |
01:41:04 | FromDiscord | <ElegantBeef> Well give me a minute and i'll test it for you |
01:42:46 | * | Tlangir joined #nim |
01:45:17 | FromDiscord | <ElegantBeef> worked fine on 1.4.6 and 3.2, now to get 3.3 |
01:45:29 | Prestige | :o |
01:50:22 | FromDiscord | <ElegantBeef> Seems worked with 3.3 aswell |
01:50:35 | Prestige | hm what steps are you taking? |
01:50:58 | FromDiscord | <ElegantBeef> Cloning repo, setting the godot path var, and then nake build |
01:51:12 | Prestige | Where is that exporting for you? |
01:51:18 | Prestige | like, the build |
01:52:44 | FromDiscord | <ElegantBeef> I'm just hitting the play button |
01:53:06 | Prestige | oh, I see |
01:53:14 | Prestige | I thought this was supposed to be building the whole project |
01:53:14 | FromDiscord | <ElegantBeef> Should i try a build? |
01:53:27 | FromDiscord | <ElegantBeef> nake build will build the files hooked up in a file |
01:53:49 | FromDiscord | <ElegantBeef> gdnim is better in this regard as it has a CLI for generating new files and it auto subscribes |
01:55:31 | Prestige | Sick, so this is working. Thanks |
02:53:53 | * | thomasross quit (Ping timeout: 240 seconds) |
02:55:12 | FromDiscord | <garett> In reply to @ElegantBeef "Yea i'm leaving nim": I hope you're joking, but if not, which language? |
02:56:39 | FromDiscord | <ElegantBeef> I'm joking |
02:57:03 | FromDiscord | <ElegantBeef> I've drank too much koolaid to leave |
02:57:35 | FromDiscord | <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:50 | FromDiscord | <garett> I only declared the bare minimum API that I needed. |
02:58:20 | FromDiscord | <garett> I love being able to declare `{.importc.}` procs locally |
02:58:49 | FromDiscord | <garett> Though you can also do that in C in some cases |
03:01:50 | FromDiscord | <ElegantBeef> Something something IC soon tm |
03:03:33 | FromDiscord | <garett> Beef, what are you writing in Nim? |
03:04:20 | FromDiscord | <ElegantBeef> Presently? Working on a heterogeneous sequence library |
03:06:07 | FromDiscord | <ElegantBeef> Shameless spam is shameless https://github.com/beef331/hseq |
03:10:58 | FromDiscord | <garett> Interesting. What use case inspired this? |
03:11:42 | FromDiscord | <ElegantBeef> Was an idea i had a while ago, just got motivated to do it 😄 |
03:11:48 | FromDiscord | <garett> Cool |
03:13:53 | FromDiscord | <garett> sent a code paste, see https://play.nim-lang.org/#ix=3nh1 |
03:13:58 | FromDiscord | <garett> into all the necessary stuff to make it easy |
03:14:34 | FromDiscord | <garett> And another macro to rewrite Nim into GLSL, but it was just a learning exercise |
03:15:44 | FromDiscord | <garett> Nim is really attractive to me for writing CPU and GPU code together |
03:16:32 | FromDiscord | <garett> I couldn't figure out how to get my `comapi` macro to accept `comapi IUnknown:...` |
03:17:12 | FromDiscord | <Rika> @ElegantBeef not a fan of the api |
03:17:28 | FromDiscord | <ElegantBeef> Which part? |
03:18:05 | FromDiscord | <Rika> `foreachMut` |
03:18:08 | FromDiscord | <Rika> eeh |
03:18:23 | FromDiscord | <Rika> are we making a new naming scheme or what |
03:18:36 | FromDiscord | <ElegantBeef> blame forloop macros not having a sym'd character |
03:18:51 | FromDiscord | <Rika> no, i mean dont we usually say `mforeach` |
03:19:57 | FromDiscord | <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:19 | FromDiscord | <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:14 | FromDiscord | <ElegantBeef> Yea it's not too difficult just look for `caseof` and when found replace that with the casestmt |
03:26:39 | FromDiscord | <Rika> are you not using pattern matching? |
03:26:46 | FromDiscord | <ElegantBeef> Nope |
03:26:48 | FromDiscord | <Rika> you can even remove "caseof" and make it a real regular case statement |
03:26:51 | FromDiscord | <Rika> why not? |
03:27:12 | FromDiscord | <ElegantBeef> It doesnt tickle my fancy |
03:27:35 | FromDiscord | <Rika> why |
03:27:38 | FromDiscord | <Rika> thats gross |
03:28:11 | FromDiscord | <Rika> at least rename it to something else |
03:28:14 | FromDiscord | <Rika> idk typeIs? |
03:28:17 | FromDiscord | <Rika> (edit) "typeIs?" => "`typeIs`?" |
03:28:56 | FromDiscord | <ElegantBeef> How would i make it a regular casestmt? |
03:29:41 | FromDiscord | <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:44 | FromDiscord | <Rika> youd just check the case'd variable if it matches a given ident |
03:30:00 | FromDiscord | <Rika> its a "real" case statement in the syntax |
03:30:07 | FromDiscord | <Rika> but you're transforming the whole thing |
03:30:35 | FromDiscord | <ElegantBeef> I dont quite follow |
03:30:50 | FromDiscord | <ElegantBeef> instead of `caseof` what would he programmer write? |
03:31:33 | FromDiscord | <ElegantBeef> (edit) "`caseof`" => "`caseof int`" |
03:32:14 | * | spiderstew joined #nim |
03:32:22 | FromDiscord | <garett> Beef, looking at `foreach` and `iterImpl` etc, inspiring 🙂 |
03:33:25 | FromDiscord | <Rika> In reply to @ElegantBeef "instead of `caseof int`": either `typeIs int` or `case typeof(x): of int:`; |
03:33:35 | FromDiscord | <Rika> unless you're using a typed macro |
03:33:39 | * | spiderstew_ quit (Ping timeout: 260 seconds) |
03:33:49 | FromDiscord | <Rika> in which case typeIs is the only feasible option i guess |
03:36:14 | FromDiscord | <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:19 | FromDiscord | <Rika> i just dont like the very similar name "caseof" |
03:37:30 | FromDiscord | <Rika> its not really relevant if its a type youre passing in |
03:37:55 | FromDiscord | <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:22 | FromDiscord | <Rika> ignore the backend details |
03:38:26 | FromDiscord | <Rika> think of it as a user |
03:38:41 | FromDiscord | <Rika> a user (prolly) doesnt know whatever the hell youre doing in the back |
03:38:45 | FromDiscord | <ElegantBeef> I am that's why i'm designing it to only think about the type |
03:38:55 | FromDiscord | <Rika> yet you use "caseof" |
03:39:11 | FromDiscord | <ElegantBeef> I see your point |
03:39:25 | FromDiscord | <Rika> okay |
03:43:32 | * | azed joined #nim |
04:35:28 | ForumUpdaterBot | New 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:51 | ForumUpdaterBot | New 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:01 | Clonkk[m] | Is there a ``rsync`` equivalent in ``std/os`` ? |
07:55:02 | Clonkk[m] | (or other library) |
08:00:27 | PMunch | I don't think so |
08:00:42 | PMunch | I 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:46 | Clonkk[m] | Yeah but that's not portable. |
08:30:02 | Clonkk[m] | and ``copyDir`` doesn't preserve symbolic link |
08:32:27 | Clonkk[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:11 | FromDiscord | <Ashwin> hey guys is there any way to download the docs ? |
10:39:17 | * | PMunch joined #nim |
10:42:56 | Clonkk[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:57 | FromDiscord | <Ashwin> ty! |
11:04:30 | ForumUpdaterBot | New 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:39 | Arrrrrrrr | chat.nim.net when |
12:15:55 | * | aeverr joined #nim |
12:37:14 | leorize[m] | Clonkk: nim-sys gotta wait til I get cps to a comfortable support level |
12:37:20 | leorize[m] | we are getting close though :p |
12:37:55 | Clonkk[m] | <leorize[m] "we are getting close though :p"> No hurry, I was remembering when you asked for suggestion in nim-sys 😀 |
12:38:09 | Clonkk[m] | > <@leorize:envs.net> we are getting close though :p |
12:38:09 | Clonkk[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:20 | Zoom[m] | Hey, are there any plans regarding freenode takeover? Official Matrix channel, perhaps? ;) |
12:51:52 | FromDiscord | <Rika> what happened? |
12:53:29 | FromDiscord | <Rika> ah https://news.ycombinator.com/item?id=27153338 |
12:53:50 | FromDiscord | <Rika> ah #2 |
12:53:53 | FromDiscord | <Rika> (comment in link) |
12:54:22 | * | ddevault left #nim ("See you on libera.chat") |
13:01:44 | Zoom[m] | @Rika: "A previous copy of this was a draft. This one isn't - its the real thing.": |
13:01:44 | Zoom[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:40 | leorize[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:48 | leorize[m] | the problem is that it's not fixed :p |
13:17:05 | CodeBitCookie[m] | Hello everyone |
13:17:06 | * | natrys joined #nim |
13:17:28 | CodeBitCookie[m] | I found a blog about what the best programming language |
13:17:32 | CodeBitCookie[m] | according to this guy its nim |
13:17:33 | CodeBitCookie[m] | https://ckkashyap.blogspot.com/2015/02/nim-is-best-programming-language.html |
13:17:37 | CodeBitCookie[m] | :D yay go nim |
13:18:01 | CodeBitCookie[m] | * I found a blog about what the best programming language is |
13:18:03 | PMunch | From 2015 even, Nim has gotten a lot better since then |
13:18:26 | PMunch | And damn, I would've never imagined Freenode going through a takeover.. |
13:19:49 | FromDiscord | <Rika> not a lot of us thought itd happen i believe |
13:25:09 | leorize[m] | I can move the current Nim spaces to matrix.org to gain federation support then we can bridge directly to discord |
13:25:34 | leorize[m] | but if we wanna speak to irc users we gotta bridge to an irc server too |
13:25:46 | FromDiscord | <Rika> bridge directly to discord? how |
13:26:10 | leorize[m] | look at #science |
13:26:20 | leorize[m] | it's bridged directly to matrix |
13:26:46 | FromDiscord | <Rika> what the fuckj |
13:26:56 | FromDiscord | <Rika> okay |
13:26:58 | FromDiscord | <Rika> interesting |
13:27:01 | Clonkk[m] | Which is why Nim science is much prettier when sharing formatted message than #Nim on Element 😀 |
13:27:22 | Clonkk[m] | * Which is why Nim science is much prettier when sharing formatted message than #Nim on Element 😀. Also editting message spams people |
13:27:28 | Clonkk[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:46 | FromDiscord | <Rika> editing messages on discord or matrix? |
13:28:01 | Clonkk[m] | Editting message on Matrix spam users on Discord |
13:28:13 | FromDiscord | <Rika> i believe it still does so on the direct bridge |
13:30:02 | Clonkk[m] | Possibly, but at least we'd get the formatting back |
13:30:27 | FromDiscord | <Rika> formatting? |
13:31:29 | Clonkk[m] | When people send snippet of code, it's kinda ugly |
13:32:53 | aeverr | ah i understand |
13:32:59 | aeverr | ah 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:03 | bfgcoding[m] | Hello Everyone |
14:07:03 | * | deepend left #nim ("WeeChat 2.8") |
14:07:43 | * | Arrrrrrrr quit (Remote host closed the connection) |
14:17:28 | bfgcoding[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:49 | FromDiscord | <willyboar> If you create your local project with nimble init you can nimble install inside your project |
14:20:15 | FromDiscord | <willyboar> Then you are able to use it in any of your projects |
14:20:33 | ForumUpdaterBot | New Nimble package! catnip - Assembler for runtime code generation, see https://github.com/RSDuck/catnip |
14:21:13 | bfgcoding[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:39 | FromDiscord | <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:29 | laincat | part |
16:09:31 | laincat | fuck |
16:09:33 | * | laincat left #nim (#nim) |
16:10:24 | * | noeontheend quit (Quit: noeontheend) |
16:11:07 | FromDiscord | <Rika> lol |
16:11:08 | * | noeontheend joined #nim |
16:11:36 | FromDiscord | <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:54 | FromDiscord | <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:20 | FromDiscord | <quarternion> Do I have to create a new null-terminated string with `strncpy`, so that nim string can accept it? |
16:39:39 | FromDiscord | <Rika> i cant help now, its late for me |
16:39:50 | FromDiscord | <Rika> just hope someone else is active to see you |
16:40:07 | leorize[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:31 | leorize[m] | so `addr buf[0]` will get you the beginning of the buffer which you can write into |
16:41:49 | leorize[m] | `setLen()` can be used to set the buffer size before you use it |
16:42:11 | leorize[m] | you can also use it to set the correct size after you are done with writing to it |
17:11:41 | ForumUpdaterBot | New thread by Pietroppeter: IRC freenode staff exodus, see https://forum.nim-lang.org/t/8002 |
17:26:19 | FromDiscord | <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:01 | termer | lol kodkuce |
17:41:46 | * | noeontheend quit (Ping timeout: 252 seconds) |
18:02:57 | FromDiscord | <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:11 | FromDiscord | <haxscramper> `instantiationInfo(fullPaths = true)` |
18:15:33 | FromDiscord | <haxscramper> (edit) "true)`" => "true).filename.cstirng`" |
18:15:41 | FromDiscord | <haxscramper> Or without `fullPaths` |
18:17:51 | FromDiscord | <exelotl> ahh thanks |
18:22:31 | * | fantis joined #nim |
18:27:21 | FromDiscord | <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:03 | FromDiscord | <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:13 | FromDiscord | <jtiai> I've been writing python code for over 12 years and it's been hard to forget certain habits... |
18:34:35 | FromDiscord | <jtiai> But I managed to write very little OS in Nim and now I'm good speed to write an emulator. |
18:34:48 | termer | Does 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:04 | termer | or will I just have to write a function per-enum? |
18:36:41 | FromDiscord | <jtiai> Shouldn't template be able to do it? |
18:37:13 | termer | I'm not sure, I'm pretty new to Nim lol |
18:38:39 | FromDiscord | <haxscramper> `YourEnum(<yourInt>)` |
18:39:19 | FromDiscord | <haxscramper> `type E = enum A, B; echo E(1)` |
18:39:41 | termer | oh, thanks |
18:39:44 | termer | that'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:28 | giaco | If 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:31 | FromDiscord | <haxscramper> no |
19:21:48 | FromDiscord | <haxscramper> if object is larger than certain size it is passed by reference |
19:21:51 | FromDiscord | <Recruit_main707> it will receive the size, the length, and a pointer |
19:21:56 | FromDiscord | <Recruit_main707> iirc |
19:23:45 | giaco | How can I have control on this? |
19:24:09 | FromDiscord | <Recruit_main707> on what |
19:24:55 | FromDiscord | <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:38 | giaco | So bycopy and byref pragmas and "var" keyword in proc signatures is how you turn off autopilot while retaining safety measures, correct? |
19:31:06 | giaco | And what's the equivalent of "var" to force that parameter to be passed by value but just for that function |
19:32:48 | FromDiscord | <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:19 | FromDiscord | <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:07 | FromDiscord | <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:20 | leorize[m] | giaco: note that seq are always passed by reference |
20:54:55 | leorize[m] | copies happens only when you issue an explicit copy via `var s = passedSeq` or similar operations |
20:55:02 | leorize[m] | if you want mutability then `var` is your friend |
20:59:38 | FromGitter | <bung87> hey , any idea how to build a service other network machine can find without static specific ip port ? |
20:59:48 | FromGitter | <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:13 | FromDiscord | <jtiai> By sending and listening to broadcast messages. |
21:20:48 | * | fifth joined #nim |
21:22:24 | FromDiscord | <jtiai> UDP ones since TCP doesn't support broadcasts. |
21:23:42 | giaco | leorize[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:44 | FromDiscord | <jtiai> Or another option is to have dedicated discovery service. |
21:30:05 | leorize[m] | giaco: think of a seq as a pair of pointers and length |
21:30:33 | leorize[m] | then unless you perform a copy, it's cheaper to just take these around |
21:31:31 | giaco | Sure, 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:56 | leorize[m] | you can just think of it like this: parameter passing has near zero overhead in nim |
21:33:18 | leorize[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:06 | giaco | So 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:36 | leorize[m] | giaco yep |
21:59:44 | leorize[m] | copies will only happen if necessary |
22:00:34 | giaco | Thanks for the guideline. Thinking it as "the cheapest way" makes sense. |
22:04:21 | ForumUpdaterBot | New thread by Abc: Compiler bug?: Infinite loop when compiling pegging CPU, see https://forum.nim-lang.org/t/8003 |
22:06:28 | FromGitter | <bung87> @jtiai Thanks! |
22:11:49 | FromDiscord | <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:58 | FromDiscord | <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:57 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3nl6 |
22:38:12 | FromDiscord | <brainproxy> (edit) "https://play.nim-lang.org/#ix=3nl6" => "https://play.nim-lang.org/#ix=3nl7" |
22:38:22 | FromDiscord | <brainproxy> (edit) "https://play.nim-lang.org/#ix=3nl7" => "https://play.nim-lang.org/#ix=3nl8" |
22:40:03 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3nl9 |
22:41:13 | FromDiscord | <InventorMatt> sent a code paste, see https://play.nim-lang.org/#ix=3nla |
22:42:36 | FromDiscord | <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:11 | FromDiscord | <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:37 | FromDiscord | <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:17 | FromDiscord | <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:39 | FromDiscord | <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:47 | FromDiscord | <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:27 | FromDiscord | <brainproxy> In reply to @InventorMatt "trying making it a": thanks, that didn't exactly, but led me down a promising path |
23:03:48 | FromDiscord | <brainproxy> is it possible at compile time to combine two `const` arrays of the same type? |
23:04:31 | FromDiscord | <brainproxy> say I have `const foo = ["a", "b"]` and `const bar = ["c", "d"]`, can I "concat" them somehow? |
23:04:51 | FromDiscord | <brainproxy> I'm googl'ing around, but haven't hit on a working suggestion yet |
23:05:01 | FromDiscord | <brainproxy> (edit) "exactly," => "exactly work out," |
23:05:26 | FromDiscord | <InventorMatt> there isn't anything builtin that can do that. you would have to make a macro for it |
23:05:35 | FromDiscord | <brainproxy> oh god |
23:05:41 | FromDiscord | <brainproxy> lol |
23:05:55 | FromDiscord | <brainproxy> it's a macro rabbit hole 😄 |
23:06:16 | FromDiscord | <brainproxy> (edit) "oh god" => "omg" |
23:06:53 | * | giaco quit (Quit: WeeChat 2.8) |
23:08:15 | FromDiscord | <InventorMatt> once you understand the basis of macros they can become as simple as writing procs sometimes |
23:08:31 | FromDiscord | <ElegantBeef> Yea, personally i find the confusing thing just the AST |
23:10:49 | * | azed quit (Quit: WeeChat 3.1) |
23:12:08 | FromDiscord | <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:06 | FromDiscord | <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:24 | FromDiscord | <geekrelief> I haven't tried stable. |
23:14:37 | FromDiscord | <geekrelief> I'm running on a specific that I mention in the issue. |
23:15:18 | FromDiscord | <geekrelief> Devel builds slower than `3b963a81` |
23:17:49 | FromDiscord | <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:00 | FromDiscord | <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:42 | FromDiscord | <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:56 | FromDiscord | <brainproxy> In reply to @InventorMatt "https://play.nim-lang.org/#ix=3nln something like t": thanks! will give it a shot |
23:46:29 | FromDiscord | <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:22 | FromDiscord | <geekrelief> I plan on using tcc for dev and gcc / vcc for release builds. |
23:47:43 | FromDiscord | <geekrelief> tcc isn't as well supported as gcc/vcc but so far so good |
23:54:18 | FromDiscord | <geekrelief> Once IC lands, I can ditch tcc for gcc or vcc. |