| 00:28:00 | * | lucas_ta joined #nim |
| 00:47:28 | * | lucas_ta quit (Quit: Leaving) |
| 00:47:53 | * | lucasta joined #nim |
| 00:48:53 | * | lucasta quit (Remote host closed the connection) |
| 00:49:14 | * | lucasta joined #nim |
| 00:51:10 | * | lucasta quit (Client Quit) |
| 00:54:37 | FromDiscord | <GoMpow2> how to match in case of expression for all other enum values? |
| 00:55:44 | FromDiscord | <Elegantbeef> else |
| 01:01:46 | FromDiscord | <GoMpow2> thx |
| 01:04:46 | * | lucasta joined #nim |
| 01:04:47 | * | lucasta quit (Read error: Connection reset by peer) |
| 01:07:15 | * | nanxiao joined #nim |
| 01:16:37 | * | lucasta joined #nim |
| 01:16:40 | * | lucasta quit (Remote host closed the connection) |
| 01:24:35 | * | lucasta joined #nim |
| 01:39:19 | * | lucasta quit (Quit: Leaving) |
| 03:13:04 | * | nanxiao quit (Quit: Client closed) |
| 03:15:04 | * | derpydoo joined #nim |
| 03:20:20 | * | pbsds quit (Quit: The Lounge - https://thelounge.chat) |
| 03:22:20 | * | pbsds joined #nim |
| 03:35:10 | * | nanxiao joined #nim |
| 04:29:22 | * | nanxiao quit (Quit: Client closed) |
| 05:09:12 | * | nanxiao joined #nim |
| 05:14:40 | * | derpydoo quit (Ping timeout: 252 seconds) |
| 05:44:36 | * | advesperacit joined #nim |
| 05:49:53 | FromDiscord | <System64 ~ Flandre Scarlet> Is it normal I cannot do that? https://media.discordapp.net/attachments/371759389889003532/1092687463526436895/image.png |
| 05:51:42 | FromDiscord | <huantian> `var renderTextures: array[2, RenderTexture]` |
| 05:52:07 | FromDiscord | <huantian> the array type doesn't act as a constructor |
| 05:52:22 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright, it works now↵Thanks |
| 06:07:29 | FromDiscord | <sOkam!> how do you correctly convert an `array[N, char]` to a nim string?↵right now with `std/strbasics add` it adds even the ending set of million `\x00` characters 😔↵do I just cast to cstring, or is there some other way? |
| 06:07:52 | FromDiscord | <sOkam!> i tried searching the chat, but only that option showed up, and its not behaving well |
| 06:08:07 | FromDiscord | <Elegantbeef> You cannot without allocating |
| 06:08:55 | FromDiscord | <Elegantbeef> `$cast[cstring](myArr[0])` |
| 06:08:55 | FromDiscord | <sOkam!> i dont mind allocating it. i just want it to convert it correctly |
| 06:09:09 | FromDiscord | <Elegantbeef> The above only works if it's `\0` terminated |
| 06:09:13 | FromDiscord | <Elegantbeef> If it's not use use strbasics |
| 06:09:13 | FromDiscord | <sOkam!> kk ill try that |
| 06:11:48 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4sC9 |
| 06:12:27 | FromDiscord | <sOkam!> i guess it means they are not null terminated? 🤔 |
| 06:12:31 | FromDiscord | <Elegantbeef> you need to `rfind` |
| 06:13:43 | FromDiscord | <sOkam!> i don't quite follow why |
| 06:14:42 | FromDiscord | <Elegantbeef> you find a `\0` in the array |
| 06:15:34 | FromDiscord | <sOkam!> i don't have a string, though. rfind seems to search in strings |
| 06:16:04 | FromDiscord | <Elegantbeef> rfind works on arrays |
| 06:16:23 | FromDiscord | <sOkam!> what module is it in? |
| 06:16:29 | FromDiscord | <Elegantbeef> system |
| 06:16:45 | FromDiscord | <sOkam!> its not showing up in the manual search 😔 |
| 06:16:46 | FromDiscord | <Elegantbeef> Wait it's not |
| 06:16:49 | FromDiscord | <Elegantbeef> lol |
| 06:17:46 | * | nanxiao quit (Quit: Client closed) |
| 06:18:17 | FromDiscord | <Elegantbeef> I guess just find one |
| 06:18:47 | FromDiscord | <sOkam!> wdym? |
| 06:20:02 | FromDiscord | <Elegantbeef> Or just do it manually |
| 06:20:06 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4sCd |
| 06:21:52 | * | Notxor joined #nim |
| 06:21:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4sCe |
| 06:23:15 | * | kenran joined #nim |
| 06:27:10 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4sCf |
| 06:36:16 | * | tiorock joined #nim |
| 06:36:16 | * | tiorock quit (Changing host) |
| 06:36:16 | * | tiorock joined #nim |
| 06:36:16 | * | rockcavera is now known as Guest7846 |
| 06:36:16 | * | tiorock is now known as rockcavera |
| 06:39:22 | * | Guest7846 quit (Ping timeout: 276 seconds) |
| 06:54:25 | * | nanxiao joined #nim |
| 07:03:59 | * | ltriant quit (Ping timeout: 246 seconds) |
| 07:15:31 | * | TakinOver quit (Ping timeout: 250 seconds) |
| 07:16:25 | * | TakinOver joined #nim |
| 07:17:26 | * | PMunch joined #nim |
| 07:52:03 | * | lucasta joined #nim |
| 07:56:01 | * | nanxiao quit (Quit: Client closed) |
| 07:58:36 | * | nanxiao joined #nim |
| 08:07:30 | FromDiscord | <ringabout> > Iterators that are neither marked {.closure.} nor {.inline.} explicitly default to being inline, but this may change in future versions of the implementation.↵https://nim-lang.github.io/Nim/manual.html#iterators-and-the-for-statement-firstminusclass-iterators↵It does cause problems for iterators without pragmas. I suppose it was not lifted properly at the transf phase. |
| 08:28:49 | * | derpydoo joined #nim |
| 09:18:45 | * | nanxiao quit (Quit: Client closed) |
| 09:28:42 | PMunch | Hmm I have an application which displays some HTML. Now I've given the users the ability to add their own HTML templates the content will be put into. But I still want to be able to add some scripts, styles, fonts, etc. |
| 09:29:47 | PMunch | I'd love to give the user the ability to supply a full HTML document, or just what goes into the body part, and then stitch it together with my script and style tags |
| 09:30:02 | PMunch | I guess there aren't any HTML merging libraries out there by chance? |
| 09:31:58 | * | nanxiao joined #nim |
| 09:56:18 | FromDiscord | <amadan> sent a long message, see http://ix.io/4sD9 |
| 09:57:45 | * | nanxiao quit (Quit: Client closed) |
| 10:02:39 | FromDiscord | <System64 ~ Flandre Scarlet> if((str.len and 1).bool) better than if(str.len % 2 === 1) change my mind |
| 10:05:03 | * | jmdaemon quit (Ping timeout: 260 seconds) |
| 10:22:10 | FromDiscord | <amadan> Mean if `.len` is unsigned then the c compiler would optimise them to the same anyways? |
| 10:23:50 | FromDiscord | <amadan> Looks like it does https://godbolt.org/z/reqbTPYGx↵But I like the second one personally |
| 10:24:00 | FromDiscord | <amadan> (edit) "Looks like it does https://godbolt.org/z/reqbTPYGx↵But I like the second one personally ... " added "(using `%`)" |
| 10:24:09 | FromDiscord | <amadan> (edit) "anyways?" => "anyways no?" |
| 10:27:08 | FromDiscord | <firq> Is ORC working with threadpool? I'm getting "SIGSEGV\: Illegal storage access. (Attempt to read from nil?)" even with simple toy tests using Nim 1.6.12 |
| 10:30:27 | FromDiscord | <firq> And it seems to work fine with both the default GC and with ARC |
| 10:36:43 | * | nanxiao joined #nim |
| 10:37:36 | * | azimut_ joined #nim |
| 10:39:00 | FromDiscord | <firq> To answer my own question\: https://github.com/nim-lang/Nim/issues/14901 reports the same issue, though there is a fix for it. I can't figure out if that fix went into 1.6.\ or only on 2.\ though. |
| 10:40:50 | * | azimut quit (Ping timeout: 255 seconds) |
| 10:43:54 | * | nanxiao quit (Quit: Client closed) |
| 11:13:43 | PMunch | Hmm, the thing is I want them to be able to either upload a full HTML document, or just a snippet. |
| 11:13:51 | PMunch | I guess I'll have to go the htmlparser route.. |
| 11:17:37 | NimEventer | New thread by alexeypetrushin: Is such HTML template possible?, see https://forum.nim-lang.org/t/10067 |
| 11:19:21 | FromDiscord | <Marcus> Would be really nice to get a stable release with the fix for infinite recursion in nimsuggest. |
| 11:20:21 | PMunch | Indeed |
| 11:20:30 | PMunch | Better yet some QC on the nimsuggest project :P |
| 11:33:55 | FromDiscord | <Yardanico> In reply to @firq "To answer my own": only 2.x |
| 11:34:03 | FromDiscord | <Yardanico> it wasn't backported it seems |
| 11:39:20 | NimEventer | New post on r/nim by angel__-__-: Block motions for vim (for Nim), see https://reddit.com/r/nim/comments/12bgcgj/block_motions_for_vim_for_nim/ |
| 11:55:20 | PMunch | Hmm @amadan, htmlparser seems to break strings in embedded JavaScript.. |
| 11:56:42 | FromDiscord | <amadan> Yeah that was the same problem I mentioned sadly↵Haven't looked into it too much so don't even know if it's an easy fix or not |
| 12:01:44 | * | om3ga joined #nim |
| 12:04:19 | * | ltriant joined #nim |
| 12:10:56 | FromDiscord | <firq> Ok, good to know. Thanks↵(@Yardanico) |
| 12:20:07 | * | derpydoo quit (Quit: derpydoo) |
| 12:24:49 | FromDiscord | <creative> has anyone done osdev? mainly for x86_64 |
| 12:29:57 | FromDiscord | <Yardanico> In reply to @creative "has anyone done osdev?": yeah a couple of people did with Nim, although nothing serious |
| 12:30:03 | FromDiscord | <Yardanico> you can find those projects on github |
| 12:30:19 | FromDiscord | <Yardanico> although they're kind of outdated by using --os:standalone with --gc:none while now you can use --os:any + mm:arc |
| 12:30:34 | FromDiscord | <creative> ah thanks |
| 12:48:27 | * | rockcavera quit (Remote host closed the connection) |
| 13:05:45 | * | rockcavera joined #nim |
| 13:10:29 | * | xet7 quit (Ping timeout: 268 seconds) |
| 13:20:00 | * | rockcavera quit (Remote host closed the connection) |
| 14:10:54 | * | PMunch quit (Quit: Leaving) |
| 14:25:38 | FromDiscord | <Ayy Lmao> What's the best way to use some c headers that need to be included in a specific order? |
| 14:29:44 | FromDiscord | <demotomohiro> Ask c header author to fix the c headers so that they can be included in any order. |
| 14:45:13 | * | kenran quit (Remote host closed the connection) |
| 14:58:38 | * | progranner joined #nim |
| 15:18:43 | * | progranner quit (Ping timeout: 276 seconds) |
| 15:18:50 | NimEventer | New thread by ringabout: How could I set up an i386 CI for Nim?, see https://forum.nim-lang.org/t/10069 |
| 15:43:05 | * | arkurious joined #nim |
| 15:59:47 | FromDiscord | <michaelb.eth> In reply to @System64 "if((str.len and 1).bool) better": zero isn’t falsy in Nim so `str.len and 1` is problematic |
| 16:00:24 | FromDiscord | <michaelb.eth> (edit) "is problematic" => "won’t work like you want" |
| 16:01:02 | FromDiscord | <michaelb.eth> actually maybe converters kick in, should have. Hacked before replying… |
| 16:01:16 | FromDiscord | <michaelb.eth> (edit) "have. Hacked" => "have checked" |
| 16:08:03 | FromDiscord | <Rika> In reply to @michaelb.eth "zero isn’t falsy in": str.len and 1 is not what you think it is |
| 16:08:22 | FromDiscord | <Rika> its a bitwise and |
| 16:08:41 | FromDiscord | <Rika> nim bitwise ops share the same operator keyword as boolean ops |
| 16:08:44 | FromDiscord | <Rika> overloaded by type |
| 16:08:45 | FromDiscord | <michaelb.eth> yep, should have had coffee first 😄 |
| 16:09:04 | FromDiscord | <michaelb.eth> I was just about to retract |
| 16:11:10 | FromDiscord | <Rika> haha |
| 16:11:16 | FromDiscord | <Rika> too quick for you |
| 16:11:39 | FromDiscord | <michaelb.eth> I tend to use bitops, though it’s a bit annoying how prior to 1.6 (I think, or maybe 1.4) bitand and bitor, et al. are not variadic |
| 16:18:33 | FromDiscord | <michaelb.eth> In reply to @sOkam! "how do you correctly": nim-stew’s `string.fromBytes` in its `byteutils` may be of help |
| 16:18:44 | FromDiscord | <michaelb.eth> (edit) "In reply to @sOkam! "how do you correctly": nim-stew’s `string.fromBytes` in its `byteutils` ... may" added "module" |
| 16:22:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @michaelb.eth "zero isn’t falsy in": Why not treating zero and nil as falsy? |
| 16:24:41 | FromDiscord | <Rika> In reply to @System64 "Why not treating zero": nim has no concept of truthiness |
| 16:24:54 | FromDiscord | <Rika> if its not a boolean, it isnt treated as one |
| 16:25:16 | FromDiscord | <Rika> but technically nim DOES has some sense of truthiness actually |
| 16:25:37 | FromDiscord | <Rika> integers that are 0, when converted to bool explicitly, will be false |
| 16:25:43 | FromDiscord | <Rika> numbers rather |
| 17:31:10 | * | TakinOver quit (Ping timeout: 265 seconds) |
| 17:31:28 | * | rockcavera joined #nim |
| 17:34:12 | * | TakinOver joined #nim |
| 17:52:15 | * | kenran joined #nim |
| 18:02:48 | * | jmdaemon joined #nim |
| 18:37:23 | * | deadmarshal quit (Quit: IRCNow and Forever!) |
| 18:53:50 | * | deadmarshal_ joined #nim |
| 19:12:13 | * | tiorock joined #nim |
| 19:12:13 | * | tiorock quit (Changing host) |
| 19:12:14 | * | tiorock joined #nim |
| 19:12:14 | * | rockcavera is now known as Guest3404 |
| 19:12:14 | * | tiorock is now known as rockcavera |
| 19:16:06 | * | Guest3404 quit (Ping timeout: 255 seconds) |
| 19:29:19 | * | lucasta quit (Remote host closed the connection) |
| 19:44:09 | * | kenran quit (Remote host closed the connection) |
| 19:53:52 | FromDiscord | <guttural666> nimsuggest/nimlsp not working is a really shite situation, nim is now a pain in the ass to program in |
| 20:07:59 | * | advesperacit quit () |
| 20:12:03 | * | progranner joined #nim |
| 20:12:45 | * | progranner quit (Read error: Connection reset by peer) |
| 20:25:01 | FromDiscord | <hellerbarde> What is the idiomatic way to "execv" a process in nim, i.e. inheriting the process id?↵(Equivalent to "exec $programname" in shell script.) |
| 20:25:05 | FromDiscord | <hellerbarde> s |
| 20:28:32 | * | TakinOver quit (Ping timeout: 250 seconds) |
| 20:30:53 | FromDiscord | <Nerve> In reply to @hellerbarde "What is the idiomatic": `osproc.execCmdEx` |
| 20:38:45 | * | rockcavera is now known as Guest8996 |
| 20:38:45 | * | tiorock joined #nim |
| 20:38:45 | * | Guest8996 quit (Killed (cadmium.libera.chat (Nickname regained by services))) |
| 20:38:45 | * | tiorock is now known as rockcavera |
| 20:54:25 | FromDiscord | <Takemichi Hanagaki> In reply to @guttural666 "nimsuggest/nimlsp not working is": I see your point, often I have problems with nimsuggest. Time to check code, to get references... And memory usage...↵Today, nimsuggest was using every available memory space... |
| 20:57:41 | * | qpls1908 joined #nim |
| 20:58:01 | qpls1908 | What is the type of {1: "foo"}? |
| 20:58:04 | qpls1908 | and where is this documented? |
| 20:58:16 | qpls1908 | I am trying to learn nim, and I see things like {1: "foo"}.newTable |
| 20:58:28 | qpls1908 | which seems odd, since I would think {} is already a dict of some sort |
| 20:58:34 | qpls1908 | but it seems to be an array of tuples |
| 20:59:03 | qpls1908 | though I can't figure out where the syntax is documented |
| 21:01:52 | FromDiscord | <Marcus> Anyone have a Github actions setup for building nim apps for arm as well as x86? |
| 21:20:29 | FromDiscord | <demotomohiro> @qpls1908 It is documented in https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor↵and↵https://nim-lang.org/docs/tables.html#newTable%2CopenArray%5B%5D |
| 21:26:25 | FromDiscord | <huantian> In reply to @Marcus "Anyone have a Github": no examples but you'd want to look at using <https://nim-lang.org/docs/nimc.html#crossminuscompilation> to point to the gcc-arm-none-eabi` package which i think ubuntu has |
| 21:26:28 | FromDiscord | <huantian> (edit) "gcc-arm-none-eabi`" => "`gcc-arm-none-eabi`" |
| 21:33:02 | FromDiscord | <hellerbarde> But the documentation says that this returns a result. I am looking for the proc that will replace the process, like execv, execve, etc do.↵(@Nerve) |
| 21:35:36 | FromDiscord | <Elegantbeef> You can always import execv and friends, but execCmdEx is blocking so for most intents it's the same |
| 21:36:57 | FromDiscord | <hellerbarde> Afaik it will create another level in the process hierarchy which is what i am looking to avoid.↵I will look into importing execv then. Thanks 👍 |
| 21:38:28 | FromDiscord | <demotomohiro> @hellerbarde As far as I know, there is no proc that will replace the process in stdlib.↵So you would need to use procs in posix module. |
| 21:39:39 | FromDiscord | <Elegantbeef> Matrix reactions do not propagate to discord and vice versa |
| 21:43:10 | FromDiscord | <hellerbarde> Oh. Ok. @demotomohiro\: thanks! |
| 22:01:09 | * | Notxor quit (Quit: Leaving) |
| 23:00:59 | * | jmdaemon quit (Ping timeout: 248 seconds) |
| 23:04:35 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4sG7 |
| 23:05:29 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4sG7" => "https://play.nim-lang.org/#ix=4sG8" |
| 23:19:14 | FromDiscord | <kiell> are db_ modules usable in nimscript? |
| 23:21:20 | * | jmdaemon joined #nim |
| 23:36:06 | FromDiscord | <Ayy Lmao> Is there not a way to deal with multiple c headers that need to be included in a specific order? I am having a lot of trouble with this. |
| 23:47:49 | FromDiscord | <Elegantbeef> @kiell\: no |
| 23:48:02 | FromDiscord | <Elegantbeef> Ayylmao use `emit` perhaps |
| 23:48:44 | FromDiscord | <Ayy Lmao> In reply to @Elegantbeef "<@109181558149120000>\: no": The emit pragma works but how do I use it from the module's scope so that the user of the module doesn't have to worry about it? |
| 23:49:08 | FromDiscord | <Ayy Lmao> In order for it to work you have to emit the include header code in the user code |
| 23:50:48 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4sGb |
| 23:51:25 | FromDiscord | <Elegantbeef> `allocCstringArray` |
| 23:51:38 | FromDiscord | <sOkam!> there is no way around allocating i assume? |
| 23:51:56 | FromDiscord | <Elegantbeef> Put the emit at the top level of your module?↵(@Ayy Lmao) |
| 23:52:04 | FromDiscord | <Elegantbeef> Correct a cstring array is a nil terminated cstring collection |
| 23:52:14 | FromDiscord | <Elegantbeef> So there is no way of doing it without allocating |
| 23:52:48 | FromDiscord | <Ayy Lmao> In reply to @Elegantbeef "Put the emit at": It doesn't end up emitting it in the user code if I do that. |
| 23:53:09 | FromDiscord | <Ayy Lmao> And then it says I have undefined things |
| 23:53:32 | FromDiscord | <Elegantbeef> Could you compile the C files instead? |
| 23:53:48 | FromDiscord | <Elegantbeef> Alternatively you could use a `include` as ugly as it is |
| 23:54:44 | FromDiscord | <Ayy Lmao> Yeah I had it working on windows without using the header files but I couldn't get it to work on webassembly properly for some reason. I suspect maybe it had to do with a bunch of platform specific code in the header files. |
| 23:56:26 | FromDiscord | <Ayy Lmao> I tried making my own c header file with the includes in the right order but that doesn't seem to work either |
| 23:58:34 | FromDiscord | <Elegantbeef> What files are you including? |
| 23:59:07 | FromDiscord | <Ayy Lmao> sent a code paste, see https://play.nim-lang.org/#ix=4sGc |