00:01:11 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1028819443494690856/unknown.png |
00:01:16 | FromDiscord | <jos> why does this work in nim playground |
00:03:38 | FromDiscord | <Elegantbeef> Cause it's a global i'd guess |
00:04:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cIF |
00:04:06 | FromDiscord | <jos> :cartsweat: |
00:04:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cIG |
00:05:22 | FromDiscord | <jos> confused but i'll figure it out i guess |
00:09:11 | FromDiscord | <Elegantbeef> I honestly didnt know that global ref constants worked |
00:09:49 | FromDiscord | <jos> weird, I turned everything into a normal object instead of a ref object and I still have issues |
00:10:06 | FromDiscord | <jos> oh but it has some seqs which I guess are reference types? |
00:10:13 | FromDiscord | <jos> and idk what patty does under the hood |
00:10:21 | FromDiscord | <Elegantbeef> Seqs can be in constants |
00:10:21 | FromDiscord | <Elegantbeef> `nim c yourNimFile` |
00:10:33 | FromDiscord | <jos> it still just gives the same error |
00:10:41 | FromDiscord | <Elegantbeef> you can do `nim c --expandMacro:macroName` |
00:11:17 | FromDiscord | <Elegantbeef> Patty's macro highly unlikely does something that doesnt work on the VM |
00:11:28 | FromDiscord | <Elegantbeef> It's just rearranging basic constructs |
00:11:43 | FromDiscord | <jos> mm |
00:11:50 | FromDiscord | <jos> no clue then, that was my best guess |
00:11:59 | FromDiscord | <jos> oh |
00:12:05 | FromDiscord | <jos> there is one ref type left actually |
00:28:15 | * | derpydoo joined #nim |
01:03:01 | FromDiscord | <Girvo> Hi all |
01:03:53 | FromDiscord | <Girvo> Question: is there a particular approach I should be taking to reduce memory usage for an async TCP server (asyncdispatch based)? My server keeps getting OOM-reaped over time. There are a _lot_ of connections to be fair, but most of them get dropped |
01:03:59 | FromDiscord | <Girvo> (in a 10 second timeout per conn) |
01:20:20 | * | wallabra_ joined #nim |
01:22:20 | * | wallabra quit (Ping timeout: 268 seconds) |
01:22:20 | * | wallabra_ is now known as wallabra |
01:28:40 | * | wallabra quit (Ping timeout: 246 seconds) |
01:33:01 | * | wallabra joined #nim |
02:15:49 | * | arkurious quit (Quit: Leaving) |
02:20:28 | * | derpydoo quit (Ping timeout: 246 seconds) |
02:31:51 | * | xet7 joined #nim |
02:40:25 | * | jkl quit (Quit: Gone.) |
02:41:47 | * | jkl joined #nim |
02:43:59 | * | kenran joined #nim |
03:49:25 | FromDiscord | <impbox [ftsf]> what's the method to determine if threads are enabled? |
03:49:39 | FromDiscord | <Elegantbeef> `compileOption("threads")` |
03:49:41 | FromDiscord | <impbox [ftsf]> `when defined(threads):` doesn't seem to work, since it's not defined |
03:49:42 | FromDiscord | <impbox [ftsf]> ahh |
03:49:43 | FromDiscord | <impbox [ftsf]> thanks |
04:09:28 | FromDiscord | <elcritch> In reply to @Girvo "Question: is there a": are you using ORC or ARC? It's easy to end up with cycles with async |
04:09:58 | * | om3ga quit (Quit: Bye) |
04:10:10 | FromDiscord | <Elegantbeef> Isnt chronos cycle-less? |
04:10:39 | * | om3ga joined #nim |
04:25:42 | FromDiscord | <ringabout> chronos is supposed to have gotten rid of cycles. |
04:31:09 | * | derpydoo joined #nim |
04:35:10 | * | kenran quit (Remote host closed the connection) |
04:38:51 | FromDiscord | <Rika> He says he uses asyncdispatch |
04:39:14 | FromDiscord | <Rika> I don’t know where the hell y’all got chronos from |
05:28:25 | * | derpydoo quit (Ping timeout: 246 seconds) |
05:43:46 | * | tops joined #nim |
05:53:08 | * | kenran joined #nim |
06:15:38 | NimEventer | New thread by wilsonywx2: Inconsistent behavior with object slicing under different gc modes, see https://forum.nim-lang.org/t/9518 |
06:19:26 | * | kenran quit (Remote host closed the connection) |
06:19:43 | * | kenran joined #nim |
06:29:55 | * | kenran quit (Remote host closed the connection) |
06:31:02 | * | kenran joined #nim |
06:33:35 | * | vicecea quit (Remote host closed the connection) |
07:08:40 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/pull/20529 any idea ? it break pathnorm now |
07:09:12 | FromDiscord | <Bung> I only modified two places, more specific to generic and array |
07:18:35 | FromDiscord | <halc> no errors |
07:18:37 | FromDiscord | <halc> sent a code paste, see https://play.nim-lang.org/#ix=4cJq |
07:18:38 | FromDiscord | <halc> is this a bug? |
07:18:53 | FromDiscord | <halc> (edit) "https://play.nim-lang.org/#ix=4cJq" => "https://play.nim-lang.org/#ix=4cJr" |
07:20:12 | FromDiscord | <Rika> `3..^1` is `3..2` which is "valid" and will give an empty seq i believe |
07:20:22 | FromDiscord | <Elegantbeef> Yep high to low range |
07:20:35 | FromDiscord | <Elegantbeef> A slice that has a length \<=0 returns nothing |
07:20:59 | FromDiscord | <Elegantbeef> Actually no |
07:21:29 | FromDiscord | <Elegantbeef> `3..2` is fine but `4..2` is an index error |
07:24:18 | FromDiscord | <halc> In reply to @Rika "`3..^1` is `3..2` which": I just found it strange that it will compile, although the way I found out, the empty seq actually worked in my favour lol |
07:24:41 | FromDiscord | <Rika> i dont know why its "valid" |
07:25:35 | FromDiscord | <Elegantbeef> Wager it's the `^^` operator inside the `[]` |
07:25:50 | FromDiscord | <halc> In reply to @Elegantbeef "Wager it's the `^^`": yep, was just about to say |
07:25:55 | FromDiscord | <halc> cause I just looked at the source |
07:27:24 | FromDiscord | <halc> sent a code paste, see https://play.nim-lang.org/#ix=4cJs |
07:27:34 | FromDiscord | <halc> `^1` becomes `s.len-1` |
07:28:10 | FromDiscord | <halc> `s.len - s.len-1 + 1` = 0 |
07:28:14 | FromDiscord | <halc> so you get an empty seq |
07:28:50 | FromDiscord | <Elegantbeef> Yea a weird case where a == ^b |
07:29:37 | FromDiscord | <halc> though I guess it's not really the `^^` operator's fault, cause as rika said, even `s.len..s.high` is valid |
07:34:19 | FromDiscord | <Rika> what is ^^ supposed to signify |
07:34:25 | FromDiscord | <Rika> i sure love operators |
07:35:40 | FromDiscord | <JustADigimon (she/her)> question, for what is used `assert` |
07:36:04 | FromDiscord | <Elegantbeef> asserting logic holds |
07:36:14 | FromDiscord | <JustADigimon (she/her)> uh? |
07:36:29 | FromDiscord | <Rika> to make sure something is true |
07:36:39 | FromDiscord | <Rika> or something is as you expect it to be |
07:36:43 | FromDiscord | <JustADigimon (she/her)> oki |
07:37:54 | FromDiscord | <Elegantbeef> Commonly you use it inside of procedures where some condition should be held |
07:38:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJv |
07:50:06 | FromDiscord | <ringabout> Would colorful mismatched parameters be more intuitive https://forum.nim-lang.org/t/9514#62515 ? |
07:50:14 | FromDiscord | <ringabout> (edit) "Would colorful mismatched parameters be more intuitive ... https://forum.nim-lang.org/t/9514#62515" added "than" |
07:51:36 | FromDiscord | <Elegantbeef> Likely would be helpful, i do wonder if there is any reason to include parameter names/proc name in a mismatch |
07:52:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJy |
07:53:16 | FromDiscord | <Elegantbeef> I know it's just due to rendering the header, but given it's a type mismatch with the same parameters that's a lot of noise |
07:53:59 | FromDiscord | <ringabout> Yeah, it probably helps find the original definition for some cases. |
07:59:15 | FromDiscord | <matkuki> In reply to @treeform "Its currently kind of": Ah, thanks for the information 👍 |
08:02:43 | * | PMunch joined #nim |
08:03:07 | PMunch | Hmm, I have some trouble building nimlsp on the latest devel |
08:03:26 | PMunch | I just get this error: /home/peter/.nimble/pkgs/ast_pattern_matching-1.0.0/ast_pattern_matching.nim(575, 28) Error: invalid indentation |
08:03:50 | PMunch | 1.6.8 works fine |
08:04:54 | FromDiscord | <ezquerra> sent a code paste, see https://play.nim-lang.org/#ix=4cJA |
08:05:00 | FromDiscord | <Elegantbeef> Devel removed the postfix pragma↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
08:05:17 | FromDiscord | <Elegantbeef> Damn it i mentioned pmunch |
08:05:26 | FromDiscord | <ringabout> Yeah, see https://github.com/nim-lang/Nim/pull/20199 |
08:05:31 | FromDiscord | <Elegantbeef> Devel has a bunch of deprecated features removed |
08:06:05 | PMunch | Aaah, right |
08:06:17 | FromDiscord | <Elegantbeef> ezquerra https://github.com/beef331/slicerator/blob/master/src/slicerator.nim#L42 |
08:06:41 | FromDiscord | <ringabout> In reply to @PMunch "Aaah, right": There is a PR for it https://github.com/krux02/ast-pattern-matching/pull/8 you can probably fork it. |
08:07:46 | PMunch | Oh.. |
08:07:52 | PMunch | I've even liked that PR :P |
08:08:06 | PMunch | Apparently I've been down this road before :P |
08:08:10 | FromDiscord | <Elegantbeef> Look at the big brain on pmunch |
08:09:51 | * | rockcavera quit (Remote host closed the connection) |
08:11:22 | FromDiscord | <ringabout> In reply to @PMunch "Apparently I've been down": Would you like to take the maintenance of it? I can also fork it under the umbrella of `nim-lang` since it fails two important packages, |
08:15:32 | PMunch | Hmm, I mean I could take the maintenance of it. But I'd only be able to do small things like this :P |
08:15:38 | PMunch | And accept PRs and such from people |
08:15:49 | PMunch | What's the other package that fails? |
08:16:04 | FromDiscord | <ringabout> https://github.com/metagn/Nim/blob/5c5634ff8ed75b3294f909aa5ec7de854255259f/testament/important_packages.nim#L39 |
08:16:06 | FromDiscord | <ringabout> Itself |
08:16:39 | FromDiscord | <ringabout> Removing `--oldgensym:on` should be ok though. |
08:16:56 | FromDiscord | <Elegantbeef> Nim2.0 seems like a lot of people will be inheriting old code 😄 |
08:21:09 | FromDiscord | <ezquerra> Thanks @ElegantBeef, but why does it not work? |
08:21:25 | FromDiscord | <Elegantbeef> cause `mitems` needs a mutable type |
08:21:52 | FromDiscord | <Elegantbeef> `reversed(mySeq)` returns a new sequences not a mutable reference to the original |
08:22:02 | FromDiscord | <ezquerra> Ah |
08:22:17 | FromDiscord | <Elegantbeef> It's much better to use the iterator i provided as it doesnt allocate |
08:22:21 | FromDiscord | <ezquerra> So it copies the values in the original sequence? |
08:22:43 | FromDiscord | <Elegantbeef> Yes it makes a new sequence based off the original but with values in reverse |
08:23:01 | FromDiscord | <ezquerra> 🤦♂️ |
08:23:42 | FromDiscord | <ezquerra> I mean I guess that might be what you want to do in some cases, but it is surprising that there is no built-in way to do that |
08:24:07 | FromDiscord | <Elegantbeef> 'PRs welcome' |
08:26:09 | FromDiscord | <Bung> so you wanna chained reverse with mitems |
08:27:06 | FromDiscord | <Elegantbeef> yea they want the iterator i provided in the stdlib |
08:27:44 | FromDiscord | <ezquerra> Yes |
08:28:32 | FromDiscord | <Bung> {.outParamsAt: [1],discardable.} will be sufficient I guess |
08:28:48 | FromDiscord | <Elegantbeef> What? |
08:29:02 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/commit/e83f27e6a0f52f167e8eb91cd8f60be62d6725c6 |
08:29:46 | FromDiscord | <Elegantbeef> I dont see how out parameters relate to a iterator |
08:30:30 | FromDiscord | <Elegantbeef> They want to iterate over a sequence in reverse using mitems |
08:30:51 | FromDiscord | <Bung> I may wrong , it's like out parameters doesn't return the param ? |
08:31:05 | FromDiscord | <Elegantbeef> out parameters are just a more exact usage of `var T` |
08:31:21 | FromDiscord | <Elegantbeef> It doesnt make any difference with `for x in reverse(mySeq).mitems` |
08:33:16 | FromDiscord | <Bung> I still not understand well with `out` or `var` in return type, thought one of these will be sufficient to this case |
08:33:28 | FromDiscord | <Elegantbeef> `out` is not for return types |
08:33:35 | FromDiscord | <Elegantbeef> out is for definitive assignment mutable parameters |
08:34:15 | FromDiscord | <Elegantbeef> It's a more exact usage of version of `var T` for things like `parseInt(s, myInt)` |
08:34:25 | FromDiscord | <Elegantbeef> It errors if you do not assign `myInt` inside the proc |
08:39:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJN |
08:41:39 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/blob/0d23419e681c4ce561ec43dc4a66a0ed40b8009e/tests/init/tinitchecks_v2.nim#L40 this case ? |
08:42:04 | FromDiscord | <Elegantbeef> Yes |
08:42:10 | FromDiscord | <Elegantbeef> That's all it's meant for |
08:43:58 | FromDiscord | <Bung> hmm, I don't see it used widely |
08:44:28 | FromDiscord | <Elegantbeef> Like i said it's just a more exact `var` parameter |
08:45:15 | FromDiscord | <Bung> yeah, more strict |
08:45:18 | FromDiscord | <Elegantbeef> Given araq also added `strictDef` when there is going to be default object values it's weird |
08:46:18 | FromDiscord | <Elegantbeef> > With `experimental: "strictDefs"` every local variable must be initialized explicitly before it can be used↵Sounds like "I dont care about new intialisers" |
08:47:13 | FromDiscord | <Bung> uh, how that work with `{.noInit.}` |
08:47:37 | FromDiscord | <Elegantbeef> Dont look at me |
08:47:46 | FromDiscord | <Elegantbeef> I dont get the want of definitive assignment |
08:49:20 | FromDiscord | <Bung> so many ideas coming for match user's intention |
08:51:59 | FromDiscord | <Elegantbeef> Like `strictDef`conflicts so hard with https://github.com/nim-lang/Nim/pull/20480 |
08:52:44 | FromDiscord | <Elegantbeef> And araq says\: "... is solid and it is expected that eventually this mode becomes the default in later versions." |
08:52:55 | FromDiscord | <Elegantbeef> Like... how do these coincide |
08:53:25 | FromDiscord | <ringabout> In reply to @Elegantbeef "Like `strictDef`conflicts so hard": It is not anymore after a patch. |
08:53:37 | FromDiscord | <ringabout> https://github.com/nim-lang/Nim/pull/20508 |
08:53:48 | FromDiscord | <Elegantbeef> Jesus |
08:53:59 | FromDiscord | <Elegantbeef> I was so happy about that being merged |
08:54:02 | FromDiscord | <Elegantbeef> Fuck this is dumb |
08:56:10 | FromDiscord | <Elegantbeef> I'll be shaking my head for a while |
08:58:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJS |
09:00:51 | FromDiscord | <ringabout> That's probably the reason that the DAA RFC got many downvotes. |
09:01:11 | FromDiscord | <Elegantbeef> Well the definitive assignment doesnt solve any issues |
09:01:24 | FromDiscord | <Elegantbeef> It only removes parts of the language that are good |
09:01:44 | FromDiscord | <Elegantbeef> Like this is a step back towards C |
09:02:37 | FromDiscord | <ringabout> I thought it is designed for figuring out implicit result issues. |
09:02:52 | FromDiscord | <Elegantbeef> Except it applies to all fields |
09:02:55 | FromDiscord | <Elegantbeef> Sorry variables |
09:04:07 | FromDiscord | <ringabout> We can bring out it back easily if daa cannot work well in 2.x. |
09:04:15 | FromDiscord | <ringabout> (edit) removed "out" |
09:04:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJU |
09:04:45 | FromDiscord | <Elegantbeef> I mean it's an experimental feature so no one is really going to use it and then it'll suddenly be turned on or off depending on how araq feels |
09:05:00 | FromDiscord | <ringabout> (edit) "We can bring it back easily ... if" added "without breaking changes" |
09:05:53 | FromDiscord | <Elegantbeef> Ensuring `result` is used is a fantastic thing, but suggesting features that make Nim nice to use will be suddenly changed to a tedious API is quite odd. Eh i might just be tired and grouchy |
09:06:22 | FromDiscord | <ringabout> Yeah |
09:14:54 | FromDiscord | <Bung> why not let user code point out which the `result` is when implicit result becoming difficult to compiler. |
09:26:47 | * | adium quit (Ping timeout: 265 seconds) |
09:36:34 | * | ggsx joined #nim |
09:47:24 | * | ggsx quit (Quit: Client closed) |
09:52:54 | * | ggsx joined #nim |
10:14:01 | * | jmdaemon quit (Ping timeout: 246 seconds) |
10:32:01 | * | ggsx quit (Quit: Client closed) |
10:33:04 | * | adium joined #nim |
10:52:39 | NimEventer | New thread by inv2004: Term rewriting template question, see https://forum.nim-lang.org/t/9519 |
10:53:58 | * | ggsx joined #nim |
11:08:16 | * | xcodz-dot joined #nim |
11:10:54 | xcodz-dot | Anybody here familiar with basics of Pixie? |
11:16:20 | NimEventer | New Nimble package! ytcc - CLI tool to get Youtube video captions (with chapters), see https://git.ozzuu.com/thisago/ytcc |
11:20:28 | FromDiscord | <Rika> In reply to @xcodz-dot "Anybody here familiar with": Kinda, what’s the issue? |
11:23:42 | * | kenran quit (Remote host closed the connection) |
11:26:03 | xcodz-dot | Well, I have been trying to integrate it with my animation creation library but there is this one issue. I am using its python bindings and i am also using pygame library. Is their anyway to convert the pixie image to pygame surface or convert it into raw data string or something similar? |
11:26:18 | * | kenran joined #nim |
11:29:24 | FromDiscord | <Rika> What formats can that Python library read? |
11:49:54 | * | ggsx quit (Quit: Client closed) |
11:57:09 | * | xcodz-dot quit (Ping timeout: 250 seconds) |
12:01:21 | * | ggsx joined #nim |
12:02:48 | * | wallabra quit (Ping timeout: 264 seconds) |
12:11:05 | * | ggsx quit (Quit: Client closed) |
12:20:02 | * | xcodz-dot joined #nim |
12:41:12 | xcodz-dot | Sorry for leaving you there Rika, the python library accepts a raw RGBA/RGB string. the pixel data is stored in 8-bit per pixel (3 characters per RGB pixel/4 chars per RGBA pixel). The size does not need to be encoded as it shall be directly passed to the library as a separate argument. |
12:46:49 | FromDiscord | <Rika> I know how to do it in an unsafe manner but I’m trying to see if it’s possible to do it safely (without writing that much code) |
12:46:51 | * | derpydoo joined #nim |
12:55:27 | * | xcodz-dot quit (Ping timeout: 268 seconds) |
13:07:56 | * | arkurious joined #nim |
13:19:08 | qwr | it seems the essence of DAA RFC is that var x: T must be written in future as var x = default(T), and without that all code paths should assign to x? |
13:19:38 | FromDiscord | <Rika> That sounds annoying |
13:20:11 | FromDiscord | <Generic> blah I loved using implicitly initialized result |
13:20:46 | FromDiscord | <Generic> it made procs super compact and boilerplate free |
13:20:47 | qwr | i also like the current syntax, in a way it wouldn't be a big thing, but the new syntax is... a bit verbose |
13:21:37 | FromDiscord | <Generic> also I think the majority of those issues which DAA is supposed to solve would have been solved by not nil as well |
13:21:39 | qwr | and currently its very nice to declare empty seqs that way |
13:22:01 | FromDiscord | <Generic> yeah |
13:22:23 | * | qwr would like not nil as default |
13:22:37 | * | xet7 quit (Quit: Leaving) |
13:24:42 | FromDiscord | <auxym> agreed |
13:25:56 | * | xet7 joined #nim |
13:33:45 | * | xcodz-dot joined #nim |
13:41:33 | FromDiscord | <Bung> can the azure pipelines modify task order ? I always see `nim-lang.Nim` is the latest and be `Queued` state |
13:43:13 | FromDiscord | <Bung> when make a PR I hope it is the first one. |
13:45:33 | FromDiscord | <ringabout> Why? I think it is the summary of other pipelines, which finishes when others are completed. |
13:47:18 | FromDiscord | <SaAnd> I found a new bug, what do I call this? https://play.nim-lang.org/#ix=4cKH |
13:47:29 | FromDiscord | <SaAnd> maybe not new, but still |
13:49:00 | * | vicecea joined #nim |
13:49:14 | FromDiscord | <Bung> doesn't it is the one run own tests of nim repo ? |
13:49:59 | FromDiscord | <Bung> oh, I see, `packages Linux_amd64` also does |
13:50:07 | FromDiscord | <ringabout> In reply to @Bung "doesn't it is the": https://media.discordapp.net/attachments/371759389889003532/1029028053151645727/unknown.png |
13:50:17 | FromDiscord | <ringabout> Yeah |
13:51:36 | FromDiscord | <Bung> I get it |
14:04:31 | * | PMunch quit (Ping timeout: 268 seconds) |
14:09:28 | FromDiscord | <konsumlamm> In reply to @Elegantbeef "what's wrong with the": i find it a lot cleaner to do `var a = ""` (it's also shorter), as you don't have to know what it implicitly initializes to (or wether it even does that) |
14:09:52 | FromDiscord | <konsumlamm> In reply to @Generic "it made procs super": it also makes it easy to forget initializing it, which can lead to bugs |
14:12:40 | * | xcodz-dot quit (Quit: Leaving) |
14:18:07 | FromDiscord | <Generic> In reply to @konsumlamm "i find it a": that doesn't work for seqs |
14:21:39 | FromDiscord | <Generic> In reply to @konsumlamm "it also makes it": with nilseqs gone most datastructures are usable without explicit initialization |
14:24:40 | FromDiscord | <Generic> to me it seems like that the case where someone accidantally forgets to return something so it will use the default value of result seems to me better solved with just a warning for this exact case |
14:24:54 | FromDiscord | <Generic> + not nil |
14:38:53 | * | rockcavera joined #nim |
14:38:53 | * | rockcavera quit (Changing host) |
14:38:53 | * | rockcavera joined #nim |
14:39:25 | * | kenran quit (Remote host closed the connection) |
14:54:24 | * | derpydoo quit (Ping timeout: 264 seconds) |
15:28:41 | FromDiscord | <Horizon [She/Her]> In reply to @Generic "with nilseqs gone most": Nil seqs? |
15:28:55 | FromDiscord | <Rika> seqs used to be nilabel |
15:28:57 | FromDiscord | <Rika> (edit) "nilabel" => "nilable" |
15:34:01 | * | ggsx joined #nim |
15:36:42 | ggsx | is there something in nim like c11 anonymous structures (pre-c11 in -ms-extensions)? |
15:36:46 | ggsx | http://port70.net/~nsz/c/c11/n1570.html#6.7.2.1p19 |
15:38:53 | FromDiscord | <pyryrin> how do i get the generated c code3 |
15:40:27 | * | kenran joined #nim |
15:41:02 | FromDiscord | <Bung> `PASS: tests/stdlib/tdb_mysql.nim c ( 134m ( 7.01 sec)` testament wrong measure ? |
15:43:03 | qwr | thinking about the DAA RFC, imho best "fix" for it would be annotation/flag for types to mark them as default-initializable (maybe even allowing custom default values on type definition) |
15:44:10 | qwr | that way it the logical case where current logic works well (seqs, hashtables, etc) could be easily retained without creating any inbuilt special cases |
15:44:22 | FromDiscord | <Rika> In reply to @ggsx "is there something in": no |
15:44:45 | FromDiscord | <Rika> a similar idea is tuples but its not exact |
15:45:05 | FromDiscord | <Rika> actually no, even then they would not be anonymous as fields |
15:50:12 | qwr | hm, there is actually really easy way to make the current DAA RFC palatable - define functions like: func seq[T](): seq[T] = @[] |
15:50:33 | qwr | then you simply write var foo = seq[string]() |
15:54:05 | qwr | only 2 characters more, and convois explicitly the intent |
15:55:43 | * | kenran quit (Remote host closed the connection) |
16:14:05 | * | hochata joined #nim |
16:35:02 | FromDiscord | <Phil> Sometimes I just effing hate generics and how they bind |
16:37:35 | FromDiscord | <Phil> sent a long message, see http://ix.io/4cLs |
16:38:28 | FromDiscord | <Phil> (edit) "http://ix.io/4cLs" => "http://ix.io/4cLt" |
16:39:02 | FromDiscord | <Phil> (edit) "http://ix.io/4cLt" => "http://ix.io/4cLu" |
16:43:34 | FromDiscord | <Phil> Wait, nevermind, its literally worse, it doesn't even bind when I export the constants |
17:04:29 | * | ggsx quit (Quit: Client closed) |
17:04:45 | FromDiscord | <Horizon [She/Her]> In reply to @Rika "seqs used to be": Ah |
17:09:28 | FromDiscord | <Anna Aurora 🇪🇺🏳🌈> Is there any library for handling XDG base directory paths? e.g. should `~/.config` or `$XDG_CONFIG_HOME` be used. |
17:14:29 | * | vsantana joined #nim |
17:27:56 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix= |
17:28:25 | FromDiscord | <ravinder387> request is undeclared can i know which package request function contain |
17:37:02 | FromDiscord | <gibson> @pyryrin `-c` is compile to intermediate code only. By default it's in some user cache dir, you can specify location with `--nimcache:<path>` but neither option requires the other to work, but they are often useful together. |
17:37:48 | FromDiscord | <pyryrin> yeah, actually i dont think that is very useful for me, i looked at the code and could not understand anything at all |
17:38:44 | FromDiscord | <gibson> In reply to @Isofruit "Constant 1 in module": 🙁 I feel you on this. +1 |
17:39:30 | FromDiscord | <auxym> In reply to @Isofruit "Constant 1 in module": sounds weird, might be a bug, can you do a minimal reproduction? |
17:39:31 | FromDiscord | <gibson> In reply to @pyryrin "yeah, actually i dont": More options are to `--embedsrc:on` and that's all I can remember atm, but maybe others from the `-h` will help. |
17:41:03 | FromDiscord | <auxym> In reply to @Anna Aurora 🇪🇺🏳🌈 "Is there any library": https://nim-lang.org/docs/os.html#getConfigDir |
17:41:50 | FromDiscord | <gibson> @pyryrin For readability, you can specify names of interest with the `{.extern: "".}` pragma |
17:43:34 | * | estiquelapice quit () |
17:46:18 | * | vsantana left #nim (#nim) |
17:52:35 | * | hochata quit (Ping timeout: 268 seconds) |
18:01:07 | * | dza joined #nim |
18:46:43 | NimEventer | New Nimble package! aspartame - More syntactic sugar for Nim, see https://git.sr.ht/~xigoi/aspartame |
18:48:39 | * | jmdaemon joined #nim |
18:54:00 | * | wallabra joined #nim |
19:06:03 | strogon14 | Is there a quick way to determine which nim version I need to require in my package's .nimble file? |
19:15:06 | FromDiscord | <Phil> If your project compiles with your current nim version, choose that nim version I'd say |
19:23:02 | strogon14 | Ok. So there's no documentation, for example, when which std lib module was added or changed significantly? Except going through the changelog, of course. |
19:43:42 | * | tops quit (Ping timeout: 268 seconds) |
19:43:47 | FromDiscord | <Generic> git blame? |
19:53:37 | strogon14 | Well, I was looking for a *quick* way. I guessI'll just require >= 1.6 then. |
19:56:21 | * | tops joined #nim |
19:59:44 | * | tops_ joined #nim |
20:01:11 | * | tops quit (Ping timeout: 260 seconds) |
20:02:13 | * | tops joined #nim |
20:05:16 | * | tops_ quit (Ping timeout: 260 seconds) |
20:09:03 | * | tops_ joined #nim |
20:11:54 | * | tops quit (Ping timeout: 244 seconds) |
20:19:35 | NimEventer | New post on r/nim by g_dl: Multithreaded genetic algorithm playing Tetris that I wrote in Nim some years ago, see https://reddit.com/r/nim/comments/y0ov8g/multithreaded_genetic_algorithm_playing_tetris/ |
20:21:27 | FromDiscord | <wick3dr0se> Do you guys recommend any specific resource for learning Nim? |
20:31:13 | FromDiscord | <gibson> @wick3dr0se https://github.com/StefanSalewski/NimProgrammingBook↵Then the learning resources on the main nim site. |
20:31:53 | FromDiscord | <Generic> I just noticed something |
20:31:56 | FromDiscord | <auxym> In reply to @wick3dr0se "Do you guys recommend": If you're somewhat familiar with programming in general (something like C, java etc), then the officials tutorials are a decent "quick intro" IMO: https://nim-lang.org/docs/tut1.html |
20:32:30 | FromDiscord | <auxym> https://nim-by-example.github.io/getting_started/ is good too |
20:32:30 | FromDiscord | <Generic> if I want to check whether an Option is some and contains a specific value, I don't need to write `optional.isSome and optional.get == value` |
20:32:39 | FromDiscord | <Generic> I can just write `option == some(value)` |
20:33:08 | FromDiscord | <wick3dr0se> Thanks! I found a resource nim-by-example on GitHub. I'll use these as well. I am decent with C, proficent in shell (BASH) |
20:33:21 | FromDiscord | <auxym> In reply to @gibson "<@772217344680001556> https://github.com/StefanSale": this one is more meant towards "absolute programming beginners IIRC", haven't really read it though so I can't comment |
20:33:31 | FromDiscord | <Horizon [She/Her]> https://hastebin.com/ifosahoyoh.properties anyone know why i get this error? I'm using Nim 1.6.8, but i tested it with 1.6.6 too, same error: `/home/raees/.choosenim/toolchains/nim-1.6.8/lib/core/macros.nim(533, 7) Error: no return type declared` |
20:33:38 | FromDiscord | <wick3dr0se> Maybe I should start with that one first then |
20:33:59 | FromDiscord | <auxym> nim by example is good too |
20:34:02 | FromDiscord | <wick3dr0se> It's funny how similar nim is to BASH so far |
20:34:16 | FromDiscord | <wick3dr0se> I like it |
20:34:42 | FromDiscord | <auxym> I beg to disagree, but that might be because I never really learned shell/bash and can't wrap my head around it 😛 |
20:35:23 | FromDiscord | <gibson> In reply to @Event Horizon "https://hastebin.com/ifosahoyoh.properties anyone k": Sounds like your generated proc/func is missing the AST for a return type. Check the generated AST and compare it to the AST of your ideal code built by hand. I learn a lot doing that when making macros. |
20:35:49 | FromDiscord | <wick3dr0se> I have a ton of open projects on my GitHub if you ever want to learn it. I'm obsessed with BASH |
20:36:04 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "Sounds like your generated": It doesn't need a return type though? |
20:36:38 | FromDiscord | <gibson> `void` is a return type, and implied for you normally, unless you are creating AST by hand from macros. |
20:36:52 | FromDiscord | <Horizon [She/Her]> https://play.nim-lang.org/#ix=4cMN |
20:37:11 | FromDiscord | <wick3dr0se> Ima have to make a list of these links |
20:37:26 | FromDiscord | <Horizon [She/Her]> Just put it on `ix` (minus the utils.nim, i just made a template for slowType) |
20:38:06 | FromDiscord | <Horizon [She/Her]> In reply to @gibson "`void` is a return": Ah |
20:40:12 | FromDiscord | <Horizon [She/Her]> Yeah i'm still unsure on the issue, added void to the procs but got `/home/raees/.choosenim/toolchains/nim-1.6.8/lib/core/macros.nim(1396, 6) Error: cannot add to node kind: nnkEmpty`, so im probs misunderstanding something |
20:40:14 | FromDiscord | <gibson> sent a code paste, see https://play.nim-lang.org/#ix=4cMR |
20:41:09 | FromDiscord | <Elegantbeef> `42` likely defaults to the default Nim case statement↵(@gibson) |
20:41:43 | FromDiscord | <gibson> @Horizon [She/Her] Yeah, try making your complete idealized final code by hand, then inspect the AST. I bet there's a radically unexpected different structure catching you by surprise. At least, that's what usually happens to me 🙂 |
20:42:33 | FromDiscord | <gibson> @ElegantBeef Huh, makes sense. Do you know a way I can force it? |
20:42:43 | FromDiscord | <Elegantbeef> Nope |
20:44:02 | FromDiscord | <Horizon [She/Her]> I think i realised the issue |
20:44:42 | FromDiscord | <Horizon [She/Her]> My `fmt` string accesses a template |
20:44:52 | FromDiscord | <Horizon [She/Her]> And that's unrelated to what i thought the issue |
20:44:58 | FromDiscord | <Horizon [She/Her]> So i'm gonna check it now |
20:47:31 | FromDiscord | <Horizon [She/Her]> That was the issue |
20:47:36 | FromDiscord | <Horizon [She/Her]> That was annoying as hell :p |
20:49:56 | FromDiscord | <Horizon [She/Her]> Errors with macros should be improved.. Is there no way to do this> |
20:49:59 | FromDiscord | <Horizon [She/Her]> ? |
20:50:55 | FromDiscord | <Elegantbeef> Macros are user defined compiler passes it's kinda hard to make the errors better |
20:51:48 | FromDiscord | <Horizon [She/Her]> Ah, that's sad |
20:53:04 | FromDiscord | <Horizon [She/Her]> Damn, the proc to check if a component is in an entity is called 5 times, within 3 calls |
20:56:45 | FromDiscord | <Horizon [She/Her]> That was easily fixed |
20:56:53 | FromDiscord | <Scare_Sec_RE43P3R> i can not find anything on nim being a compiled language is it? |
20:56:57 | FromDiscord | <Scare_Sec_RE43P3R> wait whoops |
20:57:00 | FromDiscord | <Scare_Sec_RE43P3R> low level not compiled |
20:57:06 | FromDiscord | <Scare_Sec_RE43P3R> i f'ed that up so bad |
20:57:14 | FromDiscord | <Scare_Sec_RE43P3R> (edit) "compiled" => "low level" |
20:59:21 | FromDiscord | <Horizon [She/Her]> Wonder how difficult it'd be to make a macro that expands component fields onto the entity directly |
21:11:13 | FromDiscord | <Horizon [She/Her]> How do i use a pragma on a type? |
21:11:20 | FromDiscord | <Horizon [She/Her]> Macros are one hell of a drug :p |
21:14:15 | * | derpydoo joined #nim |
21:23:01 | * | hochata joined #nim |
21:27:39 | FromDiscord | <auxym> In reply to @Scare_Sec_RE43P3R "i can not find": kind of subjective, but imo nim works on both levels. it allows a high level of abstraction but also eg manual memory management and pointers if you want to |
21:52:05 | * | rez quit (Ping timeout: 265 seconds) |
21:56:45 | FromDiscord | <Elegantbeef> Ping |
21:57:06 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#special-operators-dot-operators↵(@Horizon [She/Her]) |
22:07:08 | * | jmd_ joined #nim |
22:07:47 | * | jmdaemon quit (Ping timeout: 252 seconds) |
22:14:00 | * | hochata quit (Remote host closed the connection) |
22:52:19 | * | wallabra_ joined #nim |
22:52:28 | * | wallabra quit (Ping timeout: 246 seconds) |
22:54:06 | * | wallabra_ is now known as wallabra |
23:23:28 | * | tops_ left #nim (Leaving) |
23:38:17 | * | derpydoo quit (Ping timeout: 250 seconds) |