<< 17-03-2026 >>

00:01:31FromDiscord<mr_rowboto> `nim` doesn't have constructors in the traditional sense of them being "special syntax", but surely as soon as you have private state, you'll most likely have to provide a constructor `proc`
00:04:38FromDiscord<mr_rowboto> sent a code paste, see https://play.nim-lang.org/#pasty=QUXaDbaR
00:45:29FromDiscord<demotomohiro> In reply to @im_rob "I have a question": Add `requiresInit` pragma to `Book` in your code.↵https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement↵Then, another module cannot create `Book` with `Book(title: "title")`.
00:56:19*mrinsane joined #nim
01:36:42FromDiscord<im_rob> In reply to @demotomohiro "Add `requiresInit` pragma to": Oh splendid!
01:39:40FromDiscord<mr_rowboto> In reply to @demotomohiro "Add `requiresInit` pragma to": nice, didn't know about this
02:04:45FromDiscord<leeeee2976> https://nim-lang.org/araq/destructors.html↵↵Is this blogpost still relevent?
02:05:24*xutaxkamay quit (Ping timeout: 246 seconds)
02:05:58FromDiscord<leeeee2976> I just learned Arena memory management strategy on C and am curious if Nim has something equivalent
02:08:35*xutaxkamay joined #nim
02:14:47FromDiscord<_russianlifts> sent a code paste, see https://play.nim-lang.org/#pasty=yeMtTHDU
02:18:05FromDiscord<jjsanchemx> Hi, i have a problem using jpg images, i am new in Nim and raylib. I installed naylib and all works great, but today i want to use a jpg image for background. I use bgSpace = loadTexture("resources/space.png") and drawTexture(bgSpace, 0, 0, WHITE) and works fine, but when use a jpg format image give an error... INFO: FILEIO: [resources/space.jpg] File loaded successfully↵WARNING: IMAGE: Data format not supported↵WARNING: IMAGE:
02:31:28FromDiscord<mr_rowboto> In reply to @_russianlifts "relevant video https://youtu.be/xt1KNDmOYqA?si=Sn00": Ohhh Casey ❤️
02:33:13FromDiscord<mr_rowboto> Can you summarize what he says about this? I'll probably agree, since basically I'm all for ECS lately.
02:43:57FromDiscord<_russianlifts> In reply to @mr_rowboto "Can you summarize what": Casey doesn't like ECS lol 😭
02:44:55FromDiscord<_russianlifts> he mostly just talks about learning to think at a higher level than individual objects in your program, which leads to much simpler design with things like lifetime management when you identify things that live together
02:45:09FromDiscord<mr_rowboto> He doesn't name it ECS
02:45:17FromDiscord<mr_rowboto> But he's a sucker for all things ECS ahahaha
02:45:25FromDiscord<_russianlifts> I added it because Zero Is Initialization is mentioned which is relevant
02:45:37FromDiscord<mr_rowboto> "Oh yeah muh non-hierarchies and tagged unions on continguous arrays"
02:45:48FromDiscord<mr_rowboto> "compile time hierarchies and vtables bad"
02:45:49FromDiscord<mr_rowboto> 😛
02:45:51FromDiscord<_russianlifts> In reply to @mr_rowboto "He doesn't name it": I don't think having all your entities be represented in one array of structs is ECS
02:45:59FromDiscord<mr_rowboto> I wonder which pattern just does all that
02:46:06FromDiscord<_russianlifts> at least that's usually not what people refer to
02:46:17FromDiscord<_russianlifts> because there aren't any... components
02:46:22FromDiscord<mr_rowboto> In reply to @_russianlifts "I don't think having": ECS is just a cache coherent way of implementing DoD
02:47:05FromDiscord<_russianlifts> I'm not knowledgeable enough to say much more to be honest
02:47:16FromDiscord<_russianlifts> game programming isn't my thing
02:47:23FromDiscord<mr_rowboto> https://www.youtube.com/watch?v=wo84LFzx5nI&t=189s
02:47:28FromDiscord<mr_rowboto> (edit) "https://www.youtube.com/watch?v=wo84LFzx5nI&t=189s" => "https://www.youtube.com/watch?v=wo84LFzx5nI"
02:47:52FromDiscord<mr_rowboto> That's Casey at his best.
02:48:35FromDiscord<mr_rowboto> He actually mentions ECS there, and and as a good example.
02:49:08FromDiscord<mr_rowboto> (edit) removed "and"
02:51:14FromDiscord<mr_rowboto> In reply to @_russianlifts "I added it because": I'd have to listen to him explain this, because I'm really not convinced that Zero always serves as a base case/initializer.↵But yeah, I see that it may actually hold up :º
02:51:24FromDiscord<mr_rowboto> (edit) "In reply to @_russianlifts "I added it because": I'd have to listen to him explain this, because I'm ... really" added "not" | removed "not"
02:51:38FromDiscord<_russianlifts> I don't agree with it at all
02:51:42FromDiscord<_russianlifts> just thought it's relevant
02:51:53FromDiscord<mr_rowboto> noed
02:51:55FromDiscord<mr_rowboto> (edit) "noed" => "noted"
03:09:13FromDiscord<shalokshalom> In reply to @_russianlifts "I don't think having": ECS are so poorly named, I disqualify each and every instance of it being named, that lacks a distinct explaination that's attached to it.
03:09:46FromDiscord<shalokshalom> In reply to @_russianlifts "game programming isn't my": It has nothing to do with game programming, it is simply popular there.
03:11:38FromDiscord<shalokshalom> (We are developing a programming language, that's implicitly mirroring the semantic structure of the ECS structures as decribed in this Wikipedia article: [ECS](https://en.wikipedia.org/wiki/Entity_component_system))
03:34:29FromDiscord<_russianlifts> In reply to @shalokshalom "It has nothing to": i mostly do scientific programming now so I just don't deal with most things now haha
03:35:09FromDiscord<_russianlifts> so something like ECS will probably never have much relevance to me
03:35:09FromDiscord<_russianlifts> but sorry this is off topic
03:36:12*Guest89 joined #nim
03:43:00*termer joined #nim
03:43:05*beholders_eye quit (Ping timeout: 265 seconds)
03:47:12*Jjp137 quit (Ping timeout: 264 seconds)
03:48:16FromDiscord<shalokshalom> In reply to @_russianlifts "i mostly do scientific": Can be important in science, since its ultimately only a performance improvement for multiple dispatch logic.
03:48:47FromDiscord<shalokshalom> But don't tell anyone 🤫
03:49:12*Jjp137 joined #nim
03:49:42FromDiscord<mr_rowboto> In the end science is usually all about processing big datasets 😂 so yeah, better be cache-coherent.
03:53:43FromDiscord<shalokshalom> Read this: https://www.juliaopt.org/meetings/santiago2019/slides/stefan_karpinski.pdf
03:56:00FromDiscord<shalokshalom> Julia stores multidimensional arrays in column-major order, meaning consecutive elements within a single column are physically adjacent in memory.
03:56:17FromDiscord<shalokshalom> #offtopic
04:04:56*krunsh quit (Quit: WeeChat 4.7.2)
04:10:30*Guest89 quit (Quit: Client closed)
06:04:00*mrinsane quit (Ping timeout: 264 seconds)
06:52:12*om3ga quit (Ping timeout: 255 seconds)
06:55:21*om3ga joined #nim
07:31:01FromDiscord<nnsee> In reply to @jjsanchemx "Hi, i have a": i don't know about naylib specifically, but in regular raylib you need to flip a flag in config.h to be able to read jpgs. but why not just convert the jpg to a png? if you have imagemagick installed, just `convert space.jpg space.png`
08:09:58FromDiscord<aethrvmn> If you rename a .jpg extension to .png, it usually works for most things that complain about it↵(@nnsee)
08:41:07FromDiscord<nnsee> i doubt that's the case for raylib since you're likely literally just not compiling jpg decoding support in if you don't enable it in config.h
08:41:59FromDiscord<litlighilit> tho extenstion doesn't affect its actual image type (which's stored in file content)
09:21:04FromDiscord<nocturn9x> does anyone know why updating from nim 2.2.6 to 2.2.8 would cause perfectly valid comptime code to fail with `/home/nocturn9x/.choosenim/toolchains/nim-2.2.8/lib/system/iterators_1.nim(107, 11) Error: unhandled exception: value out of range`?
09:21:46FromDiscord<nocturn9x> also I got nim to generate invalid C code in release mode but not danger mode??
09:21:46*pmp-p quit (Ping timeout: 244 seconds)
09:26:34FromDiscord<nocturn9x> though it must've happened after some system/compiler update
09:26:46FromDiscord<nocturn9x> because I had a git commit hook that ran `make test` and it never failed before
09:27:24FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=VNqlXkid
09:28:51FromDiscord<nocturn9x> this is assigning a very large constant blob to a variable fyi
09:32:16FromDiscord<nocturn9x> https://media.discordapp.net/attachments/371759389889003532/1483397547031789568/image.png?ex=69ba711f&is=69b91f9f&hm=728166970f9117f16d915d1c2aa1d6911384a3c4ad91e26e8f9dbc1c2bcd91e5&
09:32:26FromDiscord<nocturn9x> the problem is `network = temp[]` apparently
09:36:11FromDiscord<nocturn9x> oh it seems to happen regardless of the mode now
09:36:14FromDiscord<nocturn9x> definitely a compiler problem
09:38:27*beholders_eye joined #nim
09:44:17FromDiscord<nocturn9x> could be an issue with clang 22
09:46:08FromDiscord<nocturn9x> yeah it doesn't fail with clang 22
09:46:09FromDiscord<nocturn9x> (edit) "22" => "21"
09:46:11FromDiscord<asviest> In reply to @aethrvmn "If you rename a": I think that anything that work with images checks fourcc instead of extension
09:46:35FromDiscord<Robyn [She/Her]> In reply to @nocturn9x "yeah it doesn't fail": must be to do with some new compiler defaults for clang
09:46:42FromDiscord<nocturn9x> yeah
09:53:00FromDiscord<nocturn9x> ok nvm
09:53:04FromDiscord<nocturn9x> it breaks with clang 21 too
09:53:23FromDiscord<nocturn9x> _meh_
09:55:01FromDiscord<nocturn9x> In reply to @nocturn9x "": FYI this has never worked with clang
09:55:13FromDiscord<nocturn9x> `VERBATIM_NET_DATA` is a huge binary blob (>30MB)
09:55:29FromDiscord<nocturn9x> it's supposed to be the byte-for-byte dump of an in-memory object
09:56:14Amun-Rahave you tried this: `let temp = cast[prt Network](VERBATIM_NET_DATA[0].addr)`
09:56:33FromDiscord<nocturn9x> let's see
09:57:27FromDiscord<nocturn9x> `/home/nocturn9x/heimdall/src/heimdall/eval.nim(94, 59) Error: expression has no address`
09:57:46FromDiscord<nocturn9x> FYI it's a `cstring` https://media.discordapp.net/attachments/371759389889003532/1483403966078521427/image.png?ex=69ba7719&is=69b92599&hm=7f45c006a54c9215db9ca7960027db107a440bb448861708b7cc9d016d0b831c&
09:58:25FromDiscord<nocturn9x> if I make it a normal string it says "expression cannot be cast to `ptr Network`"
10:00:04Amun-Rachange const to let for testing
10:00:32*mrinsane joined #nim
10:03:36Amun-Rausually s[0].addr helps, but `const foo` may not have any address
10:03:57Amun-RaI suspect some optimizations in clang 22 are the cause of this
10:05:05*mrinsane quit (Ping timeout: 252 seconds)
10:05:23FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=GtWHrnDW
10:06:49Amun-RaSIGSEGV: Illegal storage access. (Attempt to read from nil?)
10:06:51Amun-Ra:>
10:06:56FromDiscord<ringabout> (edit) "https://play.nim-lang.org/#pasty=HixDOvXW" => "https://play.nim-lang.org/#pasty=abrdtvpO"
10:14:07*beholders_eye quit (Ping timeout: 264 seconds)
10:15:03*beholders_eye joined #nim
12:49:53FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=PjcitABF
12:51:48FromDiscord<janakali> ^ doesn't error for me with clang21
12:52:28Amun-Raproblem appears in clang 22
12:52:53Amun-Rathe issue*
12:53:14FromDiscord<janakali> can't test in 22, not in my linux repos, sadly
12:54:47Amun-Rasame here
13:15:37FromDiscord<nocturn9x> it appears in clang 21 as well actually, idk why the issue suddenly appeared now
13:15:45FromDiscord<nocturn9x> In reply to @janakali "<@523555920265871380> you can workaround": anyway thanks, I'll try :)
13:49:19*om3ga quit (Ping timeout: 268 seconds)
13:52:15*om3ga joined #nim
15:10:38*joast quit (Quit: Leaving.)
15:32:18*mrinsane joined #nim
16:10:50*joast joined #nim
16:32:54*xutaxkamay quit (Quit: ZNC 1.9.1+deb2+b3 - https://znc.in)
16:34:33*xutaxkamay joined #nim
18:47:02*xet7 quit (Ping timeout: 252 seconds)
18:59:00*xet7 joined #nim
20:54:30*mrinsane quit (Ping timeout: 246 seconds)
22:07:21*mrinsane joined #nim
22:57:11*rockcavera joined #nim
23:37:53*beholders_eye quit (Ping timeout: 244 seconds)
23:49:39*mrinsane quit (Ping timeout: 255 seconds)