00:08:41 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=4c8C |
00:09:21 | FromDiscord | <Elegantbeef> `copyMem(data, unsafeAddr str[0], str.len + 1)` |
00:09:28 | FromDiscord | <Elegantbeef> removes line 4 |
00:09:45 | FromDiscord | <Elegantbeef> Personally i'd do `create(char, str.len + 1)` instead of `alloc` |
00:09:50 | FromDiscord | <Elegantbeef> that gives you a `ptr char` directly |
00:10:11 | FromDiscord | <sealmove> ohh thanks :3 i've been stuck with this bug for quite some time, let's see. i saw `create` somewhere but didn't realize it's an stdlib proc |
00:12:21 | * | attah quit (Ping timeout: 260 seconds) |
00:12:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4c8E |
00:14:59 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=4c8F |
00:15:15 | FromDiscord | <Elegantbeef> cstring(createU(char, str.len + 1))\` |
00:15:53 | FromDiscord | <Elegantbeef> That error is quite odd though iven `ptr char` is what a cstring is on C/C++ |
00:17:51 | FromDiscord | <Patitotective> there should be a natural32 🧐 |
00:18:16 | FromDiscord | <Elegantbeef> Make it? |
00:18:40 | FromDiscord | <Patitotective> done |
00:25:38 | FromDiscord | <!&luke> Can I compile nim to risc-v |
00:27:01 | * | attah joined #nim |
00:33:06 | FromDiscord | <auxym> probably. nim already has `--cpu:riscv32` and `riscv64` options. you might need to specify your compiler path (riscv-gcc?) and pass additional flags to gcc for your specific chip. |
00:33:23 | FromDiscord | <auxym> see the cross-compiling section in the manual |
00:35:17 | FromDiscord | <Patitotective> In reply to @auxym "probably. nim already has": dont think it does |
00:44:17 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4c8L |
00:47:42 | FromDiscord | <Patitotective> you were right lol |
01:29:20 | FromDiscord | <martinium> for async code is it better to use pattern matching with case vs if statements. I am assuming conditions on if statements are still evaluated serially? |
01:29:26 | FromDiscord | <martinium> (edit) "serially?" => "in order?" |
01:29:46 | FromDiscord | <Elegantbeef> Regardless it's always best to use `case` |
01:30:04 | FromDiscord | <Elegantbeef> Of course minus `bool` |
01:30:45 | FromDiscord | <martinium> Gotcha |
01:31:42 | FromDiscord | <Rika> In reply to @Elegantbeef "*Of course minus `bool`*": Why not xd |
01:32:02 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4c8R |
01:32:11 | FromDiscord | <Elegantbeef> I mean yes you can |
01:32:22 | FromDiscord | <Elegantbeef> Rika you know why not |
01:32:35 | FromDiscord | <Elegantbeef> If you're using case on a bool you're just making the code harder to read |
01:33:27 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4c8S |
01:34:38 | FromDiscord | <Patitotective> Ugh |
01:34:39 | FromDiscord | <SaAnd> please do not do this for the full `int` range, you're gonna run out of memory↵(@Patitotective) |
01:35:01 | FromDiscord | <Elegantbeef> Minor details |
01:43:46 | * | wallabra quit (Ping timeout: 268 seconds) |
01:46:28 | * | wallabra joined #nim |
01:46:30 | FromDiscord | <martinium> how would I check for multiple conditions in a branch |
01:46:41 | FromDiscord | <martinium> example looking for two substrings |
01:46:55 | FromDiscord | <martinium> of ""auth and "200" |
01:47:00 | FromDiscord | <martinium> can't use the and |
01:47:07 | FromDiscord | <martinium> (edit) """auth" => ""auth"" |
01:47:26 | FromDiscord | <martinium> (edit) "can't use the and ... " added "operator" |
01:51:31 | FromDiscord | <Rika> In reply to @Elegantbeef "Rika you know why": xd |
01:51:59 | FromDiscord | <Rika> In reply to @martinium "how would I check": Not in a case |
01:52:26 | FromDiscord | <martinium> only 1 item per of branch |
01:52:41 | FromDiscord | <Rika> Well maybe you can hack something together with tuples but I’m not sure |
01:52:43 | FromDiscord | <martinium> what about the case itself can it take a conditional expression? |
01:53:01 | FromDiscord | <martinium> case "200" in line:↵of "yadda" |
01:53:05 | FromDiscord | <Rika> In reply to @martinium "what about the case": Then you’ll be matching against Booleans and you saw what happened when I jokingly asked |
01:53:09 | FromDiscord | <martinium> gotcha |
01:56:35 | FromDiscord | <martinium> I would need to nest it inside an if statement before the cases |
01:56:45 | FromDiscord | <martinium> probably would accomplish the "filtering" |
02:42:18 | * | droidrage joined #nim |
02:59:11 | * | wallabra quit (Remote host closed the connection) |
02:59:26 | * | wallabra joined #nim |
03:06:46 | * | derpydoo quit (Ping timeout: 260 seconds) |
03:30:50 | FromDiscord | <martinium> sent a code paste, see https://play.nim-lang.org/#ix=4c96 |
03:31:08 | FromDiscord | <martinium> getting Error: await expects Future[T], got void |
03:31:38 | FromDiscord | <martinium> when I remove the await from f.close() line I get compiler code 139 |
03:43:11 | FromDiscord | <Rika> I’m not aware of open async |
03:43:18 | FromDiscord | <Rika> Is this part of a third party library? |
03:43:25 | FromDiscord | <Rika> Maybe I forgot about it |
03:43:37 | FromDiscord | <Rika> I believe you don’t need to await close |
03:43:55 | FromDiscord | <Rika> Do you mind giving more info about the error without the await on close |
03:51:35 | FromDiscord | <Elegantbeef> Hmph bridge dieded |
03:52:14 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/asyncfile.html |
03:52:14 | FromDiscord | <Elegantbeef> `close` is not async |
03:52:27 | * | LuxuryMode joined #nim |
03:52:45 | FromDiscord | <martinium> I see a close() that takes an AsyncFile |
03:52:55 | FromDiscord | <martinium> error without the await is ... Execution failed with exit code 139 |
03:52:56 | FromDiscord | <Elegantbeef> It isnt an async procedure |
03:53:02 | FromDiscord | <Elegantbeef> It doesnt return `Future[void]` |
03:53:04 | LuxuryMode | Anyone happen to know if there's an AWS library for Nim besides this one? https://github.com/aidansteele/aws_sdk.nim This project seems to be abandonware at this point. |
03:53:09 | * | vicecea quit (Remote host closed the connection) |
03:53:11 | FromDiscord | <martinium> understood |
03:53:26 | FromDiscord | <martinium> sent a code paste, see https://play.nim-lang.org/#ix=4c98 |
03:53:38 | * | vicecea joined #nim |
03:53:41 | FromDiscord | <Elegantbeef> No stack trace? |
03:54:21 | FromDiscord | <Elegantbeef> How are you running the program? |
03:54:57 | LuxuryMode | Oh, there is this: https://github.com/disruptek/atoz |
03:55:09 | FromDiscord | <martinium> on terminal |
03:55:18 | FromDiscord | <martinium> this is full code: https://gist.github.com/martinium/cf44daa3a5b647ca6be0dd509b56a2d8 |
03:57:15 | FromDiscord | <Elegantbeef> Ugh code |
03:58:07 | FromDiscord | <Elegantbeef> Nice a compiler bug |
03:58:22 | FromDiscord | <martinium> yeah, its bad. Was simple program I made and did the job but want to see if I can make it async to keep learning Nim. |
03:58:41 | FromDiscord | <Elegantbeef> Enum indexed arrays are your friends |
04:01:27 | FromDiscord | <martinium> compiler bug exists with 1.6.8 and devel |
04:01:38 | FromDiscord | <Elegantbeef> `await f.readLine()` is the culprit |
04:02:25 | FromDiscord | <huantian> Huh that shouldn’t make the compiler crash tho lmao |
04:02:52 | FromDiscord | <Elegantbeef> Of course it shouldnt |
04:02:55 | FromDiscord | <Elegantbeef> I'm trying to minimise the code huan! |
04:03:09 | FromDiscord | <huantian> :p |
04:03:33 | FromDiscord | <martinium> I assume that happens during the readAll() proc is called |
04:03:42 | FromDiscord | <martinium> (edit) "I assume that happens during ... the" added "when" |
04:05:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4c9b |
04:05:54 | FromDiscord | <huantian> I mean that looks right? |
04:06:18 | FromDiscord | <Elegantbeef> The oddity is that it's not much different to that which doesnt |
04:07:21 | FromDiscord | <Elegantbeef> It's `walkDirRec` that's causing it i think |
04:07:58 | FromDiscord | <Elegantbeef> Does not |
04:08:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/yWK |
04:08:43 | FromDiscord | <wiga> i tried to use execCmdEx but when i try to get the output of a command it just drops this weird stuff https://media.discordapp.net/attachments/371759389889003532/1026345023941398538/unknown.png |
04:08:54 | FromDiscord | <huantian> that looks right |
04:09:03 | FromDiscord | <huantian> the weird stuff is probably ascii color codes or something |
04:09:12 | FromDiscord | <wiga> yes but how do i get rid of that |
04:09:21 | FromDiscord | <wiga> and like |
04:09:37 | FromDiscord | <wiga> the output is suppose to be only one command |
04:09:44 | FromDiscord | <wiga> not all my pc properties |
04:09:45 | FromDiscord | <Elegantbeef> Tell the program you dont want colouring |
04:10:05 | FromDiscord | <wiga> it looks like my neofetch on my terminal tho |
04:10:27 | FromDiscord | <wiga> it is |
04:10:28 | FromDiscord | <wiga> bruh |
04:10:36 | FromDiscord | <wiga> is there any alternative? |
04:11:04 | FromDiscord | <huantian> `neofetch --stdout` |
04:11:26 | FromDiscord | <wiga> to this i mean https://media.discordapp.net/attachments/371759389889003532/1026345706816020530/unknown.png |
04:11:29 | FromDiscord | <Elegantbeef> Martinium you can use `walkpattern` i believe instead, though make an issue please |
04:11:44 | FromDiscord | <martinium> I am using walkDir as I just want to point to a folder with a bunch of logs and have it iterate through the files and read/filter and write to new files from each one. |
04:11:59 | FromDiscord | <martinium> is there another way to open files in a directory one by one? |
04:12:22 | FromDiscord | <martinium> (edit) "one?" => "one without having to specify exact filenames?" |
04:18:15 | FromDiscord | <Elegantbeef> Seems something with walkDirRec causes the compiler to endlessly recurse attempting to transform something |
04:19:43 | FromDiscord | <martinium> yeah too much headache for minimal gain |
04:19:54 | FromDiscord | <martinium> I'll just keep using sync version I made for this 🤷♂️ |
04:20:16 | FromDiscord | <Elegantbeef> So dont worry about an issue i'll make it |
04:22:07 | FromDiscord | <wiga> In reply to @wiga "to this i mean": i cant find a way to just make this working and not spitting out randomness |
04:22:57 | FromDiscord | <Elegantbeef> It's not randomness you're calling a program that emits ANSI terminal code but your terminal doesnt support it |
04:23:46 | FromDiscord | <wiga> its literally my neofetch |
04:23:55 | FromDiscord | <huantian> In reply to @huantian "`neofetch --stdout`": |
04:23:59 | FromDiscord | <Elegantbeef> And that's ansi codes |
04:24:09 | FromDiscord | <wiga> yes but i just want to command output |
04:24:14 | FromDiscord | <wiga> not the whole terminal |
04:24:23 | FromDiscord | <huantian> that is the command output of neofetch |
04:24:31 | FromDiscord | <wiga> i dont want neofetch BRUH |
04:24:43 | FromDiscord | <huantian> what do you want |
04:24:56 | FromDiscord | <wiga> In reply to @wiga "to this i mean": . |
04:25:09 | FromDiscord | <wiga> i just want to run basic pwsh commands |
04:25:18 | FromDiscord | <Elegantbeef> Then do it? |
04:25:23 | FromDiscord | <wiga> 💀 |
04:25:51 | FromDiscord | <huantian> I think this is a powershell question and not a nim question so I don't know if people here can answer |
04:25:58 | FromDiscord | <wiga> bro |
04:26:01 | FromDiscord | <wiga> i want to run |
04:26:04 | FromDiscord | <wiga> pwsh commands |
04:26:07 | FromDiscord | <wiga> through nim |
04:26:13 | FromDiscord | <wiga> isnt it a simple question? |
04:26:27 | FromDiscord | <huantian> yes and like half of this server uses linux and has no idea how powershell works |
04:26:34 | FromDiscord | <wiga> ok then |
04:26:44 | FromDiscord | <wiga> how to a run bash commands and get the output |
04:26:47 | FromDiscord | <wiga> through nim |
04:26:51 | FromDiscord | <huantian> I mean I won't speak for the server but at least I don't have any idea how powershell works |
04:27:01 | FromDiscord | <wiga> its a command line.... |
04:27:16 | FromDiscord | <Elegantbeef> `man bash` indicates `bash "command"` is all you need to do |
04:27:37 | FromDiscord | <wiga> through nim |
04:27:49 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4c9d |
04:27:51 | FromDiscord | <Elegantbeef> That's not through bash though |
04:28:00 | FromDiscord | <Elegantbeef> That's through your default shell |
04:28:01 | FromDiscord | <wiga> sent a code paste, see https://play.nim-lang.org/#ix=4c9e |
04:28:09 | FromDiscord | <wiga> but i get more than what its suppose to output |
04:28:12 | FromDiscord | <huantian> oh sorry then ig it's `"bash ls"` |
04:28:15 | FromDiscord | <wiga> i get my whole command line |
04:29:06 | FromDiscord | <huantian> did you try `powershell -command "some stuff here"` |
04:29:27 | FromDiscord | <huantian> In reply to @wiga "i get my whole": yeah that's because that's what `powershell` is outputting |
04:29:32 | FromDiscord | <huantian> it's outputting your shell |
04:29:41 | FromDiscord | <huantian> (edit) "shell" => "shell/your whole command line" |
04:30:11 | FromDiscord | <wiga> ok look at this https://media.discordapp.net/attachments/371759389889003532/1026350424548188190/unknown.png |
04:30:24 | FromDiscord | <wiga> what do you think it will output? |
04:31:04 | FromDiscord | <Elegantbeef> Oh huan it's `bash -c ls` |
04:31:08 | FromDiscord | <wiga> In reply to @huantian "it's outputting your shell/your": cool but how tf do i get rid of that |
04:31:16 | FromDiscord | <huantian> In reply to @Elegantbeef "Oh huan it's `bash": ah yeah sorry |
04:31:21 | FromDiscord | <huantian> In reply to @huantian "did you try `powershell": |
04:31:31 | FromDiscord | <Elegantbeef> Living on pedantry over here |
04:31:54 | FromDiscord | <huantian> In reply to @wiga "what do you think": the output of powershell |
04:31:55 | FromDiscord | <huantian> which is a shell |
04:32:13 | FromDiscord | <wiga> In reply to @huantian "** **": totally working https://media.discordapp.net/attachments/371759389889003532/1026350939340292176/unknown.png |
04:32:19 | FromDiscord | <wiga> i dont want my neofetch |
04:32:54 | FromDiscord | <huantian> ok do this |
04:32:57 | FromDiscord | <huantian> go to `cmd` |
04:33:06 | FromDiscord | <huantian> run `powershell.exe echo hello` |
04:33:08 | FromDiscord | <huantian> what does it show |
04:33:10 | FromDiscord | <Rika> Aren’t you the one running neofetch though |
04:33:29 | FromDiscord | <wiga> In reply to @huantian "what does it show": neofetch & output |
04:33:33 | FromDiscord | <huantian> exactly |
04:33:43 | FromDiscord | <huantian> so you have to tell powershell somehow not to show the neofetch |
04:33:53 | FromDiscord | <huantian> I personally don't know how to do that since I don't know powershell |
04:33:55 | FromDiscord | <wiga> but i still want to use neofetch 💀 |
04:34:17 | FromDiscord | <Rika> We can’t help you with your power shell config… |
04:34:22 | FromDiscord | <wiga> my main question was: what proc do i use for this to not happen |
04:34:29 | FromDiscord | <wiga> In reply to @Rika "We can’t help you": idc |
04:34:33 | FromDiscord | <wiga> thats not my question |
04:34:53 | FromDiscord | <Rika> That is your question, your power shell config seems to run neofetch on startup right? |
04:35:00 | FromDiscord | <wiga> yes |
04:35:05 | FromDiscord | <Rika> Then that is the issue |
04:35:37 | FromDiscord | <Rika> You run power shell and it shows neofetch on startup, how do you make it not do that when you run it in Nim is not something we can help with |
04:36:22 | FromDiscord | <Rika> There should prolly be some flag you can pass to suppress config but I don’t know |
04:36:37 | FromDiscord | <wiga> its so retarded |
04:37:16 | FromDiscord | <huantian> Nim will only output what powershell outputs↵If poweshell outputs your neofetch then Nim will too |
04:37:28 | FromDiscord | <wiga> mh |
04:40:37 | FromDiscord | <Rainbow Asteroids> In reply to @wiga "totally working": https://tenor.com/view/fire-kill-fuego-matar-incendiar-gif-5307315 |
04:40:45 | FromDiscord | <Rainbow Asteroids> oh, ok |
04:40:53 | FromDiscord | <Rainbow Asteroids> https://tenor.com/view/fire-kill-fuego-matar-incendiar-gif-5307315 |
04:40:59 | FromDiscord | <Rainbow Asteroids> https://tenor.com/view/stranger-things-fire-flame-gif-14920648 |
04:41:04 | FromDiscord | <Rainbow Asteroids> uh oh |
04:41:12 | FromDiscord | <Rainbow Asteroids> embed machine no work |
04:57:28 | FromDiscord | <wiga> 💀 |
05:13:43 | FromDiscord | <Rika> In reply to @Rainbow Asteroids "embed machine no work": Embeds here are disabled |
05:13:48 | FromDiscord | <Rika> Don’t ask me why I have no damn clue |
06:52:10 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
06:57:29 | * | rockcavera quit (Remote host closed the connection) |
06:57:50 | * | rockcavera joined #nim |
06:57:51 | * | rockcavera quit (Changing host) |
06:57:51 | * | rockcavera joined #nim |
07:00:09 | * | genpaku quit (Read error: Connection reset by peer) |
07:00:50 | * | genpaku joined #nim |
07:12:19 | * | rockcavera quit (Remote host closed the connection) |
08:38:35 | FromDiscord | <albassort> i need a fast way to put something in every other character in an array |
08:38:37 | FromDiscord | <albassort> hm |
08:38:41 | FromDiscord | <albassort> i guess we shall use collect |
08:45:58 | NimEventer | New thread by drkameleon: Copies, seqs, assignments & templates, see https://forum.nim-lang.org/t/9505 |
09:18:02 | FromDiscord | <Horizon [She/Her]> Wonder if Nim can be compiled with clang to WASM |
09:18:08 | FromDiscord | <Horizon [She/Her]> Clang can be compiled to wasm |
09:18:17 | FromDiscord | <Horizon [She/Her]> If Nim can be compiled, and clang can be compiled |
09:18:39 | FromDiscord | <Elegantbeef> You likely can, but nlvm or emcc is easier in my experience |
09:18:40 | FromDiscord | <Horizon [She/Her]> Imagine a code editor online relying on your browser for Nim dev |
09:18:55 | FromDiscord | <Elegantbeef> Oh the compiler, probably not to browser wasm |
09:19:00 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "You likely can, but": I'm in the mood for something stupid since I'm in college and can't install stuff |
09:19:03 | FromDiscord | <Elegantbeef> you'd need WASI support |
09:19:06 | FromDiscord | <Horizon [She/Her]> Ah |
09:19:19 | FromDiscord | <Horizon [She/Her]> Clang has been compiled to work in the web which is funny ngl |
09:19:53 | FromDiscord | <Horizon [She/Her]> Imagine the cursedness |
09:20:11 | FromDiscord | <Elegantbeef> I only like to put effort in things that are not cursed |
09:21:22 | FromDiscord | <Horizon [She/Her]> I like having a mixed bag of options |
09:34:57 | FromDiscord | <Esther> Sometimes the cursed option is the fun option |
09:49:19 | * | dnh joined #nim |
09:58:39 | * | jmdaemon quit (Ping timeout: 250 seconds) |
10:00:25 | FromDiscord | <Horizon [She/Her]> exactly lmao |
11:24:23 | FromDiscord | <ieltan> wasm is interesting just because you can avoid writing javascript |
11:41:29 | FromDiscord | <Horizon [She/Her]> It's nice but also there's limitations, like needing JS glue for example with some things like the dom |
11:41:41 | FromDiscord | <Horizon [She/Her]> Plus, Nim on it's own can do JS interop which is nice |
11:42:53 | * | gsalazar joined #nim |
12:23:07 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:36:59 | * | xet7 joined #nim |
12:39:31 | FromDiscord | <Phil> Is there an echo-like statement one could use even in a func? |
12:39:52 | FromDiscord | <Yardanico> In reply to @Isofruit "Is there an echo-like": `debugEcho` |
12:39:59 | FromDiscord | <Yardanico> specifically made for this purpose :) |
12:40:06 | FromDiscord | <Phil> Perfect! |
12:40:09 | FromDiscord | <Yardanico> https://nim-lang.org/docs/system.html#debugEcho%2Cvarargs%5Btyped%2C%5D |
12:40:20 | * | dnh joined #nim |
12:41:32 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/DUC |
12:49:00 | FromDiscord | <ShalokShalom> In reply to @Elegantbeef "You likely can, but": Emcc? |
12:50:51 | FromDiscord | <ShalokShalom> Ah, Emscripten you mean |
12:53:54 | * | derpydoo joined #nim |
12:58:14 | FromDiscord | <ShalokShalom> Is there now a plan to make strictFunc default? |
12:59:00 | FromDiscord | <Yardanico> In reply to @ShalokShalom "Is there now a": I think so, yes |
12:59:02 | FromDiscord | <Yardanico> https://github.com/nim-lang/Nim/pull/19380 |
12:59:08 | FromDiscord | <Yardanico> <https://github.com/nim-lang/RFCs/issues/437> |
13:07:13 | FromDiscord | <Phil> sent a long message, see http://ix.io/4caZ |
13:08:12 | FromDiscord | <Phil> However when I do that it suddenly breaks parsing of httpx of `NativeHTTPRequests` to `Request` objects since it can't figure out where what part of the request starts |
13:08:50 | FromDiscord | <Phil> Or rather it wrongly figures it out and causes an index-defect when it tries to iterate past more bytes than there are in the request |
13:08:57 | FromDiscord | <Phil> (edit) "Or rather it wrongly figures it out and causes an index-defect when it tries to iterate past more bytes than there are in the request ... " added "upon failing to find a start point" |
13:09:11 | FromDiscord | <Phil> (edit) "Or rather it wrongly figures it out and causes an index-defect when it tries to iterate past more bytes than there are in the request upon failing to find a start point ... " added "for something to parse" |
13:20:48 | * | arkurious joined #nim |
13:20:55 | * | xet7 quit (Remote host closed the connection) |
13:24:43 | FromDiscord | <jos> is there something like zig's comptime in nim? |
13:26:16 | FromDiscord | <Yardanico> In reply to @jos "is there something like": you just write procedures like normal and then you can do `const myvar = myproc()` |
13:26:36 | FromDiscord | <Yardanico> but if you want something actually close, then it'll probably be `static` in the context of forcing something to execute in a static context |
13:26:47 | FromDiscord | <Yardanico> but usually people prefer to just use `const` |
13:27:49 | FromDiscord | <jos> that makes sense |
13:28:02 | FromDiscord | <jos> is there a way to rebind a "comptime" variable? |
13:28:07 | FromDiscord | <Yardanico> wdym by "rebind"? |
13:28:11 | FromDiscord | <jos> reassign |
13:28:17 | FromDiscord | <Yardanico> ? |
13:28:27 | FromDiscord | <Yardanico> you can make a runtime variable out of a compile-time variable, it just works, if you mean that |
13:28:41 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4cb8 |
13:28:53 | FromDiscord | <Yardanico> ah, you mean change value on compile time |
13:28:53 | FromDiscord | <Phil> You can also force a proc to always be done at compiletime by annotating it with the compileTime pragma |
13:28:58 | FromDiscord | <Yardanico> yeah, you can, but that's a bit more complexc |
13:28:58 | FromDiscord | <Yardanico> (edit) "complexc" => "complex" |
13:28:59 | FromDiscord | <jos> yeah i mean change the value at compile time |
13:29:11 | FromDiscord | <Phil> That one I don't think is a think |
13:29:15 | FromDiscord | <jos> i'm trying to have a global compile time variable to enable or disable tests |
13:29:23 | FromDiscord | <Yardanico> In reply to @jos "i'm trying to have": for that you usually use defines :) |
13:29:44 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4cb9 |
13:29:45 | FromDiscord | <jos> that's a good idea, but i'm also designing my own lang and am curious what's possible in nim |
13:30:05 | FromDiscord | <jos> because nim requires forward decls i figured it just evaluates the program in some fixed order, so i figured redefining const vars might be possible |
13:30:18 | FromDiscord | <Yardanico> you can't redefine consts, no |
13:30:21 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4cba |
13:30:21 | * | xet7 joined #nim |
13:30:22 | FromDiscord | <Yardanico> you can't redefine variables at all |
13:30:34 | FromDiscord | <jos> i mean reassign |
13:30:46 | FromDiscord | <Yardanico> still no, for that you have to use `var` like I showed above |
13:31:05 | FromDiscord | <jos> can you have a macro that depends on a var that's marked with the compileTime pragma? |
13:31:05 | FromDiscord | <Yardanico> this approach is usually used when you want to store something, although specifically for macros there's https://nim-lang.org/docs/macrocache.html |
13:31:09 | FromDiscord | <Yardanico> In reply to @jos "can you have a": yes of course |
13:32:12 | FromDiscord | <Yardanico> In reply to @jos "because nim requires forward": i'm not good at compiler development, but nim manual says this: |
13:32:31 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#order-of-evaluation↵https://nim-lang.org/docs/manual.html#macros |
13:32:41 | FromDiscord | <Yardanico> the first one is order of evaluation for code generally, the second one is when you add macros into the mix |
13:32:46 | FromDiscord | <Yardanico> "Macro invocation is a case where semantic analysis does not entirely proceed top to bottom and left to right. Instead, semantic analysis happens at least twice:" |
13:33:56 | FromDiscord | <Yardanico> and yeah, generally macros aren't that special, you can use any normal procs/funcs/etc in them as long as they work at compile-time |
13:34:12 | FromDiscord | <Yardanico> that includes everything in the stdlib that works at compile-time (and almost all pure-nim stdlib modules do) |
13:34:40 | FromDiscord | <jos> hmm |
13:36:58 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1026488026299367504/unknown.png |
13:37:07 | FromDiscord | <jos> ok so i expect this to output "ya" once |
13:37:09 | FromDiscord | <jos> but it actually outputs nothing |
13:37:22 | FromDiscord | <jos> am i misunderstanding something? |
13:38:29 | FromDiscord | <Yardanico> xyz runs at runtime |
13:38:41 | FromDiscord | <Yardanico> you switch test to true and then false, so it's `false` during the compilation |
13:38:50 | FromDiscord | <Yardanico> and xyz runs at runtime where xyz is already false |
13:38:50 | FromDiscord | <jos> i thought templates were invoked at compile time |
13:38:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cbb |
13:38:58 | FromDiscord | <Yardanico> In reply to @jos "i thought templates were": they are, but they are just code substitution |
13:39:02 | FromDiscord | <Phil> The copy paste of the template is done at compile time |
13:39:04 | FromDiscord | <Yardanico> they just paste the code inside of them to where they were called |
13:39:08 | FromDiscord | <Phil> the actual code of the template is not executed |
13:39:12 | FromDiscord | <Yardanico> (they do have a few extra features though, but that's basically it) |
13:39:37 | FromDiscord | <jos> if i mark the if statement as static, will that do my expected behavior? |
13:39:42 | FromDiscord | <jos> basically compile two variants of the fn |
13:39:53 | FromDiscord | <Phil> it should from my understanding |
13:40:17 | FromDiscord | <Yardanico> In reply to @jos "basically compile two variants": not sure what's your goal here - if you want to have a variable that can be switched at runtime, you just have a normal global `var` variable without `compileTime` |
13:40:18 | FromDiscord | <jos> hmm i can't quite get it to work |
13:40:31 | FromDiscord | <jos> i want the variable to be switched at compile time |
13:40:39 | FromDiscord | <Yardanico> yes, but your code runs at runtime |
13:40:47 | FromDiscord | <jos> well, i want two variants of the fn to be generated |
13:40:48 | FromDiscord | <Yardanico> so why do you want two variants of the same procedure to be compiled |
13:40:57 | FromDiscord | <jos> it's a contrived example |
13:41:07 | FromDiscord | <jos> i'm trying to understand what's possible at compile time |
13:41:14 | FromDiscord | <jos> stuff like this is useful in certain contexts though |
13:41:14 | FromDiscord | <Yardanico> In reply to @jos "well, i want two": I just don't understand what for :P |
13:41:33 | FromDiscord | <Yardanico> Nim has dead code elimination always enabled, so it only keeps multiple variants when they are actually executes |
13:41:37 | FromDiscord | <Yardanico> e.g. if you have a generic procedure |
13:41:43 | FromDiscord | <Yardanico> (edit) "executes" => "executed" |
13:42:29 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1026489417826832394/unknown.png |
13:42:30 | FromDiscord | <jos> ok this actually worked |
13:42:55 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1026489528187359252/unknown.png |
13:42:57 | FromDiscord | <jos> but for some reason this didn't work |
13:43:08 | FromDiscord | <jos> i don't quite understand how the static keyword works, but this is good enough for now i guess |
13:43:44 | FromDiscord | <jos> i think one easy example where something like this would be useful is if you have a debug logging function and don't want to generate the code if some const expression in the program config evaluates to false |
13:44:14 | FromDiscord | <Yardanico> In reply to @jos "i think one easy": yes, but you don't need all that for this |
13:44:22 | FromDiscord | <Yardanico> as I said, you just use a define, or read the config at compile-time into a `const` |
13:44:39 | FromDiscord | <Yardanico> and then do `when variable` or `when defined(define)` |
13:44:42 | FromDiscord | <jos> ofc, i'm just trying to understand what's possible in nim so i can take some stuff away into my own language |
13:44:44 | FromDiscord | <Yardanico> `when` is basically compile-time if |
13:44:56 | FromDiscord | <jos> i want to have as little overlap of features as possible |
13:45:11 | FromDiscord | <jos> and i'm not really sure what's possible in compiler design with a AoT language |
13:45:14 | FromDiscord | <jos> nim is definitely pushing the boundaries |
13:45:23 | FromDiscord | <jos> so i like looking at nim |
13:50:09 | FromDiscord | <Rika> In reply to @jos "": I’m surprised this didn’t |
13:52:40 | * | rockcavera joined #nim |
13:52:40 | * | rockcavera quit (Changing host) |
13:52:40 | * | rockcavera joined #nim |
14:04:56 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/pm8 |
14:10:25 | FromDiscord | <Yardanico> escape sequences |
14:10:26 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
14:14:30 | FromDiscord | <Bung> am making a PR for one issue that remove one localError report , found https://github.com/nim-lang/Nim/blob/devel/tests/errmsgs/t10735.nim my version will stop on `Error: undeclared identifier: 'pos'` but am not sure which version better |
14:23:35 | * | LuxuryMode joined #nim |
14:30:45 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cbu |
14:33:53 | FromDiscord | <Phil> At first glance I think the error is likely somewhere around `parser.nim` and the iterator `parseRequests`.↵That iterator typically hands out as "start" index a 0.↵In the case of these requests it doesn't, it wrongly "stays" in the iterator instead of opening a new one (?) and throws out a second "start" index, which leads to parsing errors down the line when `parsePath` tries to figure something out but doesn't find a `' '` character. |
14:36:10 | FromDiscord | <Phil> Note that this is only a problem when the form is of type `enctype="multipart/form-data"`, not when it is urlencoded! |
14:38:47 | FromDiscord | <Bung> doesn't redirect only do http get request ? |
14:40:34 | FromDiscord | <Phil> You can redirect incoming post requests just fine (otherwise, how would you forward a user after creating an entry in a database?), its just this specific scenario that breaks it.↵Notably when the form contains a value that is an HTTP method (so PUT, POST, GET etc.) |
14:41:21 | FromDiscord | <Phil> It also only crashes when the methods are capitalized, so "put" will not crash |
14:44:40 | FromDiscord | <Bung> it's implementation says it do a http 301 headers and body default empty |
14:45:37 | FromDiscord | <Phil> Aye, you would think that, however it still retains the first request in memory. I think it might be that because of the HTTP verb in the form it expects a second request to come in or something |
14:45:45 | FromDiscord | <Phil> (edit) "Aye, you would think that, however it still retains the first request in memory. I think it might be that because of the HTTP verb in the form it expects a second request to come in or something ... " added "before it starts processing the redirect" |
14:46:30 | FromDiscord | <Bung> oh found document, it use original request method and body |
14:48:39 | FromDiscord | <Phil> opened an issue, at least I can do a workaround by just going lowercase |
14:54:01 | FromDiscord | <Phil> Heck yeah! I can now generate an entire form to create an entry just based on a norm-model, including for file fields! |
15:01:00 | FromDiscord | <dom96> can you open it on httpbeast as well?↵Also as a side note, can prologue switch to httpbeast so we stop needing to maintain two slightly different versions of httpbeast? |
15:01:15 | FromDiscord | <dom96> (edit) "it" => "an issue" |
15:02:04 | FromDiscord | <Phil> Erm.... err.... not sure how tbh ^^' ↵I never used httpbeast directly so I don't know how to register a route, neither how to trigger a redirect |
15:02:19 | FromDiscord | <Phil> Like, I'm sure the example is not that hard to set up, just requires knowledge of httpbeast that I do not have |
15:02:34 | FromDiscord | <dom96> It's fine, just link to the httpx issue |
15:02:58 | FromDiscord | <dom96> so that if it's fixed in httpx I can remember to pull that fix 🙂 |
15:03:40 | FromDiscord | <Phil> https://github.com/ringabout/httpx/issues/13↵Or did you mean opening an issue in the httpbeast repo and linking to the httpx issue? |
15:03:50 | FromDiscord | <dom96> yes |
15:06:29 | FromDiscord | <Phil> Done, issue in httpbeast repo open with link to httpx issue |
15:06:34 | FromDiscord | <dom96> Thanks! |
15:07:10 | FromDiscord | <Phil> I think this was the first time I found a bug that didn't just throw an exception but actually took down the entire server with it |
15:07:29 | FromDiscord | <Phil> Who'da thunk it'd be an http server that does me in! |
15:07:56 | FromDiscord | <dom96> very interesting bug |
15:08:36 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://play.nim-lang.org/#ix=4cbS |
15:08:40 | FromDiscord | <dom96> I guess httpbeast incorrectly thinks a new request started. Seems you've already deduced basically this from reading your message above. |
15:09:10 | FromDiscord | <Phil> From the barebones I got from the code.↵Like, I have no idea how it discerns things, but the proc names are giving me hints |
15:09:15 | FromDiscord | <Phil> God I love it when proc names are actually useful |
15:09:19 | FromDiscord | <dom96> If you're adventurous, reproing in httpbeast should be fairly easy. Just send your POST to https://github.com/dom96/httpbeast/blob/master/tests/helloworld.nim |
15:09:54 | FromDiscord | <Rika> In reply to @Anna Aurora 🇪🇺🏳🌈 "I'm getting this error": I’m gonna guess here and say that you’re using “=“ by accident instead of “:” |
15:10:36 | FromDiscord | <Phil> I already spend like 3-4h figuring out this bug, for now I just want to get back to my actual project, which is developing an admin area.↵Next thing on the list is how to handle login and whether I provide default authentication ways |
15:10:41 | * | derpydoo quit (Ping timeout: 260 seconds) |
15:11:00 | FromDiscord | <dom96> In reply to @Isofruit "God I love it": Same. It might take longer to type but when you get back to the codebase after many years it saves you far more time. Honestly no idea how Araq deals with the naming in the compiler codebase. |
15:12:37 | FromDiscord | <Phil> In reply to @dom96 "Same. It might take": Sidenote, I don't think it would hurt either way if pathParams was changed regardless of it being the cause of the issue or not.↵A while-loop that can go out of bounds is just asking for easy ways to crash your server |
15:12:57 | FromDiscord | <Phil> Or would doing a range check affect performance too much? |
15:13:06 | FromDiscord | <Phil> (edit) "pathParams" => "path" |
15:13:12 | FromDiscord | <Phil> One sec, let me find the offensive code passage |
15:13:52 | FromDiscord | <dom96> yep, performance is always the concern, though we can add `assert`s safely to aid in debugging. |
15:15:02 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cbU |
15:15:11 | FromDiscord | <Phil> Ah, too late |
15:15:37 | FromDiscord | <Phil> So basically, speed is when you don't check anything? |
15:18:51 | FromDiscord | <dom96> httpbeast primary goal was speed, so my focus was primarily on that, hence not a lot of safety checks |
15:20:35 | FromDiscord | <dom96> (edit) "httpbeast" => "httpbeast's" |
15:20:50 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://play.nim-lang.org/#ix=4cbV |
15:21:11 | FromDiscord | <Phil> Is Color a tuple? |
15:24:02 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> no, an array… |
15:24:02 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> oh, square brackets? |
15:33:49 | FromDiscord | <Phil> Generally (a, b) is the syntax to generate a tuple.↵[a,b] will generate an array of size 2.↵@[a,b] generate a seq |
15:34:41 | * | wallabra quit (Ping timeout: 252 seconds) |
15:34:57 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> made it too complicated |
15:34:57 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> made it too complicated in the first one |
15:35:02 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://play.nim-lang.org/#ix=4cbY |
15:35:04 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://paste.rs/TSR |
15:35:15 | FromDiscord | <Phil> Ahhh so it was a tuple, yeah nice |
15:36:05 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> I thought Color is like, a custom type |
15:40:05 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> but then you can't define array length I guess? |
15:40:06 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> but it doesn't take floats either so it should be an array |
15:40:17 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://paste.rs/IFo |
15:40:22 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> sent a code paste, see https://paste.rs/wKw |
15:43:37 | * | wallabra joined #nim |
15:44:09 | * | derpydoo joined #nim |
15:59:11 | FromDiscord | <Phil> Hmm how would you figure out if an enum is represented by an int or a string? |
15:59:24 | FromDiscord | <Phil> Like, how do you get an enums internal type |
16:00:30 | FromDiscord | <Bung> there's module names like enumutils |
16:02:06 | FromDiscord | <Phil> Yeah but they contain:↵symbolName - That is basically the symbol of the enum in the form of a string, not its value↵symbolRank - The order in which the enum is, so at first place, second place etc. |
16:02:39 | FromDiscord | <Phil> no symbolValue |
16:03:28 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:04:28 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cc6 |
16:05:41 | * | wallabra joined #nim |
16:19:33 | FromDiscord | <Phil> the answer is `ord`↵`x.ord` gives the value |
16:22:37 | FromDiscord | <Phil> Wait, only if its an int enum, but how do I figure out which of the two it is |
16:23:30 | FromDiscord | <Yardanico> In reply to @Isofruit "Wait, only if its": an enum is always a numerical thing, if it has strings they're there just for the stringification |
16:23:39 | FromDiscord | <Yardanico> since enums must be ordinal (except those that are with holes) |
16:23:51 | FromDiscord | <Phil> In reply to @Yardanico "an enum is always": Aye but I want to know if strings or numbers were assigned |
16:24:33 | FromDiscord | <Phil> Since whatever was assigned is what the user wants in the database and thus what I must render as "values" for options of an HTML-select field |
16:27:53 | FromDiscord | <Phil> Or at least I want something that always works for conversion of enum --> string| int --> enum , regardless of if the enum has been assigned strings or ints |
16:29:05 | FromDiscord | <Bung> no string enum |
16:36:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4ccl |
16:39:28 | FromDiscord | <Bung> hmm seems work |
16:39:49 | FromDiscord | <Bung> parseInt then A |
16:41:08 | FromDiscord | <Bung> but string here not useful? |
16:42:30 | FromDiscord | <Bung> oh can be used as option text |
16:47:01 | FromDiscord | <Phil> I actually can do the entire thing without any assignment, but my users might not know this as did I until 20 minutes ago |
16:47:24 | FromDiscord | <Phil> I guess its nice in the db when you want strings stored there |
16:47:44 | FromDiscord | <Phil> And makes parsing from db --> nim easier |
16:49:01 | FromDiscord | <Phil> sent a long message, see http://ix.io/4ccr |
16:57:12 | FromDiscord | <Horizon [She/Her]> Wonder how good i could interop with Python with a WASM runtime compared to using Nimpy |
16:57:20 | FromDiscord | <Horizon [She/Her]> Probably better with Nimpy |
17:24:33 | * | gsalazar quit (Ping timeout: 250 seconds) |
17:27:23 | FromDiscord | <jan Apisu> cannot install nimlangserver on archlinux |
17:27:28 | FromDiscord | <jan Apisu> installed nimble from choosenim |
17:27:39 | FromDiscord | <jan Apisu> it asks for lot of packages to overwrite |
17:27:43 | FromDiscord | <jan Apisu> then it fails |
17:29:43 | FromDiscord | <flywind> In reply to @Isofruit "<@658563905425244160> I think": Hi, did you try it with `asynchttpserver` so that we can make sure it is an issue of httpbeast/httpx not an issue of prologue? |
17:33:21 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
17:39:57 | FromDiscord | <jan Apisu> wat? https://media.discordapp.net/attachments/371759389889003532/1026549179775975484/unknown.png |
17:48:08 | FromDiscord | <jan Apisu> what is `{.base.}` ? |
18:00:34 | * | PMunch joined #nim |
18:03:37 | * | gsalazar joined #nim |
18:08:12 | * | gsalazar quit (Ping timeout: 264 seconds) |
19:15:26 | * | gsalazar joined #nim |
19:21:43 | FromDiscord | <demotomohiro> @jan Apisu https://nim-lang.org/docs/manual.html#methods |
19:30:12 | FromDiscord | <Phil> In reply to @flywind "Hi, did you try": Just tried it, the server does not explode when I compile with `--define:usestd`.↵Therefore I assume that it is an httpx/httpbeast issue |
19:58:15 | * | LuxuryMode joined #nim |
20:01:07 | FromDiscord | <Phil> How do I figure out the path to the current nim-package that a file is in?↵Usecase:↵I have a package with its own resource folder, which contains nimja templates.↵The package must locate the resource folder at compile time, as it reads in the files from that directory at compiletime. |
20:01:18 | FromDiscord | <Phil> (edit) "in?↵Usecase:↵I" => "part of?↵Usecase:↵I" |
20:02:53 | * | gsalazar quit (Ping timeout: 268 seconds) |
20:03:43 | FromDiscord | <Phil> So I basically have the files I want under ~/.nimble/pkgs/snorlogue-0.1.0/resources↵And I want to figure that out in a file located under ~/.nimble/pkgs/snorlogue-0.1.0/snorlogue/frontendController.nim↵The relative path from `frontendController.nim` to the directory `resources` is always the same, just not the absolute paths |
20:04:52 | FromDiscord | <FM> sent a code paste, see https://play.nim-lang.org/#ix=4cda |
20:05:13 | FromDiscord | <FM> (edit) "https://play.nim-lang.org/#ix=4cda" => "https://play.nim-lang.org/#ix=4cdb" |
20:05:48 | FromDiscord | <FM> (edit) "https://play.nim-lang.org/#ix=4cdb" => "https://play.nim-lang.org/#ix=4cdc" |
20:07:04 | FromDiscord | <Phil> is north..west not an enum? |
20:07:08 | FromDiscord | <Phil> I'd assume it is an enum |
20:07:27 | FromDiscord | <Phil> if it is, that north..west would evaluate to something like 0..3 |
20:11:40 | NimEventer | New question by Stefan Zobel: Nim sequence assignment value semantics, see https://stackoverflow.com/questions/73940369/nim-sequence-assignment-value-semantics |
20:12:27 | FromDiscord | <FM> Oh right, thank you Phil, I'm stupid. I was confused between index type and the type of elements of the array |
20:12:31 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cdg |
20:12:41 | FromDiscord | <FM> (edit) "of" => "in" |
20:13:30 | FromDiscord | <FM> I was thinking that `array[north..west, BlinkLights]` had to be ordinal. I misunderstood |
20:13:31 | FromDiscord | <Phil> Ah, wait, incorrect, north..west encompasses 4 values |
20:13:44 | FromDiscord | <Phil> There you go |
20:13:47 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4cdh |
20:14:07 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4cdh" => "https://play.nim-lang.org/#ix=4cdi" |
20:14:07 | FromDiscord | <Phil> One of these days I'll learn to type |
20:14:24 | FromDiscord | <Phil> In that case you can self-reply to your SO question 😛 |
20:15:13 | FromDiscord | <Phil> Anyway, that's a lot of BlinkLights |
20:15:49 | FromDiscord | <FM> Haha indeed |
20:16:00 | FromDiscord | <FM> https://media.discordapp.net/attachments/371759389889003532/1026588451929346149/unknown.png |
20:26:21 | * | PMunch quit (Quit: Leaving) |
21:02:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cdp |
21:04:29 | FromDiscord | <4zv4l> this doesn't seem to work |
21:04:30 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4cdq |
21:04:40 | FromDiscord | <4zv4l> the thread is supposed to write `i` but it's always `1` |
21:04:47 | FromDiscord | <4zv4l> it doesn't increment |
21:08:40 | FromDiscord | <4zv4l> I am so silly omg↵I wrote `echo $1` |
21:08:44 | FromDiscord | <4zv4l> my bad |
21:15:56 | * | rhu joined #nim |
21:15:59 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
21:16:20 | * | wallabra joined #nim |
21:31:24 | FromDiscord | <demotomohiro> Maybe you are using a font that '1' and 'l' (lower case L) looks almost same.↵https://github.com/demotomohiro/DUBF |
21:33:21 | FromDiscord | <Patitotective> In reply to @demotomohiro "Maybe you are using": :o |
21:40:43 | * | wallabra quit (Ping timeout: 246 seconds) |
21:45:06 | FromDiscord | <4zv4l> In reply to @demotomohiro "Maybe you are using": lmaooooo, nice program dude ! xD |
21:46:32 | * | wallabra joined #nim |
21:47:55 | FromDiscord | <demotomohiro> In reply to @4zv4l "lmaooooo, nice program dude": Thx! |
21:48:46 | FromDiscord | <Elegantbeef> As soon as you add unicode demo homoglyphs ruin your day |
21:49:50 | FromDiscord | <Phil> sent a long message, see http://ix.io/4cdv |
21:50:41 | FromDiscord | <Elegantbeef> template or macro instead of a proc so it's evaluated inside module b |
22:10:54 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:11:10 | * | wallabra joined #nim |
23:17:41 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
23:33:00 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:39:26 | FromDiscord | <Tuatarian> this is a compiler bug right? |
23:39:48 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=4ce1 |
23:39:48 | FromDiscord | <Tuatarian> or lexer bug I guess |
23:51:37 | * | rhu quit (Ping timeout: 246 seconds) |
23:57:36 | FromDiscord | <Elegantbeef> It's a codegen issue |
23:57:53 | FromDiscord | <Elegantbeef> `lexer` is your program 😄 |