00:19:59 | FromDiscord | <Zectbumo> !eval echo """"""" |
00:20:02 | NimBot | " |
00:20:05 | FromDiscord | <Zectbumo> that's one way to do it đ |
00:20:17 | FromDiscord | <Elegantbeef> `echo "\""` |
00:20:24 | FromDiscord | <Zectbumo> there's another |
00:20:38 | FromDiscord | <Zectbumo> that just made me laugh is all |
00:21:52 | FromDiscord | <Zectbumo> is there no way to get a quote inside a raw string? `r"no quotes allowed"` |
00:22:22 | FromDiscord | <Elegantbeef> raw strings do not respect escaped characters so imagine not |
00:22:39 | FromDiscord | <Zectbumo> yeah, I started a r string and then needed a quote in there and oops... |
00:22:57 | FromDiscord | <huantian> There should be a way right?? |
00:23:06 | FromDiscord | <Zectbumo> not necessarily |
00:23:27 | FromDiscord | <Zectbumo> but it would make the world more complete |
00:24:57 | FromDiscord | <Zectbumo> I wish there were triple single quotes `'''` |
00:25:07 | FromDiscord | <Elegantbeef> And i wish there wasnt |
00:25:10 | FromDiscord | <Zectbumo> or just single quote strings for that matter |
00:25:46 | FromDiscord | <Zectbumo> you don't like triple anything? or just the triple single? |
00:26:05 | FromDiscord | <Elegantbeef> I like a explicit difference between char and string literals |
00:26:21 | FromDiscord | <Zectbumo> me too |
00:26:42 | FromDiscord | <Zectbumo> but triple `'''` singles doesn't have anything to do with char |
00:27:04 | FromDiscord | <Elegantbeef> I mean it's `'` which designates characters |
00:27:13 | FromDiscord | <Elegantbeef> I dont really see why it's any better than `"""` |
00:27:55 | FromDiscord | <Zectbumo> then double quotes can be used like '''my "quote" here''' |
00:27:57 | FromDiscord | <huantian> hmm I wonder if it's uh |
00:28:10 | FromDiscord | <huantian> !eval echo r" aaa "" aaa " |
00:28:12 | NimBot | aaa " aaa |
00:28:15 | FromDiscord | <huantian> there we go |
00:28:32 | FromDiscord | <Zectbumo> oh |
00:28:33 | FromDiscord | <Elegantbeef> How is it any different? |
00:28:45 | FromDiscord | <Elegantbeef> `""""my "quote" here"""` is valid |
00:28:59 | FromDiscord | <spoon> heck that works? |
00:29:19 | FromDiscord | <Zectbumo> I thought double quote maybe would work but that it wouldn't be in there because `"""` would be confusing. that's cool |
00:30:04 | FromDiscord | <Elegantbeef> `"""my "quote" here"""` sorry |
00:30:19 | FromDiscord | <Zectbumo> @ElegantBeef good point. I think I'll just the triple doubles or the @huantian quote pair |
00:31:50 | FromDiscord | <Zectbumo> In reply to @huantian "There should be a": you called it |
00:32:57 | FromDiscord | <Zectbumo> !eval echo "x""" |
00:32:59 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: in expression '"x" ""': identifier expected, but found '"x"' |
00:33:09 | FromDiscord | <Zectbumo> (edit) ""x"""" => "r"x"""" |
00:33:28 | FromDiscord | <Zectbumo> !eval echo r"x""" |
00:33:30 | NimBot | x" |
00:33:59 | FromDiscord | <Zectbumo> at the end is okay, just as long as it doesn't happen at the start of the string (then it's tripple `"""`) |
00:35:33 | * | ltriant quit (Ping timeout: 276 seconds) |
01:09:39 | * | jmdaemon joined #nim |
01:28:34 | * | ltriant joined #nim |
01:33:27 | * | ltriant quit (Ping timeout: 260 seconds) |
01:57:15 | * | ltriant joined #nim |
02:10:03 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3YjP |
02:12:37 | FromDiscord | <Elegantbeef> `services.mitems` |
02:12:42 | FromDiscord | <Elegantbeef> otherwise you're iterating a immutable `items` |
02:16:14 | FromDiscord | <m4ul3r> Thanks! I can see it's immutable now, are sequence items immutable after creation? |
02:17:02 | FromDiscord | <Elegantbeef> `items` is generally immutable and `mitems` is mutable |
02:17:21 | FromDiscord | <Elegantbeef> Nim attempts to default to immutable everywhere and this includes implicit iterators |
03:50:00 | NimEventer | New thread by Stoneface86: Nim+CMake project example , see https://forum.nim-lang.org/t/9166 |
04:37:56 | * | vicfred joined #nim |
04:43:40 | * | ltriant quit (Ping timeout: 246 seconds) |
04:53:35 | * | ltriant joined #nim |
05:28:51 | * | ltriant quit (Ping timeout: 244 seconds) |
06:13:52 | * | ltriant joined #nim |
06:18:56 | * | ltriant quit (Ping timeout: 272 seconds) |
06:51:10 | * | ltriant joined #nim |
06:56:10 | * | ltriant quit (Ping timeout: 244 seconds) |
07:00:19 | * | vicecea quit (Remote host closed the connection) |
07:00:51 | * | vicecea joined #nim |
07:50:40 | * | jjido joined #nim |
08:00:34 | FromDiscord | <d4rckh> In reply to @d4rckh "until i restarted the": okay, could it be because i am trying to send something at the same time? |
08:00:39 | FromDiscord | <d4rckh> (edit) "time?" => "time in 2 different procs?" |
08:01:03 | FromDiscord | <d4rckh> cuz it's so random |
08:08:49 | FromDiscord | <Elegantbeef> hard to say without code |
08:10:03 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzzâŠ) |
08:26:54 | * | ltriant joined #nim |
08:32:34 | * | ltriant quit (Ping timeout: 246 seconds) |
08:45:07 | * | ltriant joined #nim |
09:02:40 | FromDiscord | <Bung> how to make stdin stdout to AsyncFile , I've tried serveral ways |
09:02:46 | FromDiscord | <Bung> on windows |
09:03:37 | FromDiscord | <Rika> is it even possible i do wonder |
09:07:39 | FromDiscord | <Bung> reopen std with openAsync make file open take with FILE_FLAG_OVERLAPPED then asyncdispatch createIoCompletionPort will work, method 2, dup to file and use openAsync |
09:08:58 | FromDiscord | <Bung> thats my thoughts after searching some c code |
09:12:16 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=3YkI |
09:12:29 | FromDiscord | <Bung> (edit) |
09:13:24 | FromDiscord | <Bung> (edit) "https://play.nim-lang.org/#ix=3YkI" => "https://play.nim-lang.org/#ix=3YkJ" |
09:36:30 | * | ltriant quit (Ping timeout: 240 seconds) |
09:39:18 | FromDiscord | <salt> In reply to @Bung "reopen std with openAsync": in python, I run `WaitForMultipleObjects` in a separate thread with a stdin handle and a anonymous event handle that i use to cancel rescheduling of the `WaitFor`, when it returns, you can then handle stdin input -- i don't know how to implement it in nim, but if you're familiar with python maybe it's useful: https://github.com/salt-die/nurses_2/blob/main/nurses_2/io/input/win32/win32_input. |
09:39:42 | FromDiscord | <Rika> i believe he wants no extra threads |
09:39:44 | FromDiscord | <Rika> pure async |
09:40:39 | FromDiscord | <salt> i don't know how to do it purely async on windows, i think i've heard duping is only way |
09:43:40 | FromDiscord | <Bung> yeah, I want pure async way |
09:44:36 | * | jmdaemon quit (Ping timeout: 244 seconds) |
09:51:56 | * | ltriant joined #nim |
09:55:22 | FromDiscord | <salt> sent a code paste, see https://play.nim-lang.org/#ix=3Yl0 |
10:24:40 | FromDiscord | <Phil> Nested generic types huh |
10:28:23 | FromDiscord | <Phil> ohhh wait no, generic concepts for generic types |
10:36:12 | FromDiscord | <mratsim> In reply to @salt "Having trouble getting the": Nim doesn't support explicit Higher Kinded Types |
10:43:10 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/ttH |
11:05:20 | NimEventer | New Nimble package! artemis - A simple Nim server for the Gemini protocol. Forked from geminim, see https://git.skylarhill.me/skylar/artemis |
11:09:23 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=3Yli |
11:09:41 | FromDiscord | <mratsim> (edit) "https://play.nim-lang.org/#ix=3Yli" => "https://play.nim-lang.org/#ix=3Ylj" |
11:12:57 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Yll |
11:13:10 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=3Yll" => "https://play.nim-lang.org/#ix=3Ylm" |
11:16:01 | * | ltriant quit (Ping timeout: 246 seconds) |
11:25:52 | FromDiscord | <Rika> In reply to @Isofruit "hmmm this does lose": If you so desire, itâs time for concepts |
11:26:27 | FromDiscord | <Rika> Didnât notice there are concepts already |
11:26:31 | FromDiscord | <Rika> Let me read harder |
11:28:09 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3Ylq |
11:28:12 | FromDiscord | <Rika> Without the generic |
11:35:25 | FromDiscord | <salt> sent a code paste, see https://paste.rs/qyj |
11:36:35 | FromDiscord | <salt> i don't know how bulky that will end up |
11:37:36 | FromDiscord | <Phil> Huh, managed to fix my example |
11:59:06 | * | ltriant joined #nim |
12:04:06 | * | ltriant quit (Ping timeout: 244 seconds) |
12:18:09 | FromDiscord | <Phil> Given that this was in inim and thus t1 and t2 were fixed, I am mildly concerned. Isn't DateTime recorded in a unix timestamp? Shouldn't the difference between two unix timestamps be consistent? https://media.discordapp.net/attachments/371759389889003532/977908221522092032/unknown.png |
12:18:56 | FromDiscord | <Yardanico> In reply to @Isofruit "Given that this was": see, this is why inim isn't a real repl :)) |
12:19:01 | FromDiscord | <Yardanico> it always recompiles and reruns the whole file |
12:19:08 | FromDiscord | <Yardanico> so the difference between two calls will be different |
12:19:22 | FromDiscord | <Phil> In reply to @Yardanico "see, this is why": Dangit! I didn't know that! |
12:19:24 | FromDiscord | <Yardanico> your whole inim "session" is stored in a single nim file, new code is just added to it and it's being recompiled |
12:19:42 | FromDiscord | <Yardanico> and inim filters the output so only new stuff gets printed |
12:19:49 | FromDiscord | <Phil> so every command is essentially "add line to file, recompile file, rerun file for output" ? |
12:19:51 | FromDiscord | <Yardanico> yes |
12:20:12 | FromDiscord | <Phil> Hmmm makes sense |
12:21:31 | FromDiscord | <Yardanico> of course it's a bit more complicated than that (indentation and stuff), but the basics is basically this |
12:21:33 | FromDiscord | <Yardanico> inim is < 1kloc |
12:21:35 | FromDiscord | <Phil> Is there an expression in english of "They're all only cooking with water", meaning that typically advanced sounding stuff is a lot of the time also just fundamentals somewhat hidden. |
12:22:04 | FromDiscord | <Phil> (edit) "hidden." => "hidden?" |
12:22:06 | * | pch quit (Quit: Leaving) |
12:22:26 | FromDiscord | <Phil> That's what this realization moment felt like.â”No magic happening, just cleverly put together fundamentals to give the illusion of a repl |
12:22:33 | FromDiscord | <Yardanico> @Phil there's a more "real" repl that's `nim secret` but it runs the Nim VM so it has the same limitations like nimscript (no FFI) |
12:22:40 | FromDiscord | <Rika> âIn the end itâs just (something I donât know)â |
12:24:27 | FromDiscord | <Phil> In reply to @Yardanico "<@180601887916163073> there's a more": Given that typically I just want a repl to test stuff out, that works fine for me |
12:24:45 | FromDiscord | <Yardanico> it's a bit less "nice" than inim is that it's a basic repl with no things like outputting the type |
12:24:46 | FromDiscord | <Phil> stuff being various syntax constructs |
12:24:58 | FromDiscord | <Yardanico> idk, it's easy for me to just hit F6 in vscode :)) |
12:25:27 | FromDiscord | <Rika> Yeah I donât know itâs easy for me to just write a file and compile that |
12:25:36 | FromDiscord | <Phil> My main project has become a bit too complicated for me to play around with syntax constructs in it because if X is broken that can be due to 50 different reasons at this point |
12:25:43 | FromDiscord | <Rika> ~~too much vim usage to go back to normal editing~~ |
12:26:00 | FromDiscord | <Phil> I literally made a "playground" project so that I can quickly play around and see what compiles and what doesn't |
12:26:04 | FromDiscord | <Yardanico> In reply to @Isofruit "My main project has": just create a temp file for that |
12:26:08 | FromDiscord | <Yardanico> it's a bit dirty, but I do it this way usually |
12:26:16 | FromDiscord | <Yardanico> just some "test.nim" in the root of your project, literally :P |
12:26:22 | FromDiscord | <Rika> I do that for every language I use |
12:26:40 | FromDiscord | <Rika> Because sometimes I get carried away and write nice complicated things that I may use again |
12:27:41 | * | pch joined #nim |
12:49:01 | FromDiscord | <Phil> How do I copy a ref type again? Is that where I start using explicit copy operators or somesuch in proc signatures? |
12:55:47 | FromDiscord | <Rika> Make a new reference and set the data of that to the same data of the old one? |
12:57:08 | FromDiscord | <Phil> Found `deepCopy()` |
12:57:44 | FromDiscord | <Phil> ... which araq appears to want to deprecate in favor of move semantics |
13:10:37 | FromDiscord | <ynfle> How can I read a file in the VM? |
13:10:43 | FromDiscord | <ynfle> ie. nimscript |
13:10:46 | FromDiscord | <Yardanico> In reply to @ynfle "How can I read": readFile works :) also there's `staticRead` |
13:10:51 | FromDiscord | <Yardanico> i mean readFile from os works |
13:10:56 | FromDiscord | <Yardanico> because there's a vm callback defined for it |
13:15:29 | FromDiscord | <Yardanico> @ElegantBeef IIRC nim doesn't change the order of the fields in the object definition when converting them into C structs? or it can do that for better alignment? |
13:18:08 | FromDiscord | <Yardanico> yeah doesn't look like it |
13:18:29 | FromDiscord | <ynfle> In reply to @Yardanico "i mean readFile from": Doesn't seem to |
13:18:34 | FromDiscord | <Yardanico> In reply to @ynfle "Doesn't seem to": can you show some code? |
13:19:08 | FromDiscord | <Yardanico> ah right readFile doesn't need os, it just works as is |
13:19:10 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/977923579603734598/unknown.png |
13:19:22 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/977923629574672394/unknown.png |
13:19:58 | FromDiscord | <Yardanico> In reply to @Yardanico "yeah doesn't look like": It's just confusing because the manual says "The implementation aligns the fields for the best access performance. The alignment is compatible with the way the C compiler does it." |
13:20:18 | FromDiscord | <Yardanico> and this statement is in the manual since the first git commit apparently |
13:20:24 | FromDiscord | <Yardanico> "The implementation aligns the fields for best access performance. The alignment is done in a way that is compatible the way the C compiler does it." |
13:20:47 | FromDiscord | <d4rckh> https://nim-lang.org/docs/asynchttpserver.html#Request |
13:20:49 | FromDiscord | <d4rckh> what's body? |
13:21:05 | FromDiscord | <Yardanico> body of the request? |
13:21:08 | FromDiscord | <Yardanico> some request types like POST have a body |
13:21:16 | FromDiscord | <d4rckh> what about GET? |
13:21:31 | FromDiscord | <d4rckh> how can i get the params? |
13:21:37 | FromDiscord | <Yardanico> that's query parameters |
13:21:42 | FromDiscord | <Yardanico> part of the URL |
13:21:48 | FromDiscord | <d4rckh> oh, i parse the url |
13:21:48 | FromDiscord | <d4rckh> i see |
13:21:53 | FromDiscord | <d4rckh> is there any built in parser? |
13:22:03 | FromDiscord | <Yardanico> url is already of the type Uri |
13:22:09 | FromDiscord | <d4rckh> ah |
13:22:27 | FromDiscord | <d4rckh> but query is a string |
13:22:33 | FromDiscord | <d4rckh> not a tabel or a sequence |
13:22:34 | FromDiscord | <Yardanico> you can just take `uri.query` and use https://nim-lang.org/docs/uri.html#decodeQuery.i%2Cstring |
13:22:35 | FromDiscord | <d4rckh> (edit) "a" => "at least" |
13:22:39 | FromDiscord | <d4rckh> ty |
13:28:25 | FromDiscord | <ynfle> sent a code paste, see https://paste.rs/7ke |
13:28:51 | FromDiscord | <ynfle> But it seems to work with regular nimscript |
13:30:32 | * | pch quit (Remote host closed the connection) |
13:31:18 | FromDiscord | <Yardanico> oh, sorry, don't really know how standalone nimscript works so can't help with that :( |
13:32:50 | FromDiscord | <ynfle> Ah ok |
13:33:04 | FromDiscord | <ynfle> Hopefully beef can help when he wakes up |
13:35:09 | * | pch joined #nim |
13:35:26 | * | krux02 joined #nim |
13:45:31 | FromDiscord | <Bung> In reply to @ynfle "Ah ok": it's not possible use native code in nimscripter AFAIK |
13:46:27 | FromDiscord | <deech> How do I create something compatible with a fixed size C array in Nim? I need to pass it to a C function that takes `void blah[]`. |
13:46:53 | FromDiscord | <Yardanico> In reply to @deech "How do I create": just make a fixed size Nim array? not sure exactly |
13:47:01 | FromDiscord | <Yardanico> can you show how an argument to pass for this C function is defined? |
13:47:06 | FromDiscord | <Yardanico> in C |
13:47:52 | FromDiscord | <deech> Just like that, the function is something like, `void f(void things[], int count);` |
13:48:16 | FromDiscord | <Yardanico> and how do you create a variable to pass as an argument for it in C? |
13:49:47 | FromDiscord | <Rika> The C type you gave us is ambiguous in meaning |
13:49:48 | FromDiscord | <ynfle> In reply to @Bung "it's not possible use": It's not native code |
13:49:54 | FromDiscord | <Rika> Do you know what the âhuman meaningâ is |
13:50:17 | FromDiscord | <Yardanico> In reply to @Rika "The C type you": I mean it's not really ambiguous |
13:50:32 | FromDiscord | <Yardanico> `void` in C is of the size of the pointer on the machine |
13:50:32 | FromDiscord | <deech> That's what I'm trying to figure out, how to create a type that captures, `void things[]`. `array[...]` syntax requires the length up front, in C you can statically initialized the array without specifying the length. |
13:50:43 | FromDiscord | <Rika> In reply to @Yardanico "I mean it's not": I meant in intent not in what it is |
13:50:49 | FromDiscord | <Yardanico> In reply to @deech "That's what I'm trying": is it specifically defined as `void blah[]` ? |
13:50:55 | FromDiscord | <Yardanico> not `int blah[]` but `void blah[]` ? |
13:51:24 | FromDiscord | <Yardanico> but generally to those C functions you just pass a block of memory, you can pass a nim sequence, array, string or something else to it |
13:51:27 | FromDiscord | <deech> No, it is specifically defined as `SomeCppObject objs[]` and I am `extern`ing the function. |
13:51:28 | FromDiscord | <Rika> It decomposes to void anyway doesnât it |
13:52:00 | FromDiscord | <deech> Conceptually yes, but you can't cast from from void to void []. |
13:52:13 | FromDiscord | <Bung> In reply to @ynfle "It's not native code": I use nimscripter heaily , but most part is pure nim code |
13:52:42 | FromDiscord | <Yardanico> In reply to @deech "No, it is specifically": you should've told that up front :) |
13:52:53 | FromDiscord | <Yardanico> if it's specifically defined like that then you need to make an array of `ptr SomeCppObject` I think |
13:52:55 | FromDiscord | <Yardanico> or sequence |
13:53:03 | FromDiscord | <Yardanico> and pass the addr of the first element + the length to the C function |
13:54:00 | FromDiscord | <deech> Right, what I'm trying to figure out is how to make that `array`. Nim requires specifying the length up front, no? |
13:54:38 | FromDiscord | <Yardanico> In reply to @deech "Right, what I'm trying": first of all, you can pass both an array and a seq to that C function |
13:54:43 | FromDiscord | <Yardanico> it doesn't specifically need to be an "array" type |
13:55:01 | FromDiscord | <Yardanico> second of all, Nim has length inference if you define all array elements right in the initialization |
13:56:24 | FromDiscord | <Rika> Are you trying to figure out the type definition in the function signature |
13:56:33 | FromDiscord | <ynfle> In reply to @Bung "I use nimscripter heaily": There is a subset of nimscript that is usable with nimscript |
13:57:00 | FromDiscord | <Rika> Since itâs going to be a `ptr ptr YourObject` either way isnât it? |
13:57:13 | FromDiscord | <deech> I am representing the object as `void` in the extern'ed interface and Clang complains that it can't cast from `void` to `SomeCppObject []`. Same for `void`. |
13:57:37 | FromDiscord | <Rika> Why void? |
13:58:00 | FromDiscord | <deech> How else would you expose a C++ object in C? |
13:58:11 | FromDiscord | <deech> (edit) "in" => "to" |
13:58:25 | FromDiscord | <Yardanico> are you compiling with the C++ backend or the C backend? |
13:58:33 | FromDiscord | <Yardanico> if you compile with the C++ backend, why not just importc the C++ type itself? |
14:00:19 | FromDiscord | <Yardanico> both for array and a seq |
14:00:21 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/CBD |
14:00:40 | FromDiscord | <Yardanico> (and yes I know this leaks, it's just an example) |
14:01:01 | FromDiscord | <Yardanico> (and I know https://nim-lang.org/docs/sequtils.html#newSeqWith.t%2Cint%2Cuntyped exists) |
14:01:50 | * | pch quit (Remote host closed the connection) |
14:02:07 | FromDiscord | <Yardanico> @deech does that code make sense for what you're trying to do? |
14:02:49 | FromDiscord | <Yardanico> ofc if you don't want to cast to ptr UncheckedArray each time you can instead just define `arr` as `ptr ptr cint` but this way it's clearer what the function signature is |
14:03:47 | FromDiscord | <deech> Thanks for that! If the code that used the C++ API was also using the C++ backend that would be feasible but I am exposing the API to code that uses the C backend. |
14:04:41 | FromDiscord | <deech> At the end of the day, I trust Nim's C backend more so I'd like to use it more if possible. |
14:05:25 | * | pch joined #nim |
14:09:32 | FromDiscord | <deech> I suppose I can wrap the C++ function with one that just takes `SomeCppObject` and a `count` and expose that. |
14:27:36 | * | ltriant joined #nim |
14:32:22 | * | ltriant quit (Ping timeout: 246 seconds) |
15:05:30 | FromDiscord | <Phil> What I would give for better error messages around generic |
15:05:31 | FromDiscord | <Phil> (edit) "generic" => "generics" |
15:09:18 | FromDiscord | <!Patitotective> In reply to @Isofruit "What I would give": a PR? |
15:09:20 | FromDiscord | <!Patitotective> (edit) "In reply to @Isofruit "What I would give": a PR? ... " added "lol" |
15:09:52 | FromDiscord | <Phil> In reply to @Patitotective "a PR? lol": I'm not even competent enough to write a proper ORM |
15:10:56 | FromDiscord | <Phil> I'm getting better, but given how much I'm still even struggling with generics at times... yeah no, not yet |
16:00:56 | * | krux02 quit (Remote host closed the connection) |
16:01:37 | * | krux02 joined #nim |
16:31:24 | * | ltriant joined #nim |
16:38:07 | * | ltriant quit (Ping timeout: 240 seconds) |
17:02:49 | FromDiscord | <ynfle> Nimscripter is mindblowing. Thanks beef |
17:33:42 | * | ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
17:36:11 | * | ehmry joined #nim |
17:42:56 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3YnD |
17:43:07 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3YnD" => "https://play.nim-lang.org/#ix=3YnE" |
17:54:20 | * | NimEventer quit (Ping timeout: 272 seconds) |
17:54:32 | * | Yardanico quit (Ping timeout: 248 seconds) |
18:05:29 | FromDiscord | <@mike_new:mikenew.io> sent a code paste, see https://play.nim-lang.org/#ix=3YnI |
18:05:55 | FromDiscord | <Rika> Thatâs not what he wants |
18:06:24 | FromDiscord | <Rika> He wants the range to be longer than the string he passes and the extra be set to \0 |
18:10:12 | * | NimEventer joined #nim |
18:10:14 | * | Yardanico joined #nim |
18:11:10 | FromDiscord | <exelotl> `\0` is a single character |
18:11:36 | FromDiscord | <exelotl> oh wait I see |
18:11:36 | * | noeontheend joined #nim |
18:13:40 | * | toluene quit (Quit: The Lounge - https://thelounge.chat) |
18:24:41 | FromDiscord | <Mike> Yeah, realized that after I respondedâ”(@Rika) |
18:30:03 | FromDiscord | <ynfle> @Bung @ElegantBeef would there be an issue with returning `OrderedTable` from nimscript to the nim side of things? |
18:31:36 | FromDiscord | <ynfle> Is it because the seq is allocated on the heap? |
18:32:46 | FromDiscord | <demotomohiro> !eval var s = "\0hello\0\0";s[0..2] = "hi";doAssert s == "hi\0llo\0\0" |
18:32:49 | NimBot | /usercode/in.nim(1) inâ”/playground/nim/lib/system/assertions.nim(38) failedAssertImplâ”/playground/nim/lib/system/assertions.nim(28) raiseAssertâ”/playground/nim/lib/system/fatal.nim(53) sysFatalâ”Error: unhandled exception: /usercode/in.nim(1, 47) `s == "hi\x00llo\x00\x00"` [AssertionDefect] |
18:33:09 | FromDiscord | <demotomohiro> var s = "\0hello\0\0";s[0..2] = "hi\0";doAssert s == "hi\0llo\0\0" |
18:33:33 | FromDiscord | <demotomohiro> !eval var s = "\0hello\0\0";s[0..2] = "hi\0";doAssert s == "hi\0llo\0\0" |
18:33:36 | NimBot | <no output> |
18:34:03 | FromDiscord | <demotomohiro> Is this @!Patitotective want? |
18:35:16 | FromDiscord | <ynfle> !eval import strutils; echo newString(10) |
18:35:20 | NimBot | |