<< 10-10-2022 >>

00:01:11FromDiscord<jos> https://media.discordapp.net/attachments/371759389889003532/1028819443494690856/unknown.png
00:01:16FromDiscord<jos> why does this work in nim playground
00:03:38FromDiscord<Elegantbeef> Cause it's a global i'd guess
00:04:01FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cIF
00:04:06FromDiscord<jos> :cartsweat:
00:04:11FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cIG
00:05:22FromDiscord<jos> confused but i'll figure it out i guess
00:09:11FromDiscord<Elegantbeef> I honestly didnt know that global ref constants worked
00:09:49FromDiscord<jos> weird, I turned everything into a normal object instead of a ref object and I still have issues
00:10:06FromDiscord<jos> oh but it has some seqs which I guess are reference types?
00:10:13FromDiscord<jos> and idk what patty does under the hood
00:10:21FromDiscord<Elegantbeef> Seqs can be in constants
00:10:21FromDiscord<Elegantbeef> `nim c yourNimFile`
00:10:33FromDiscord<jos> it still just gives the same error
00:10:41FromDiscord<Elegantbeef> you can do `nim c --expandMacro:macroName`
00:11:17FromDiscord<Elegantbeef> Patty's macro highly unlikely does something that doesnt work on the VM
00:11:28FromDiscord<Elegantbeef> It's just rearranging basic constructs
00:11:43FromDiscord<jos> mm
00:11:50FromDiscord<jos> no clue then, that was my best guess
00:11:59FromDiscord<jos> oh
00:12:05FromDiscord<jos> there is one ref type left actually
00:28:15*derpydoo joined #nim
01:03:01FromDiscord<Girvo> Hi all
01:03:53FromDiscord<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:59FromDiscord<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:25FromDiscord<impbox [ftsf]> what's the method to determine if threads are enabled?
03:49:39FromDiscord<Elegantbeef> `compileOption("threads")`
03:49:41FromDiscord<impbox [ftsf]> `when defined(threads):` doesn't seem to work, since it's not defined
03:49:42FromDiscord<impbox [ftsf]> ahh
03:49:43FromDiscord<impbox [ftsf]> thanks
04:09:28FromDiscord<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:10FromDiscord<Elegantbeef> Isnt chronos cycle-less?
04:10:39*om3ga joined #nim
04:25:42FromDiscord<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:51FromDiscord<Rika> He says he uses asyncdispatch
04:39:14FromDiscord<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:38NimEventerNew 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:40FromDiscord<Bung> https://github.com/nim-lang/Nim/pull/20529 any idea ? it break pathnorm now
07:09:12FromDiscord<Bung> I only modified two places, more specific to generic and array
07:18:35FromDiscord<halc> no errors
07:18:37FromDiscord<halc> sent a code paste, see https://play.nim-lang.org/#ix=4cJq
07:18:38FromDiscord<halc> is this a bug?
07:18:53FromDiscord<halc> (edit) "https://play.nim-lang.org/#ix=4cJq" => "https://play.nim-lang.org/#ix=4cJr"
07:20:12FromDiscord<Rika> `3..^1` is `3..2` which is "valid" and will give an empty seq i believe
07:20:22FromDiscord<Elegantbeef> Yep high to low range
07:20:35FromDiscord<Elegantbeef> A slice that has a length \<=0 returns nothing
07:20:59FromDiscord<Elegantbeef> Actually no
07:21:29FromDiscord<Elegantbeef> `3..2` is fine but `4..2` is an index error
07:24:18FromDiscord<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:41FromDiscord<Rika> i dont know why its "valid"
07:25:35FromDiscord<Elegantbeef> Wager it's the `^^` operator inside the `[]`
07:25:50FromDiscord<halc> In reply to @Elegantbeef "Wager it's the `^^`": yep, was just about to say
07:25:55FromDiscord<halc> cause I just looked at the source
07:27:24FromDiscord<halc> sent a code paste, see https://play.nim-lang.org/#ix=4cJs
07:27:34FromDiscord<halc> `^1` becomes `s.len-1`
07:28:10FromDiscord<halc> `s.len - s.len-1 + 1` = 0
07:28:14FromDiscord<halc> so you get an empty seq
07:28:50FromDiscord<Elegantbeef> Yea a weird case where a == ^b
07:29:37FromDiscord<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:19FromDiscord<Rika> what is ^^ supposed to signify
07:34:25FromDiscord<Rika> i sure love operators
07:35:40FromDiscord<JustADigimon (she/her)> question, for what is used `assert`
07:36:04FromDiscord<Elegantbeef> asserting logic holds
07:36:14FromDiscord<JustADigimon (she/her)> uh?
07:36:29FromDiscord<Rika> to make sure something is true
07:36:39FromDiscord<Rika> or something is as you expect it to be
07:36:43FromDiscord<JustADigimon (she/her)> oki
07:37:54FromDiscord<Elegantbeef> Commonly you use it inside of procedures where some condition should be held
07:38:21FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJv
07:50:06FromDiscord<ringabout> Would colorful mismatched parameters be more intuitive https://forum.nim-lang.org/t/9514#62515 ?
07:50:14FromDiscord<ringabout> (edit) "Would colorful mismatched parameters be more intuitive ... https://forum.nim-lang.org/t/9514#62515" added "than"
07:51:36FromDiscord<Elegantbeef> Likely would be helpful, i do wonder if there is any reason to include parameter names/proc name in a mismatch
07:52:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJy
07:53:16FromDiscord<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:59FromDiscord<ringabout> Yeah, it probably helps find the original definition for some cases.
07:59:15FromDiscord<matkuki> In reply to @treeform "Its currently kind of": Ah, thanks for the information 👍
08:02:43*PMunch joined #nim
08:03:07PMunchHmm, I have some trouble building nimlsp on the latest devel
08:03:26PMunchI 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:50PMunch1.6.8 works fine
08:04:54FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#ix=4cJA
08:05:00FromDiscord<Elegantbeef> Devel removed the postfix pragma↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
08:05:17FromDiscord<Elegantbeef> Damn it i mentioned pmunch
08:05:26FromDiscord<ringabout> Yeah, see https://github.com/nim-lang/Nim/pull/20199
08:05:31FromDiscord<Elegantbeef> Devel has a bunch of deprecated features removed
08:06:05PMunchAaah, right
08:06:17FromDiscord<Elegantbeef> ezquerra https://github.com/beef331/slicerator/blob/master/src/slicerator.nim#L42
08:06:41FromDiscord<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:46PMunchOh..
08:07:52PMunchI've even liked that PR :P
08:08:06PMunchApparently I've been down this road before :P
08:08:10FromDiscord<Elegantbeef> Look at the big brain on pmunch
08:09:51*rockcavera quit (Remote host closed the connection)
08:11:22FromDiscord<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:32PMunchHmm, I mean I could take the maintenance of it. But I'd only be able to do small things like this :P
08:15:38PMunchAnd accept PRs and such from people
08:15:49PMunchWhat's the other package that fails?
08:16:04FromDiscord<ringabout> https://github.com/metagn/Nim/blob/5c5634ff8ed75b3294f909aa5ec7de854255259f/testament/important_packages.nim#L39
08:16:06FromDiscord<ringabout> Itself
08:16:39FromDiscord<ringabout> Removing `--oldgensym:on` should be ok though.
08:16:56FromDiscord<Elegantbeef> Nim2.0 seems like a lot of people will be inheriting old code 😄
08:21:09FromDiscord<ezquerra> Thanks @ElegantBeef, but why does it not work?
08:21:25FromDiscord<Elegantbeef> cause `mitems` needs a mutable type
08:21:52FromDiscord<Elegantbeef> `reversed(mySeq)` returns a new sequences not a mutable reference to the original
08:22:02FromDiscord<ezquerra> Ah
08:22:17FromDiscord<Elegantbeef> It's much better to use the iterator i provided as it doesnt allocate
08:22:21FromDiscord<ezquerra> So it copies the values in the original sequence?
08:22:43FromDiscord<Elegantbeef> Yes it makes a new sequence based off the original but with values in reverse
08:23:01FromDiscord<ezquerra> 🤦‍♂️
08:23:42FromDiscord<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:07FromDiscord<Elegantbeef> 'PRs welcome'
08:26:09FromDiscord<Bung> so you wanna chained reverse with mitems
08:27:06FromDiscord<Elegantbeef> yea they want the iterator i provided in the stdlib
08:27:44FromDiscord<ezquerra> Yes
08:28:32FromDiscord<Bung> {.outParamsAt: [1],discardable.} will be sufficient I guess
08:28:48FromDiscord<Elegantbeef> What?
08:29:02FromDiscord<Bung> https://github.com/nim-lang/Nim/commit/e83f27e6a0f52f167e8eb91cd8f60be62d6725c6
08:29:46FromDiscord<Elegantbeef> I dont see how out parameters relate to a iterator
08:30:30FromDiscord<Elegantbeef> They want to iterate over a sequence in reverse using mitems
08:30:51FromDiscord<Bung> I may wrong , it's like out parameters doesn't return the param ?
08:31:05FromDiscord<Elegantbeef> out parameters are just a more exact usage of `var T`
08:31:21FromDiscord<Elegantbeef> It doesnt make any difference with `for x in reverse(mySeq).mitems`
08:33:16FromDiscord<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:28FromDiscord<Elegantbeef> `out` is not for return types
08:33:35FromDiscord<Elegantbeef> out is for definitive assignment mutable parameters
08:34:15FromDiscord<Elegantbeef> It's a more exact usage of version of `var T` for things like `parseInt(s, myInt)`
08:34:25FromDiscord<Elegantbeef> It errors if you do not assign `myInt` inside the proc
08:39:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJN
08:41:39FromDiscord<Bung> https://github.com/nim-lang/Nim/blob/0d23419e681c4ce561ec43dc4a66a0ed40b8009e/tests/init/tinitchecks_v2.nim#L40 this case ?
08:42:04FromDiscord<Elegantbeef> Yes
08:42:10FromDiscord<Elegantbeef> That's all it's meant for
08:43:58FromDiscord<Bung> hmm, I don't see it used widely
08:44:28FromDiscord<Elegantbeef> Like i said it's just a more exact `var` parameter
08:45:15FromDiscord<Bung> yeah, more strict
08:45:18FromDiscord<Elegantbeef> Given araq also added `strictDef` when there is going to be default object values it's weird
08:46:18FromDiscord<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:13FromDiscord<Bung> uh, how that work with `{.noInit.}`
08:47:37FromDiscord<Elegantbeef> Dont look at me
08:47:46FromDiscord<Elegantbeef> I dont get the want of definitive assignment
08:49:20FromDiscord<Bung> so many ideas coming for match user's intention
08:51:59FromDiscord<Elegantbeef> Like `strictDef`conflicts so hard with https://github.com/nim-lang/Nim/pull/20480
08:52:44FromDiscord<Elegantbeef> And araq says\: "... is solid and it is expected that eventually this mode becomes the default in later versions."
08:52:55FromDiscord<Elegantbeef> Like... how do these coincide
08:53:25FromDiscord<ringabout> In reply to @Elegantbeef "Like `strictDef`conflicts so hard": It is not anymore after a patch.
08:53:37FromDiscord<ringabout> https://github.com/nim-lang/Nim/pull/20508
08:53:48FromDiscord<Elegantbeef> Jesus
08:53:59FromDiscord<Elegantbeef> I was so happy about that being merged
08:54:02FromDiscord<Elegantbeef> Fuck this is dumb
08:56:10FromDiscord<Elegantbeef> I'll be shaking my head for a while
08:58:08FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJS
09:00:51FromDiscord<ringabout> That's probably the reason that the DAA RFC got many downvotes.
09:01:11FromDiscord<Elegantbeef> Well the definitive assignment doesnt solve any issues
09:01:24FromDiscord<Elegantbeef> It only removes parts of the language that are good
09:01:44FromDiscord<Elegantbeef> Like this is a step back towards C
09:02:37FromDiscord<ringabout> I thought it is designed for figuring out implicit result issues.
09:02:52FromDiscord<Elegantbeef> Except it applies to all fields
09:02:55FromDiscord<Elegantbeef> Sorry variables
09:04:07FromDiscord<ringabout> We can bring out it back easily if daa cannot work well in 2.x.
09:04:15FromDiscord<ringabout> (edit) removed "out"
09:04:28FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4cJU
09:04:45FromDiscord<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:00FromDiscord<ringabout> (edit) "We can bring it back easily ... if" added "without breaking changes"
09:05:53FromDiscord<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:22FromDiscord<ringabout> Yeah
09:14:54FromDiscord<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:39NimEventerNew 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:54xcodz-dotAnybody here familiar with basics of Pixie?
11:16:20NimEventerNew Nimble package! ytcc - CLI tool to get Youtube video captions (with chapters), see https://git.ozzuu.com/thisago/ytcc
11:20:28FromDiscord<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:03xcodz-dotWell, 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:24FromDiscord<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:12xcodz-dotSorry 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:49FromDiscord<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:08qwrit 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:38FromDiscord<Rika> That sounds annoying
13:20:11FromDiscord<Generic> blah I loved using implicitly initialized result
13:20:46FromDiscord<Generic> it made procs super compact and boilerplate free
13:20:47qwri 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:37FromDiscord<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:39qwrand currently its very nice to declare empty seqs that way
13:22:01FromDiscord<Generic> yeah
13:22:23*qwr would like not nil as default
13:22:37*xet7 quit (Quit: Leaving)
13:24:42FromDiscord<auxym> agreed
13:25:56*xet7 joined #nim
13:33:45*xcodz-dot joined #nim
13:41:33FromDiscord<Bung> can the azure pipelines modify task order ? I always see `nim-lang.Nim` is the latest and be `Queued` state
13:43:13FromDiscord<Bung> when make a PR I hope it is the first one.
13:45:33FromDiscord<ringabout> Why? I think it is the summary of other pipelines, which finishes when others are completed.
13:47:18FromDiscord<SaAnd> I found a new bug, what do I call this? https://play.nim-lang.org/#ix=4cKH
13:47:29FromDiscord<SaAnd> maybe not new, but still
13:49:00*vicecea joined #nim
13:49:14FromDiscord<Bung> doesn't it is the one run own tests of nim repo ?
13:49:59FromDiscord<Bung> oh, I see, `packages Linux_amd64` also does
13:50:07FromDiscord<ringabout> In reply to @Bung "doesn't it is the": https://media.discordapp.net/attachments/371759389889003532/1029028053151645727/unknown.png
13:50:17FromDiscord<ringabout> Yeah
13:51:36FromDiscord<Bung> I get it
14:04:31*PMunch quit (Ping timeout: 268 seconds)
14:09:28FromDiscord<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:52FromDiscord<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:07FromDiscord<Generic> In reply to @konsumlamm "i find it a": that doesn't work for seqs
14:21:39FromDiscord<Generic> In reply to @konsumlamm "it also makes it": with nilseqs gone most datastructures are usable without explicit initialization
14:24:40FromDiscord<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:54FromDiscord<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:41FromDiscord<Horizon [She/Her]> In reply to @Generic "with nilseqs gone most": Nil seqs?
15:28:55FromDiscord<Rika> seqs used to be nilabel
15:28:57FromDiscord<Rika> (edit) "nilabel" => "nilable"
15:34:01*ggsx joined #nim
15:36:42ggsxis there something in nim like c11 anonymous structures (pre-c11 in -ms-extensions)?
15:36:46ggsxhttp://port70.net/~nsz/c/c11/n1570.html#6.7.2.1p19
15:38:53FromDiscord<pyryrin> how do i get the generated c code3
15:40:27*kenran joined #nim
15:41:02FromDiscord<Bung> `PASS: tests/stdlib/tdb_mysql.nim c ( 134m ( 7.01 sec)` testament wrong measure ?
15:43:03qwrthinking 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:10qwrthat 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:22FromDiscord<Rika> In reply to @ggsx "is there something in": no
15:44:45FromDiscord<Rika> a similar idea is tuples but its not exact
15:45:05FromDiscord<Rika> actually no, even then they would not be anonymous as fields
15:50:12qwrhm, there is actually really easy way to make the current DAA RFC palatable - define functions like: func seq[T](): seq[T] = @[]
15:50:33qwrthen you simply write var foo = seq[string]()
15:54:05qwronly 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:02FromDiscord<Phil> Sometimes I just effing hate generics and how they bind
16:37:35FromDiscord<Phil> sent a long message, see http://ix.io/4cLs
16:38:28FromDiscord<Phil> (edit) "http://ix.io/4cLs" => "http://ix.io/4cLt"
16:39:02FromDiscord<Phil> (edit) "http://ix.io/4cLt" => "http://ix.io/4cLu"
16:43:34FromDiscord<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:45FromDiscord<Horizon [She/Her]> In reply to @Rika "seqs used to be": Ah
17:09:28FromDiscord<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:56FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=
17:28:25FromDiscord<ravinder387> request is undeclared can i know which package request function contain
17:37:02FromDiscord<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:48FromDiscord<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:44FromDiscord<gibson> In reply to @Isofruit "Constant 1 in module": 🙁 I feel you on this. +1
17:39:30FromDiscord<auxym> In reply to @Isofruit "Constant 1 in module": sounds weird, might be a bug, can you do a minimal reproduction?
17:39:31FromDiscord<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:03FromDiscord<auxym> In reply to @Anna Aurora 🇪🇺🏳🌈 "Is there any library": https://nim-lang.org/docs/os.html#getConfigDir
17:41:50FromDiscord<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:43NimEventerNew 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:03strogon14Is there a quick way to determine which nim version I need to require in my package's .nimble file?
19:15:06FromDiscord<Phil> If your project compiles with your current nim version, choose that nim version I'd say
19:23:02strogon14Ok. 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:47FromDiscord<Generic> git blame?
19:53:37strogon14Well, 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:35NimEventerNew 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:27FromDiscord<wick3dr0se> Do you guys recommend any specific resource for learning Nim?
20:31:13FromDiscord<gibson> @wick3dr0se https://github.com/StefanSalewski/NimProgrammingBook↵Then the learning resources on the main nim site.
20:31:53FromDiscord<Generic> I just noticed something
20:31:56FromDiscord<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:30FromDiscord<auxym> https://nim-by-example.github.io/getting_started/ is good too
20:32:30FromDiscord<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:39FromDiscord<Generic> I can just write `option == some(value)`
20:33:08FromDiscord<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:21FromDiscord<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:31FromDiscord<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:38FromDiscord<wick3dr0se> Maybe I should start with that one first then
20:33:59FromDiscord<auxym> nim by example is good too
20:34:02FromDiscord<wick3dr0se> It's funny how similar nim is to BASH so far
20:34:16FromDiscord<wick3dr0se> I like it
20:34:42FromDiscord<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:23FromDiscord<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:49FromDiscord<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:04FromDiscord<Horizon [She/Her]> In reply to @gibson "Sounds like your generated": It doesn't need a return type though?
20:36:38FromDiscord<gibson> `void` is a return type, and implied for you normally, unless you are creating AST by hand from macros.
20:36:52FromDiscord<Horizon [She/Her]> https://play.nim-lang.org/#ix=4cMN
20:37:11FromDiscord<wick3dr0se> Ima have to make a list of these links
20:37:26FromDiscord<Horizon [She/Her]> Just put it on `ix` (minus the utils.nim, i just made a template for slowType)
20:38:06FromDiscord<Horizon [She/Her]> In reply to @gibson "`void` is a return": Ah
20:40:12FromDiscord<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:14FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=4cMR
20:41:09FromDiscord<Elegantbeef> `42` likely defaults to the default Nim case statement↵(@gibson)
20:41:43FromDiscord<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:33FromDiscord<gibson> @ElegantBeef Huh, makes sense. Do you know a way I can force it?
20:42:43FromDiscord<Elegantbeef> Nope
20:44:02FromDiscord<Horizon [She/Her]> I think i realised the issue
20:44:42FromDiscord<Horizon [She/Her]> My `fmt` string accesses a template
20:44:52FromDiscord<Horizon [She/Her]> And that's unrelated to what i thought the issue
20:44:58FromDiscord<Horizon [She/Her]> So i'm gonna check it now
20:47:31FromDiscord<Horizon [She/Her]> That was the issue
20:47:36FromDiscord<Horizon [She/Her]> That was annoying as hell :p
20:49:56FromDiscord<Horizon [She/Her]> Errors with macros should be improved.. Is there no way to do this>
20:49:59FromDiscord<Horizon [She/Her]> ?
20:50:55FromDiscord<Elegantbeef> Macros are user defined compiler passes it's kinda hard to make the errors better
20:51:48FromDiscord<Horizon [She/Her]> Ah, that's sad
20:53:04FromDiscord<Horizon [She/Her]> Damn, the proc to check if a component is in an entity is called 5 times, within 3 calls
20:56:45FromDiscord<Horizon [She/Her]> That was easily fixed
20:56:53FromDiscord<Scare_Sec_RE43P3R> i can not find anything on nim being a compiled language is it?
20:56:57FromDiscord<Scare_Sec_RE43P3R> wait whoops
20:57:00FromDiscord<Scare_Sec_RE43P3R> low level not compiled
20:57:06FromDiscord<Scare_Sec_RE43P3R> i f'ed that up so bad
20:57:14FromDiscord<Scare_Sec_RE43P3R> (edit) "compiled" => "low level"
20:59:21FromDiscord<Horizon [She/Her]> Wonder how difficult it'd be to make a macro that expands component fields onto the entity directly
21:11:13FromDiscord<Horizon [She/Her]> How do i use a pragma on a type?
21:11:20FromDiscord<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:39FromDiscord<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:45FromDiscord<Elegantbeef> Ping
21:57:06FromDiscord<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)