<< 11-08-2025 >>

00:08:03*fallback quit (Quit: IRCNow and Forever!)
00:13:36*pmp-p quit (Ping timeout: 252 seconds)
00:14:08*pmp-p joined #nim
00:34:27*fallback joined #nim
00:52:55*lucerne9 joined #nim
00:53:34*lucerne quit (Ping timeout: 252 seconds)
00:53:34*lucerne9 is now known as lucerne
01:01:55FromDiscord<albassort> leo what do u do when u feel too sick to code and cant focus
01:02:16FromDiscord<leorize> don't code?
01:02:24FromDiscord<leorize> have fun by working out other people problems instead
01:09:45FromDiscord<albassort> hmm
01:09:56FromDiscord<albassort> but people's problems here are often lame
01:10:09FromDiscord<albassort> all the cool problems are like complex and too hared to fit into a discord messaage
01:10:28FromDiscord<albassort> (edit) "hared" => "hard "
01:30:47FromDiscord<mr_rowboto> In reply to @albassort "leo what do u": If you feel that you still want but just can’t, I’ve been there.
01:32:48FromDiscord<mr_rowboto> You're not getting distracted because there is external stimuli, you're getting distracted bc brain is tired... and you still want to code bc you are also obsessed.↵↵Except you have ADHD, then you're getting distracted always anyways, and the only solution is to literally chop off all distractions, meticulously, turn on notis, throw away cellphone, use a single screen, tidy room, have nothing on top of table.
01:32:59FromDiscord<mr_rowboto> (edit) "You're not getting distracted because there is external stimuli, you're getting distracted bc brain is tired... and you still want to code bc you are also obsessed.↵↵Except ... you" added "if"
01:33:09FromDiscord<mr_rowboto> (edit) "on" => "off"
01:34:05FromDiscord<mr_rowboto> If you're ok good with the attention thing and can function normally... but just can't code, this will sound stupid, but do something else:↵take a walk, talk to a friend, take a bath.
01:34:19FromDiscord<mr_rowboto> Let brain rest.
01:35:16FromDiscord<mr_rowboto> (edit) removed "ok" | "thing" => "disorder thing,"
01:38:08FromDiscord<albassort> idk about the adh
01:38:09FromDiscord<albassort> (edit) "adh" => "adhd"
01:38:27FromDiscord<albassort> i feel like a lazy bum if i don't get work done. like I might as well just not exist if im not being productive
01:39:01FromDiscord<albassort> i could have adhd who knows but its likely some kind of attention thing + my GAD chronic anxiety
02:19:26*skippy8 joined #nim
02:21:04*rockcavera quit (Remote host closed the connection)
04:01:09FromDiscord<albassort> should i use epoll
04:01:16FromDiscord<albassort> to monitor sockets?
04:01:42FromDiscord<albassort> so i have a bunch of sockets, currently in an array, poll them every 5ms and do recvLine
04:01:57FromDiscord<albassort> what if i use epoll, add them to the epoll list, then go through the epollarray
04:06:10FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=ykeVkKNR
04:24:31FromDiscord<Elegantbeef> `std/selectors` is undocumented but does exist
04:37:20*adigitoleo quit (Server closed connection)
04:37:29*adigitoleo joined #nim
04:55:16FromDiscord<albassort> In reply to @Elegantbeef "`std/selectors` is undocumented but": well i've done epoll integration now
04:55:20FromDiscord<albassort> and i dont know how a selector is
04:56:05FromDiscord<albassort> im uneducateed+old c code stuff is cool+selectors is undocumented+l+ratio
05:03:27FromDiscord<Elegantbeef> It's just a wrapper over `select` on unix↵(@albassort)
05:04:08FromDiscord<Elegantbeef> What you can do is select on the sockets then you receive when they have data
05:04:30FromDiscord<Elegantbeef> Well it uses epoll/kqueue/poll 😄
05:05:28FromDiscord<Elegantbeef> https://github.com/beef331/potato/blob/master/src/potato.nim#L209-L235 for a small use case of a selector
05:05:59FromDiscord<Elegantbeef> Open a socket, add the fd to the selector for when it's ready to `Read` then In my read loop I just act on each select event
06:29:24*Ekho quit (Server closed connection)
06:33:15*Ekho joined #nim
06:37:19Amun-Raselect even works on windows, not on all types tho
07:47:36FromDiscord<albassort> ``i have never once developed something and expected it to work on windows
07:48:07FromDiscord<albassort> except for when that was my job
08:41:32Amun-Rasame tbh
10:38:26FromDiscord<albassort> i love channels
10:38:29FromDiscord<albassort> they get so cursed
10:38:37FromDiscord<albassort> but they're pretty fast, safe, and powerful
12:12:53*xet7 joined #nim
13:20:12FromDiscord<blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=DkAKsKEp
13:28:54FromDiscord<Robyn [She/Her]> Nim doesn't have a borrow checker↵(@blashyrk)
13:29:13FromDiscord<blashyrk> > Error: cannot borrow inverseTransform; what it borrows from is potentially mutated↵Sure sounds like borrow checking to me 😄
13:29:57FromDiscord<Robyn [She/Her]> afaik it's not really a borrow checker, it doesn't do anything as in-depth as Rust does, at least
13:36:43FromDiscord<Laylie> can you share the type and proc definitions so we can reproduce this
13:37:59FromDiscord<spotlightkid> How can I check at run-time whether a non-constant int can be converted into a value of enum `Foo`?↵AI says to check the `Foo.low .. Foo.high` range (for non-sparse enums). Or is there a better/more concise way?
13:55:04FromDiscord<Laylie> sent a code paste, see https://play.nim-lang.org/#pasty=VgOirteo
14:04:58FromDiscord<spotlightkid> TIL `HoleyEnum` exists 😉
14:18:38FromDiscord<heysokam> Not to be confused with `HolyEnum`
14:35:04*przmk quit (Ping timeout: 272 seconds)
14:43:32*przmk joined #nim
14:52:44FromDiscord<_._winter.> In reply to @heysokam "Not to be confused": what does it mean for an enum to be holy
14:53:52FromDiscord<flyx> compiles to HolyC↵(@_._winter.)
14:54:12FromDiscord<_._winter.> the only perfect language
15:11:05FromDiscord<spotlightkid> You mean the Holy See?↵Where the program is always right, regardless what the users wants.
15:35:43FromDiscord<mr_rowboto> In reply to @spotlightkid "You mean the Holy": That's "The !C Programming Language"
15:36:04FromDiscord<mr_rowboto> stylized as `Cn't`
15:39:06FromDiscord<Robyn [She/Her]> it has been blessed by the current pope, smh↵(@_._winter.)
16:28:21FromDiscord<flyx> in case you haven’t heard of it, HolyC is an actual programming language, used in TempleOS. the pun is still intended.
16:37:22*beholders_eye quit (Ping timeout: 252 seconds)
16:39:25*beholders_eye joined #nim
17:02:29*beholders_eye quit (Ping timeout: 240 seconds)
17:10:28FromDiscord<mr_rowboto> In reply to @flyx "in case you haven’t": Of course I've heard of it. Who hasn't heard of Terry,↵`The Best Programmer That Has Ever Lived`↵Rest In Peace, sweet king, fly where glowies can't get you.
17:10:36FromDiscord<mr_rowboto> (edit) "In reply to @flyx "in case you haven’t": Of course I've heard of it. Who hasn't heard of Terry,↵`The Best Programmer That Has Ever Lived`↵Rest In Peace, sweet king, fly ... where" added "to"
17:51:08FromDiscord<ollicron_53732> https://tenor.com/view/conspiracy-theory-explaining-gif-15961634830032552817
17:51:52FromDiscord<ollicron_53732> how I feel trying to understand ASTs right now https://media.discordapp.net/attachments/371759389889003532/1404522723618717757/giphy.png?ex=689b7f38&is=689a2db8&hm=0399eafa7f8fac106047655ce4529094ecf879573c0f15c6797353c17113537b&
17:53:03FromDiscord<ollicron_53732> https://media.discordapp.net/attachments/371759389889003532/1404523017446490163/giphy.png?ex=689b7f7e&is=689a2dfe&hm=c4cc19ae146ff7f42d9fc10da7c34d6ad8e92bf003616a67a45ccd13df67e2f7&
17:53:33FromDiscord<Elegantbeef> AST isn't that bad it's a tree of the language
17:53:43FromDiscord<Elegantbeef> `import std/macros ` and use `dumptree`
17:56:05FromDiscord<ollicron_53732> In reply to @Elegantbeef "`import std/macros ` and": the holy `dumptree` function I am learning!
17:56:12FromDiscord<Robyn [She/Her]> ye, just data
17:59:09FromDiscord<mr_rowboto> tbh I'd feel more comfortable just writing a big-ass unchecked string and replacing stuff.
18:00:45FromDiscord<mr_rowboto> the compiler is going to check verify it anyways
18:00:49FromDiscord<mr_rowboto> (edit) removed "verify"
18:13:10FromDiscord<leorize> being white space significant, the language is also very hostile to mechanical manipulation of the source code
18:13:10FromDiscord<leorize> even the official formatter can't output code that compiles
18:15:07FromDiscord<Elegantbeef> Well that is
18:15:12FromDiscord<Elegantbeef> to say it can output code that fails to compile
18:15:22FromDiscord<Elegantbeef> It can also output code that does compile 😄
19:12:08FromDiscord<mr_rowboto> we're positive that it can _output code_
19:13:43FromDiscord<Elegantbeef> Yes
19:13:48FromDiscord<Elegantbeef> But not all the code it outputs can compile
19:37:44FromDiscord<mr_rowboto> sent a code paste, see https://play.nim-lang.org/#pasty=uiRTOQRy
19:37:56FromDiscord<mr_rowboto> (edit) "https://play.nim-lang.org/#pasty=NYgHiLQj" => "https://play.nim-lang.org/#pasty=CLHbOUWx"
19:38:43FromDiscord<mr_rowboto> Because it would help a lot to avoid nesting when accessing multiple components from different entities in vecs/yeacs
20:01:41FromDiscord<Elegantbeef> @mr_rowboto https://github.com/beef331/slicerator/blob/master/src/slicerator.nim#L153
20:01:53FromDiscord<Elegantbeef> That's an allocating implementation
20:02:02FromDiscord<Elegantbeef> https://github.com/beef331/slicerator/blob/master/src/slicerator.nim#L280 non allocating implementation
20:02:44FromDiscord<Elegantbeef> Though it captures them as closures, you likely do not want that
20:07:38FromDiscord<mr_rowboto> super nice
20:07:58FromDiscord<mr_rowboto> that's one huge macro
20:08:15FromDiscord<Elegantbeef> It's not even that big
20:08:19FromDiscord<Elegantbeef> Plus it calls `asClosure` which is another macro
20:08:25FromDiscord<mr_rowboto> hehe
20:08:32FromDiscord<mr_rowboto> what's the closure for?
20:09:00FromDiscord<Elegantbeef> I don't recall now 😄
20:09:50FromDiscord<Elegantbeef> Think it might've been for ensuring all the iterators were finished
20:10:00FromDiscord<Elegantbeef> Well were not
20:10:35FromDiscord<Elegantbeef> Oh no it's cause you need to populate each field and the only way to do with this large iterator is with closures
20:10:39FromDiscord<Elegantbeef> Since they're continuable
20:12:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=bbHRikEm
20:13:42FromDiscord<Elegantbeef> You want to have concurrent iterators and there is no way to provide state to continue from where they left off it's not overly possible to do this anyway else generically
20:13:50FromDiscord<Elegantbeef> In your case you can probably just turn them into indexers for components
20:13:57FromDiscord<mr_rowboto> makes sense
20:14:11FromDiscord<mr_rowboto> I'll probably want the closures
20:14:21FromDiscord<mr_rowboto> since sooner or later I will want to run stuff on threads
20:15:01FromDiscord<Elegantbeef> Well they're allocatey and do not ensure that the tree is isolated
20:15:08FromDiscord<Elegantbeef> So moving them across threads may end badly
20:15:26FromDiscord<Elegantbeef> Anything automatically managed by Nim being moved to threads is a sad state
20:15:38FromDiscord<Elegantbeef> With the exception of sinkable types
20:16:04FromDiscord<mr_rowboto> sent a code paste, see https://play.nim-lang.org/#pasty=wWwEgDgZ
20:16:53FromDiscord<Elegantbeef> Ah just use an atomic
20:16:54FromDiscord<Elegantbeef> `std/atomics` are right there or `nim-lang/threading`'s atomics
20:16:55FromDiscord<mr_rowboto> Thanks again.
20:17:33FromDiscord<Elegantbeef> No problem, still about sad that yeacs didn't solve your issue, it's a failed ECS! 😄
20:27:11FromDiscord<leorize> can't you just use macrocache.CacheCounter to do it all at CT?
20:28:59FromDiscord<Elegantbeef> You can but I was avoiding macros when I wrote it
20:29:07FromDiscord<Elegantbeef> Anything with macro in the name
20:31:16FromDiscord<mr_rowboto> In reply to @Elegantbeef "No problem, still about": It's not a failed ECS at all. It's the ECS that made me learn cool stuff.
20:31:53FromDiscord<mr_rowboto> IMHO I'd change the pointer stuff because it forces you to deal with move semantics and so on.
20:32:16FromDiscord<mr_rowboto> but it's just _opinion_.
20:33:20*beholders_eye joined #nim
20:33:20FromDiscord<mr_rowboto> incidentally that kind of _dodges_ the nim compiler bug
20:33:27FromDiscord<Elegantbeef> I want move semantics though
20:33:28FromDiscord<mr_rowboto> (edit) "incidentally" => "incidentally,"
20:33:36FromDiscord<mr_rowboto> fair enough
20:34:01*skippy8 quit (Quit: WeeChat 4.6.3)
20:34:05FromDiscord<mr_rowboto> It's something I have to look closer to.
20:34:12FromDiscord<mr_rowboto> (edit) "It's something I have to ... look" added "take a closer" | removed "closer"
20:34:20FromDiscord<mr_rowboto> (edit) "It's something ... I" added "that"
20:35:17FromDiscord<Elegantbeef> I'll have a gander when you release yours, but yea I don't know there was a reason I did the `seq[byte]`
21:02:19FromDiscord<mr_rowboto> You have a whole lot of nim code. Can't remember all.
21:02:24FromDiscord<mr_rowboto> (edit) "all." => "all, it's literally impossible."
21:17:01*rockcavera joined #nim
21:30:31*beholders_eye quit (Ping timeout: 255 seconds)
22:24:23*syl quit (Quit: C-x C-c)
22:25:04*syl joined #nim
22:50:04*tiorock joined #nim
22:50:04*tiorock quit (Changing host)
22:50:04*tiorock joined #nim
22:50:04*rockcavera is now known as Guest2207
22:50:04*tiorock is now known as rockcavera
22:52:09*tiorock joined #nim
22:52:09*rockcavera is now known as Guest9318
22:52:09*Guest9318 quit (Killed (copper.libera.chat (Nickname regained by services)))
22:52:09*tiorock is now known as rockcavera
22:52:17*zgasma joined #nim
22:53:46*Guest2207 quit (Ping timeout: 255 seconds)
23:17:31*xet7 quit (Remote host closed the connection)