<< 05-07-2026 >>

00:02:44FromDiscord<Aceroph> how do i make my variable not end with 'gensym0 in a template?
00:05:50FromDiscord<exelotl> iirc you can mark the template as {.dirty.} or the variable as {.inject.} - just keep in mind that these could allow the variable to name clash with others in the scope where the template is used
00:11:17FromDiscord<Aceroph> its fine, its a function
00:17:04*Skippy8 quit (Ping timeout: 276 seconds)
00:20:32*Skippy8 joined #nim
00:40:15*termer quit (Remote host closed the connection)
00:41:49*termer joined #nim
01:07:49FromDiscord<11clock> When should I use a value sequence and when should I use a reference sequence?
01:08:10FromDiscord<11clock> I am used to other languages where all collections are reference types, so value type collections are new to me.
01:09:13FromDiscord<_timurski> In reply to @11clock "When should I use": what do you mean
01:09:20FromDiscord<_timurski> like the objects stored are references or the sequence itself is being referenced
01:10:07FromDiscord<_timurski> a sequence is always a pointer to some memory
01:10:07FromDiscord<11clock> I am making a scene graph. A node has a sequence of children. I don't know if the sequence of children should be value or ref
01:10:25FromDiscord<_timurski> a sequence is already a pointer to some memory
01:10:25FromDiscord<11clock> Nodes themselves are ref types.
01:10:39FromDiscord<_timurski> so you should not have any extra pointers
01:10:52FromDiscord<_timurski> there's no need to have a `ref seq`
01:10:58FromDiscord<11clock> Alright
01:11:03FromDiscord<11clock> Thank you
01:25:58*termer quit (Remote host closed the connection)
01:27:31*termer joined #nim
01:30:35*Skippy8 quit (Ping timeout: 265 seconds)
02:01:19*joast quit (Quit: Leaving.)
03:10:02*joast joined #nim
04:52:51FromDiscord<11clock> Unfortunately I have to strip back a few features of my class module. Hooks, shorthand init, and shorthand self are going away. 🙁
04:53:44FromDiscord<11clock> Hooks and shorthand init didn't work with default parameters, and the tilda as a shorthand for self was causing so many bugs and stupid workarounds that I decided that it wasn't worth the upkeep.
04:54:39FromDiscord<11clock> For hooks I replaced them with method stubs. If you make a method stub it will be emitted as a base method with a discard body.
04:55:16FromDiscord<11clock> Ultimately I don't want to fight nim's syntax, so the more magic stuff is going away.
04:55:21FromDiscord<11clock> (edit) "magic" => "magical"
06:08:42*xet7 quit (Remote host closed the connection)
06:52:57*Skippy8 joined #nim
07:01:51*tiorock joined #nim
07:01:51*tiorock quit (Changing host)
07:01:51*tiorock joined #nim
07:01:51*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
07:01:51*tiorock is now known as rockcavera
08:36:56*Skippy8 quit (Ping timeout: 262 seconds)
08:37:42*Skippy8 joined #nim
08:42:00*yeti quit (Remote host closed the connection)
08:56:26*yeti joined #nim
09:23:13*yeti quit (Quit: \\//_)
09:30:48*yeti joined #nim
09:38:39*Skippy8 quit (Ping timeout: 245 seconds)
09:40:04*SchweinDeBurg quit (Quit: WeeChat 4.8.0-dev)
09:52:06FromDiscord<tapeda> I have qualms abt 'local' syntax sugar for similar reasons, gotta cook up a whole meal not just lil uncomposable snacks. It's also very hard to iterate on individual ingredients w/out sampling them as part of the whole 'module'
09:52:15FromDiscord<tapeda> Brb need breakfast clearly
10:14:44*sdothum quit (Remote host closed the connection)
10:17:32*sdothum joined #nim
10:22:54*SchweinDeBurg joined #nim
11:54:23*xet7 joined #nim
12:23:30*termer quit (Remote host closed the connection)
12:25:01*termer joined #nim
14:50:20*xet7 quit (Remote host closed the connection)
15:47:21FromDiscord<timbuktu_guy> In reply to @tapeda "Brb need breakfast clearly": real hunter and gatherers did not eat breakfast
15:47:45FromDiscord<timbuktu_guy> (edit) removed "real"
15:57:02Amun-Raif not real then integer ones?
16:33:20FromDiscord<11clock> I am considering switching from 2 space indentation to 4 space indentation. 2 space indentation is hard to read.
16:35:34Amun-RaI'm 4 space indent user also; I used 2 space indents in nim code from the beginning
16:35:52Amun-RaI tried to switch to 4 space indent and it looks fugly
16:36:34Amun-Raso I still use 2 space indent till this day
16:37:47Amun-RaI guess if I had used 4 space from the beginning, it'd be different
16:38:30Amun-Rabut I use snake case :)
16:52:55Amun-Raaccording to chatgpt: int 1 + 3 is the same as int(1) + 3 and not int(1 + 3)
16:52:57Amun-Raheh
16:57:45*yeti quit (Quit: \\//_)
16:58:15*yeti joined #nim
17:18:39FromDiscord<tempestro> sent a code paste, see https://play.nim-lang.org/#pasty=TsLOgQeb
17:18:51FromDiscord<tempestro> What's the proper way to do this?
17:19:07FromDiscord<tapeda> In reply to @timbuktu_guy "hunter and gatherers did": But did they have hungover leftover brisket at noon tho. In the analogy this amounts to dependent types or smth, to keep on topic
17:19:27Amun-Raeither that or $(getCString())
17:20:28FromDiscord<tempestro> So far I've been defining `func toString()` for every type where I encounter this, I'm pretty sure you're supposed to use a macro for this but I'm scared to touch those 😭
17:21:09Amun-Raargh $(getCString()) should be just $getCString()
17:22:23FromDiscord<tempestro> Wait, doesn't the unary operator bind tighter than the function call?
17:23:32Amun-Rafoo x y z a b c is foo(x y z a b c)
17:25:36Amun-Ra$o.x == $(o.x)
17:27:24Amun-Rax.$.y makes sens only if you really want to follow ufcs and y takes string as an argument
17:29:24Amun-Ra($x).y looks ugglyish, I'd write y $x
17:29:25FromDiscord<tempestro> Blah, C has taught me that if you have to think about operator precedence, you're probably doing something wrong 😛
17:29:32Amun-Ra;)
17:30:00Amun-Raright, (int) x + y works different thant nim's int x + y :)
17:30:44FromDiscord<DetermiedNim1> In reply to @tempestro "So far I've been": look up generic procs 😭
17:31:17FromDiscord<DetermiedNim1> func str[T](o: T): string = $o
17:31:23FromDiscord<DetermiedNim1> (edit) "func" => "`func" | "$o" => "$o`"
17:32:03FromDiscord<DetermiedNim1> 1.str↵"whyareyoustringifyingthis".str↵@[6,7].str
17:32:49Amun-Ra1.str.str.str
17:34:05Amun-Ra(just to be sure it's going to work) ;)
17:38:33FromDiscord<DetermiedNim1> lol
17:38:43FromDiscord<tempestro> In reply to @determiedmech1 "`func str[T](o: T): string": ooooh, right I'm a dummy
20:04:20*beholders_eye joined #nim
20:09:55*beholders_eye quit (Ping timeout: 264 seconds)
20:11:33*beholders_eye joined #nim
20:39:19*om3ga quit (Ping timeout: 264 seconds)
20:42:29*om3ga joined #nim
22:22:05*beholders_eye quit (Ping timeout: 252 seconds)
22:23:49*beholders_eye joined #nim
23:14:36*beholders_eye quit (Ping timeout: 256 seconds)
23:50:29*sdothum quit (Remote host closed the connection)
23:52:49*sdothum joined #nim
23:52:50*sdothum quit (Remote host closed the connection)
23:54:51*sdothum joined #nim
23:58:48*xet7 joined #nim