<< 14-04-2022 >>

00:23:00FromDiscord<huantian> man I cannot figure out how to make `privateAccess` work
00:23:20FromDiscord<huantian> I just want a version of `downloadFile` that returns `resp.headers`
00:25:58FromDiscord<huantian> I might just give up and load files into memory when downloading
00:27:32FromDiscord<huantian> how do I do that manually with `get()`?
00:31:42FromDiscord<huantian> nvm got it
00:40:36FromDiscord<impbox [ftsf]> using async code is there a way to make something happen every X amount of time?
00:41:05FromDiscord<impbox [ftsf]> (shouldn't block other events happening)
00:41:24FromDiscord<Yardanico> In reply to @impbox "using async code is": yes
00:41:26FromDiscord<Elegantbeef> @huantian\: you do `privateAccess(TheType)`
00:41:41FromDiscord<impbox [ftsf]> normally I'd just put a check in the mainloop to see if X time has passed since last call, but not sure how i'd do the same with async
00:41:51FromDiscord<Yardanico> either https://nim-lang.org/docs/asyncdispatch.html#addTimer%2Cint%2Cbool%2CCallback or just asyncCheck a proc that does `while true: do stuff; await sleepAsync(timems)`
00:42:04FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3V6A
00:42:15FromDiscord<impbox [ftsf]> ahh!
00:42:17FromDiscord<impbox [ftsf]> thanks
00:43:53FromDiscord<Elegantbeef> Hey yard you know async, is there a better way of doing this? https://github.com/pietroppeter/nimibook/pull/53/files#diff-296b9b043ee4ab30b508d575fde250f3ef5306782e0da8e1ef7bf84011d10f5eR49-R70
00:44:32FromDiscord<Elegantbeef> It's basically `all` but chronological
00:45:31FromDiscord<Yardanico> i barely know async, but i don't think there's a better way
00:45:36FromDiscord<Yardanico> well maybe with asynctools?
00:45:45FromDiscord<Elegantbeef> Hey that's like the first time i've written an async proc
00:45:46FromDiscord<Yardanico> https://github.com/cheatfate/asynctools
00:45:51FromDiscord<Yardanico> "Asynchronous process manipulation facility with asynchronous pipes as standart input/output/error handles, and asynchronous."
00:46:28FromDiscord<Elegantbeef> Perhaps in a refactor if they're down with it
00:46:36FromDiscord<Elegantbeef> I mostly did it just cause @Phil bitched about build times
00:58:15FromDiscord<huantian> In reply to @Elegantbeef "<@300050030923087872>\: you do `privateAccess(TheTy": yeah that didn't work unfortunately
00:58:54FromDiscord<Elegantbeef> that's for accessing private fields
00:58:57FromDiscord<Elegantbeef> If it's a property it doesnt work
00:59:34FromDiscord<huantian> fields are the things defined in the `type` block right
00:59:38FromDiscord<Yardanico> yes
01:00:53FromDiscord<huantian> https://play.nim-lang.org/#ix=3V6G
01:00:55FromDiscord<huantian> this is what I tried
01:00:57FromDiscord<Elegantbeef> I do know private access works since it's how i get around object variants with nimscrripter
01:01:44FromDiscord<Elegantbeef> `getBody` isnt a property
01:02:27FromDiscord<huantian> yes it's a field
01:02:39FromDiscord<Elegantbeef> I mean it is
01:03:04FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/963967592119291954/image.png
01:03:09FromDiscord<Elegantbeef> No `getBody`
01:03:25FromDiscord<Elegantbeef> Oh shit client
01:04:46FromDiscord<Elegantbeef> Odd it doesnt work for this then
01:04:53FromDiscord<Elegantbeef> Might be aliasing that causes it
01:04:58FromDiscord<huantian> I mean this is kind of cursed anyways, so I probably won't use it↵but it would be nice to figure out where I went wrong
01:05:06*rockcavera quit (Ping timeout: 250 seconds)
01:17:47*neurocyte8614492 quit (Ping timeout: 240 seconds)
01:34:38*zeus-supreme joined #nim
01:37:36*zeus-supreme1 quit (Ping timeout: 250 seconds)
01:49:14FromDiscord<TryAngle> is there a good imap client in nim?
01:49:34FromDiscord<Yardanico> In reply to @TryAngle "is there a good": i don't know about "good"
01:49:36FromDiscord<Yardanico> but there are a few
01:52:07FromDiscord<TryAngle> Hmm guess I gonna reinvent the wheel on this one then
02:29:18*arkurious quit (Quit: Leaving)
02:34:54*rockcavera joined #nim
02:34:54*rockcavera quit (Changing host)
02:34:54*rockcavera joined #nim
03:04:41*jmd_ joined #nim
03:04:42*jmdaemon quit (Ping timeout: 250 seconds)
03:15:21*crem quit (Ping timeout: 245 seconds)
03:47:48FromDiscord<impbox [ftsf]> sent a code paste, see https://paste.rs/jIw
03:48:22FromDiscord<impbox [ftsf]> something to do with async magic maybe
03:48:30FromDiscord<Elegantbeef> Code?
03:49:00FromDiscord<impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=3V73
03:49:31FromDiscord<Yardanico> you can't pass `var`s to async procedures
03:49:35FromDiscord<Yardanico> because they're closure iterators in the end
03:49:39FromDiscord<impbox [ftsf]> ooh
03:49:54FromDiscord<Elegantbeef> Needs to be ref
03:50:09FromDiscord<Elegantbeef> Or return a value
03:50:27FromDiscord<impbox [ftsf]> I guess i'll ref all the things then
03:50:32FromDiscord<Elegantbeef> @huantian\: another thing to look at 🙂
03:50:43FromDiscord<impbox [ftsf]> thanks
03:51:03FromDiscord<Elegantbeef> Just keep bugging huan with the async stuff they'll either implement it or tell me to fuck off 😛
04:02:57*dom96 quit (Ping timeout: 256 seconds)
04:03:43*dom96 joined #nim
04:10:14FromDiscord<huantian> that doesn't seem too hard to do? maybe
04:10:34FromDiscord<Yardanico> In reply to @Elegantbeef "<@300050030923087872>\: another thing to": well, that's not so easy
04:10:42FromDiscord<Yardanico> how can you ensure memory safety if you capture a `var` in a closure
04:11:01FromDiscord<Elegantbeef> Yea just check for `var T` and if it is emit a `"Cannot use var parameters, if you want to capture a `var`use`ref T` or return the value and assign"`
04:11:12FromDiscord<Yardanico> ah you mean that, yes
04:11:39FromDiscord<Elegantbeef> Huan and i have a back and forth making async less fugly
04:11:59FromDiscord<Elegantbeef> In many cases it's putting lipstick on a pig but we've got nicer errors for `await`
04:14:43*jmd_ quit (Ping timeout: 256 seconds)
04:14:57*jmdaemon joined #nim
04:16:57*dogtooth joined #nim
04:17:16dogtoothhey hey people dogtoof here
04:17:22dogtoothhow's it going?
04:17:50FromDiscord<Elegantbeef> Hello, you've reach the nim hotline, please leave your question after the beeep 😀
04:18:00FromDiscord<Yardanico> beeef
04:18:21FromDiscord<Elegantbeef> Yes?
04:18:49FromDiscord<Yardanico> yes
04:19:20dogtoothare there any standard/accepted methods for working with PDFs graphically? I want to make a simple (famous last words) PDF front-end to collate notes with pages.
04:19:33FromDiscord<Rika> PDFs are a nightmare last time I recall
04:19:38FromDiscord<Elegantbeef> Yep
04:19:40dogtooththis is true
04:19:48FromDiscord<Rika> May god bless your soul
04:20:22FromDiscord<huantian> make sure to implement embedded js in your pdfs
04:20:24dogtoothisn't the FFI story for nim really good? I don't mind farming things out to other languages where it's better... I might also need to just rely on a browser interface
04:20:44FromDiscord<Elegantbeef> It's pretty good, especially with things like futhark
04:20:44FromDiscord<hamstringlovebased22> Basically the corporate equivalent of trying to work with loonix source code.↵Except that Linux is corporate now, so no difference really.↵(@Rika)
04:20:48dogtoothgood idea huantian, how do I give it maximum permissions for A+++ security?
04:21:10FromDiscord<Elegantbeef> Uhoh 'loonix'
04:21:23FromDiscord<Yardanico> laneecks
04:21:42FromDiscord<hamstringlovebased22> Lamenux↵(@Yardanico)
04:21:50FromDiscord<Elegantbeef> Handmade hero?
04:21:53FromDiscord<Yardanico> goodux
04:22:19FromDiscord<Rika> In reply to @hamstringlovebased22 "Basically the corporate equivalent": I have experience with it but I cannot imagine it being worse than windows in terms of source code
04:22:26FromDiscord<Rika> I heard windows was tens of millions of lines
04:22:44FromDiscord<Yardanico> well windows is different because it's more integrated
04:22:50FromDiscord<Yardanico> linux is just a part of the typical linux distro
04:22:52FromDiscord<Rika> That is true
04:23:07FromDiscord<Rika> The line count isn’t the whole story anyway
04:23:25FromDiscord<Rika> I still cannot imagine it being worse
04:23:38FromDiscord<hamstringlovebased22> Yep, and it actually works and doesn't need the user to fix its problems by re-writing its kernel lol.↵(@Rika)
04:24:12FromDiscord<Rika> Dunno, I’ve gone through much more Windows errors and crashes than Linux ones
04:24:16FromDiscord<hamstringlovebased22> Not that loonixers are honestly capable of re-writing their own kernels.
04:24:20FromDiscord<Yardanico> lets not do the linux vs windows debate here at least please :)
04:24:23FromDiscord<Yardanico> we have #offtopic for that
04:24:28FromDiscord<Yardanico> it's an endless topic, just like vim vs emacs
04:24:38FromDiscord<hamstringlovebased22> So you are a pathological liar lol.↵(@Rika)
04:24:38FromDiscord<Rika> Hey man I use either
04:24:48FromDiscord<Rika> They’re okay, I prefer Linux, that’s that
04:24:50FromDiscord<Rika> You do you
04:24:53FromDiscord<hamstringlovebased22> Hey man, you're a pathological liar↵(@Rika)
04:25:00FromDiscord<Yardanico> In reply to @hamstringlovebased22 "Hey man, you're a": calm down maybe?
04:25:02FromDiscord<huantian> In reply to @Yardanico "it's an endless topic,": this still makes me laugh whenever I think of it https://media.discordapp.net/attachments/371759389889003532/964018417269104710/unknown.png
04:25:03FromDiscord<Elegantbeef> Jesus i'll never get the belief that windows is perfect
04:25:04FromDiscord<Rika> Hey man, you’re an intolerable cunt so
04:25:10FromDiscord<hamstringlovebased22> Nah, you're just a pathological liar↵(@Rika)
04:25:20FromDiscord<huantian> now you're just spamming
04:25:20FromDiscord<ynfle> In reply to @huantian "this still makes me": This is great
04:25:21FromDiscord<Elegantbeef> If windows is so perfect how come there's a windows 11
04:25:22FromDiscord<Yardanico> is this what the windows folks are up to nowadays
04:25:23FromDiscord<hamstringlovebased22> Because I call out someone that is clearly just lying?↵(@Rika)
04:25:24FromDiscord<Elegantbeef> Checkmate winblows users
04:25:35FromDiscord<Rika> In reply to @Yardanico "is this what the": Dunno
04:25:49FromDiscord<Elegantbeef> Well they have a lot of downtime between forced updates to shit post
04:26:01FromDiscord<Rika> I guess it’s time to ignore then, since he clearly can’t show me why I’m a liar other than “just because”
04:26:18FromDiscord<hamstringlovebased22> wow, occasionally somebody enters your echo chamber and disrupts it.↵(@Yardanico)
04:26:34FromDiscord<hamstringlovebased22> That is all you can ever do. Ban and ignore.↵(@Rika)
04:26:46FromDiscord<Yardanico> In reply to @hamstringlovebased22 "wow, occasionally somebody enters": maybe you should remember that this isn't your typical offtopic chat
04:26:51FromDiscord<Yardanico> people discuss real stuff here, not pointless debates
04:26:54FromDiscord<Rika> We would have been more accepting of you if you were not as rude
04:27:16FromDiscord<hamstringlovebased22> But you are clearly a pathological liar.↵(@Rika)
04:27:22FromDiscord<Elegantbeef> Lol
04:27:27FromDiscord<Rika> And does that give you the excuse to be rude lol
04:27:32FromDiscord<Rika> Let’s say I am sure
04:27:39FromDiscord<Rika> Does that mean you are allowed to be rude
04:27:49*jmd_ joined #nim
04:27:57FromDiscord<hamstringlovebased22> Yeah, two word statements 90% of the time until someone suggests that linux is maybe not as good as they think it is.↵(@Yardanico)
04:28:07FromDiscord<Yardanico> again, this is not a linux chat
04:28:12FromDiscord<Yardanico> so take your debates elsewhere
04:28:19*jmdaemon quit (Ping timeout: 256 seconds)
04:28:20FromDiscord<Rika> Yeah I should stop as well
04:28:23FromDiscord<hamstringlovebased22> It is a public service to be rude to bad people.↵(@Rika)
04:28:33FromDiscord<hamstringlovebased22> apparently it is.↵(@Yardanico)
04:28:38FromDiscord<Rika> Wow so that’s how the world revolves around nowadays
04:28:46FromDiscord<Elegantbeef> No it's actually a programming language's main chat
04:29:17FromDiscord<hamstringlovebased22> Yep. People that do the wrong thing are insulted every day honey↵(@Rika)
04:29:36FromDiscord<hamstringlovebased22> Been like that since the dawn of civilization.
04:29:41FromDiscord<huantian> In reply to @Elegantbeef "Yea just check for": but maybe they should learn how the programming language that they use actually works↵just kidding 😛 ↵I do see where araq is coming from but imo that is a bit of a hot take
04:30:08FromDiscord<Elegantbeef> Wait what error did he complain about?
04:30:40FromDiscord<huantian> he commented after merging the await error pr↵<https://github.com/nim-lang/Nim/pull/19622#issuecomment-1098485995>
04:30:57FromDiscord<Elegantbeef> What a fucking joke
04:31:29FromDiscord<hamstringlovebased22> It obviously isn't. But apparently Loonix is.
04:31:51FromDiscord<Elegantbeef> I'll go get my tape measure make sure you do from the bone to the tip ok?
04:32:04FromDiscord<Rika> Beef you too please let’s not haha
04:32:22FromDiscord<Elegantbeef> I just said i wasnt going to partake in the dick measuring contest
04:32:34FromDiscord<hamstringlovebased22> Are any of you arch linux users lol
04:33:00dogtoothnot arch but manjaro
04:33:03FromDiscord<Elegantbeef> Yea huan that's quite an odd take given the error was 100% unhelpful
04:33:14dogtoothhighly recommend manjaro btw
04:33:24FromDiscord<Elegantbeef> I'm fairly compelling in my arguments so i guess if you add anymore i'll argue for you 😛
04:33:57FromDiscord<Elegantbeef> I see yard has jump on matrix for no specific reason 😉
04:34:04FromDiscord<Rika> Probably to DM you
04:34:10FromDiscord<huantian> I mean it does make sense that eventually you'd want to learn how exactly async works
04:34:19FromDiscord<huantian> but for such a simple error a better message makes sense
04:34:23*rockcavera quit (Remote host closed the connection)
04:34:30FromDiscord<Rika> In reply to @huantian "I mean it does": Most people don’t
04:34:35FromDiscord<Elegantbeef> Yea just sent a message '2 inches'
04:35:26FromDiscord<Elegantbeef> Eh i disagree
04:35:26FromDiscord<Elegantbeef> You shouldnt have to learn how async works to work with it, it's a high level abstraction
04:35:26FromDiscord<hamstringlovebased22> Why would you use Nim instead of C?
04:35:27FromDiscord<Yardanico> exactly, everyone should use C
04:35:31FromDiscord<Elegantbeef> Stronger type system, no manual memory management, macro's, compile time evaluation
04:35:31FromDiscord<huantian> ikr C is such a fun language to use tbh
04:35:40FromDiscord<Elegantbeef> Oh you just wanted fuel for a argument?
04:35:57dogtoothman is this chat normally such a cluster?
04:36:14FromDiscord<huantian> it's a cluster when people incite arguments 😉
04:36:21FromDiscord<Anuke> I watch it regularly, and no, it is not.
04:36:36FromDiscord<Elegantbeef> Your tin foil hat might be a little tight, try rotating towards the nearest 5g signal
04:36:36FromDiscord<hamstringlovebased22> YOU WANT manual memory management.
04:36:37FromDiscord<Elegantbeef> Nope i can write code as fast as yours without it
04:36:37FromDiscord<hamstringlovebased22> Holy shivers, you mean people think for themselves?
04:36:40FromDiscord<Elegantbeef> Nope
04:36:45FromDiscord<huantian> wow matrix bridge is having a fun time
04:36:57FromDiscord<Elegantbeef> Probably for the best
04:36:58FromDiscord<Rika> In reply to @Elegantbeef "Your tin foil hat": Beep hoop
04:37:04FromDiscord<Rika> Boop I mean
04:37:07FromDiscord<Rika> Fingers bad
04:37:09FromDiscord<Elegantbeef> Anuke i knew it you're a lurker!
04:37:14FromDiscord<Anuke> 👀
04:37:15dogtoothokay cool, I'm really excited about Nim! It looks like a compiled python, is that about right or am I thinking about it bad?
04:37:23FromDiscord<Rika> Bad
04:37:24FromDiscord<Elegantbeef> It's not
04:37:32FromDiscord<Rika> Not really similar to Python at all
04:37:41FromDiscord<Elegantbeef> Aside from passing similarities it's really different
04:37:41FromDiscord<Rika> Only looks the part due to syntax
04:37:45FromDiscord<Rika> Otherwise many differences
04:37:57FromDiscord<Elegantbeef> It's different for the better imo
04:38:17FromDiscord<hamstringlovebased22> I guess that is the point of higher level languages.↵It allows faster development time from less talented coders at the cost of bugs and slower program run times.↵A corporations wet dream. They are good for prototyping ideas though.
04:38:26dogtoothsweet, are there any projects or packages you guys would recommend reviewing for a taste of what I'm getting into?
04:38:35FromDiscord<Elegantbeef> Yep it's why you write code in ASM and not C right?
04:38:52FromDiscord<Rika> In reply to @dogtooth "sweet, are there any": Whatever you encounter would be fine
04:38:54FromDiscord<hamstringlovebased22> Nothing tinfoil about obvious statements mate.
04:39:12FromDiscord<huantian> In reply to @dogtooth "sweet, are there any": yeah like rika said, no use in trying to seek out packages
04:39:14FromDiscord<Yardanico> as some guy would say, stop feeding the troll (c)
04:39:21FromDiscord<Rika> Some guy?
04:39:23FromDiscord<Rika> Who?
04:39:26FromDiscord<Yardanico> some popular guy
04:39:32FromDiscord<Yardanico> he's named iraq or something
04:39:42FromDiscord<Elegantbeef> Damn a man named after a country
04:39:47FromDiscord<huantian> man I wish I was as cool as iraq
04:39:48FromDiscord<hamstringlovebased22> Hardware drivers are written partially or totally in assembly for that reason.↵Even many big music programs.
04:40:20FromDiscord<huantian> \<man I have no idea what this is for?↵https://github.com/huantianad/Nim/blob/ef7d7f24594b1ea560fbf25d3fa0d6c51122725f/lib/pure/asyncmacro.nim#L107-L114↵What do FutureVars even do anyways, are they supposed to be a replacement for var params in async procs?
04:40:26FromDiscord<hamstringlovebased22> Everyone that disagrees with you is a troll (2022 revised meaning of the word troll).↵(@Yardanico)
04:40:42FromDiscord<huantian> I saw them mentioned somewhere as that but I can't find any documentation on how it would be used as such
04:40:51FromDiscord<Yardanico> never used them really
04:40:57FromDiscord<Yardanico> despite using async for quite a lot of small stuff
04:40:58FromDiscord<Anuke> completely unrelated question, how does the whole moderation thing work on the matrix end?
04:41:20FromDiscord<Elegantbeef> They just seem to be distinct Futures
04:41:27FromDiscord<Elegantbeef> Poorly since we lack many mods here↵(@Anuke)
04:41:29FromDiscord<hamstringlovebased22> Haha.↵(@Anuke)
04:41:53FromDiscord<hamstringlovebased22> what a mentally ill room lol
04:41:57FromDiscord<Rika> You did say bad people get met with opposition
04:42:33FromDiscord<Rika> Everyone sounds crazy to someone who thinks crazy is normal and normal is crazy
04:42:37FromDiscord<huantian> documentation says> This Future type is ideally suited for situations where you want to avoid unnecessary allocations of Futures.
04:42:48FromDiscord<huantian> which seems like a very small usecase?
04:43:28FromDiscord<hamstringlovebased22> Or you're just a butt-hurt pathological liar that is in love with his particular distro.↵(@Rika)
04:43:44FromDiscord<huantian> this forum post notes the use of it as an alternative for `var T`↵https://forum.nim-lang.org/t/8047
04:44:16*dropkick quit (Remote host closed the connection)
04:45:22FromDiscord<Rika> Haha, I never even mentioned my distro
04:45:53FromDiscord<Elegantbeef> Is it meant for like thunking?
04:45:58FromDiscord<Rika> Are you sure you’re not imposing your impressions of me onto me?
04:46:01FromDiscord<spoon> i believe in hannah montana linux supremacy
04:46:06FromDiscord<Rika> In reply to @spoon "i believe in hannah": Lol
04:46:24FromDiscord<Elegantbeef> Personally i've never seen hannah montana and windows in the same room
04:46:39FromDiscord<huantian> I think hannah montana is just afraid of what's outside of the windows
04:46:48*jmd_ quit (Ping timeout: 248 seconds)
04:47:01FromDiscord<katlyn> Biebian's another great distro, 11/10 recommend
04:47:19FromDiscord<Elegantbeef> Well if futurevar is supposed to be used for `var T` conversions, perhaps it's time to enable that but i dont know how aside from a thunk like thing
04:47:23FromDiscord<spoon> oh-
04:47:55FromDiscord<spoon> i'd say AmongOS but didnt they add crypto miners
04:47:56FromDiscord<Elegantbeef> Pulling all the people out of the woodwork for this shitpost
04:48:04*jmdaemon joined #nim
04:48:22FromDiscord<Rika> In reply to @Elegantbeef "Personally i've never seen": It’s pretty good from what I heard
04:48:33FromDiscord<Rika> In reply to @spoon "i'd say AmongOS but": Eeh they did?
04:48:42FromDiscord<Rika> In reply to @Elegantbeef "Pulling all the people": Pretty hilarious ngl
04:49:13FromDiscord<spoon> In reply to @Rika "Eeh they did?": yeah, mightve been a "turn it on if you want to support the developer" thing but i dont really remember
04:49:21FromDiscord<huantian> https://play.nim-lang.org/#ix=3V7g↵why does this crash playground am I doing it wrong
04:50:19FromDiscord<Rika> In reply to @spoon "yeah, mightve been a": Ah then that’s at least better than what I though
04:50:22FromDiscord<Rika> Thought
04:50:24FromDiscord<Elegantbeef> The playground isnt great for things with delay so might just be that
04:50:43FromDiscord<huantian> perhaps↵this is my cue to stop doing useful things and start playing vidja games
04:50:47FromDiscord<Rika> It doesn’t seem to crash, just gets timed out
04:50:50FromDiscord<Rika> Kill by time out
04:50:52FromDiscord<Elegantbeef> It does work fine with 1.4.8
04:51:23FromDiscord<huantian> that's strange
04:51:25FromDiscord<Elegantbeef> What vidja game?
04:51:46FromDiscord<7368moons> Ubuntu had crypto miners at some point and RMS pointed it out.
04:52:20FromDiscord<Elegantbeef> Did someone realy just responde to me to prove the shitposting is pulling people in?
04:52:39FromDiscord<Elegantbeef> This is a matrix user...
04:52:39FromDiscord<huantian> phoenix wright
04:52:46FromDiscord<huantian> on trials and tribulation rn
04:53:13FromDiscord<Elegantbeef> So either someone randomly joined after the shitposting or that's someone related to the shitposting
04:53:20FromDiscord<Yardanico> !matrix ban @hamstringlovebased22:matrix.kiwifarms.net
04:53:28FromDiscord<matrix-appservice-discord-t2bot> sent a long message, see http://ix.io/3V7i
04:53:31FromDiscord<7368moons> ?
04:53:32FromDiscord<Elegantbeef> Well until proven otherwise, welcome
04:53:42FromDiscord<spoon> wow
04:53:43FromDiscord<Yardanico> 😴
04:53:46FromDiscord<aph> wow
04:53:51FromDiscord<Yardanico> In reply to @spoon "wow": doesn't work, and matrix people don't see it
04:54:06FromDiscord<Yardanico> 123
04:54:15FromDiscord<Yardanico> t2bot is lagging or what
04:54:20FromDiscord<Yardanico> yeah it is a bit
04:54:23FromDiscord<huantian> well they won' see it anyways if bridge is brokey
04:54:28FromDiscord<Yardanico> xdd
04:55:34FromDiscord<Elegantbeef> Any actual Nim related stuff?
04:57:07FromDiscord<Yardanico> no, all nimmers are asleep
04:57:10FromDiscord<Yardanico> post Zig stuff
04:57:21FromDiscord<Yardanico> https://github.com/Anuken/animdustry if you want nim
04:57:23FromDiscord<Yardanico> from #gamedev
04:57:25FromDiscord<aph> help, how to make types of variables change
04:57:27FromDiscord<aph> 🥺
04:57:29FromDiscord<Rika> Static vs comptime fight
04:57:32FromDiscord<Yardanico> In reply to @aph "help, how to make": `a = b`
04:57:34FromDiscord<Rika> In reply to @aph "help, how to make": What
04:57:42FromDiscord<Yardanico> In reply to @Rika "What": trying to be le fune
04:57:43FromDiscord<7368moons> Did anyone else use the Ubuntu commands to organize, duplicate and copy data↵before learning how to code their own solutions instead?↵I used Nim and python for a bit.
04:57:44FromDiscord<7368moons> Yep, and all the hundred others.
04:57:44FromDiscord<Elegantbeef> Are we talking about the shell `cp` `mv` and the like?
04:58:08FromDiscord<aph> sent a code paste, see https://paste.rs/LAo
04:58:10FromDiscord<aph> since it's still `MalObj`
04:58:12FromDiscord<Elegantbeef> Statically typed languages are static
04:58:16FromDiscord<Yardanico> @aph you need to use object variants for that
04:58:22FromDiscord<Yardanico> you used generics, they're compile time only
04:58:29FromDiscord<Yardanico> so `test` only has MInt type and can never change
04:58:31FromDiscord<Elegantbeef> Eh they can use inheritance
04:58:39FromDiscord<Yardanico> true
04:58:43FromDiscord<Yardanico> but they used generics :P
04:58:44FromDiscord<aph> ok
04:58:50FromDiscord<7368moons> Ah yes, object orientated mumbo jumbo
04:58:53FromDiscord<Elegantbeef> You can use generics with inheritance
04:59:01FromDiscord<aph> In reply to @Elegantbeef "You can use generics": 🥴
04:59:09FromDiscord<aph> 😵‍💫
04:59:27FromDiscord<aph> will do! ty
05:00:06FromDiscord<7368moons> Did this a while back https://internet-of-tomohiro.netlify.app/nim/nim4k.en.html
05:00:34*jmd_ joined #nim
05:00:40*jmdaemon quit (Ping timeout: 248 seconds)
05:01:09FromDiscord<7368moons> Nim for the Demoscene!!!
05:01:10FromDiscord<huantian> i read 4k as 4k rhythm game 🥴
05:02:16FromDiscord<Anuke> In reply to @Yardanico "https://github.com/Anuken/animdustry if you want": also, I was going to ask: does anybody know why this takes an unreasonably long time to compile? I suspect it's all mostly polymorph doing a lot of macro stuff, but I'm not quite sure.
05:02:16FromDiscord<7368moons> oh haha! 4k video, images, rhythm games and demos lol
05:03:01FromDiscord<Anuke> I believe Treeform made a post of a project with roughly the same amount of LoC as my project compiling in 4 seconds. In my case, it takes 30+, and I have a beefy CPU
05:03:37FromDiscord<Yardanico> well LoC doesn't really work for Nim since you have all kinds of macros and stuff :)
05:03:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3V7k
05:04:08FromDiscord<aph> :wow:
05:04:11FromDiscord<aph> thanks!
05:04:13FromDiscord<Rika> In reply to @huantian "i read 4k as": Rhythm game brain rot
05:04:27FromDiscord<spoon> In reply to @Yardanico "https://github.com/Anuken/animdustry if you want": oh yeah, i tried cross compiling for windows and it just told me TRANSPARENT_FRAMEBUFFER didnt exist
05:04:34FromDiscord<Yardanico> In reply to @spoon "oh yeah, i tried": read the readme
05:04:39FromDiscord<huantian> dang dynamic dispatch in my language?
05:04:43FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/964028409221099581/unknown.png
05:04:55FromDiscord<Yardanico> but cross compilation works, evident by the windows binaries in releases
05:04:56FromDiscord<Anuke> That's a weird error
05:05:05FromDiscord<Anuke> did you install properly?
05:05:13FromDiscord<Elegantbeef> Anuke enable output of module names at compile time and see which modules it stays at a while
05:05:14FromDiscord<huantian> yeah you gotta do `nimble deploy win`
05:05:21FromDiscord<spoon> i did, i got all the deps and used nimble deploy win
05:05:38FromDiscord<spoon> In reply to @Yardanico "": over wsl on arch
05:06:00FromDiscord<Anuke> In reply to @Elegantbeef "Anuke enable output of": what's the flag for that?
05:06:17FromDiscord<Elegantbeef> You can also `--include` with a file that prints out the time at compile time
05:06:19FromDiscord<Yardanico> it might not work with nimble though
05:06:24FromDiscord<Yardanico> i mean that flag
05:06:40FromDiscord<Anuke> In reply to @spoon "i did, i got": try pulling and installing again, I might have used an older dependency - which is strange, because it compiles correctly on my container and CI...
05:06:45FromDiscord<Elegantbeef> `--processing:filenames`
05:07:24FromDiscord<Elegantbeef> Yardanico we're just trying to do some benchmarking to see which modules take the longest
05:07:28FromDiscord<Yardanico> Hint: > main: include: /home/dian/animdustry/src/menus.nim [Processing] stays there for a long time
05:07:51FromDiscord<Yardanico> yeah that module took the longest
05:07:57FromDiscord<Anuke> That's where all the polymorph stuff is
05:07:57FromDiscord<Yardanico> and then the usual C compilation
05:09:09FromDiscord<Yardanico> wow nice you're actually using arc
05:09:34FromDiscord<Anuke> is that rare?
05:09:47FromDiscord<Yardanico> not rare, but not a lot of people use arc even nowadays :)
05:09:50FromDiscord<spoon> In reply to @Anuke "try pulling and installing": same error, freshly installed nim instance from earlier today too
05:09:58FromDiscord<Yardanico> especially for something that is in production kind of
05:10:03FromDiscord<Anuke> I thought I would run into cycle issues, but that hasn't happened... yet
05:10:12FromDiscord<Yardanico> for cycles you just do --gc:orc
05:10:15FromDiscord<Elegantbeef> Are you actually checking if you leak?
05:10:21FromDiscord<Yardanico> ^ that too, yeah
05:10:33FromDiscord<Yardanico> --gc:arc -d:useMalloc and then run with valgrind
05:10:47FromDiscord<Elegantbeef> Look at this schmuck saying what i was going to say
05:11:00FromDiscord<Yardanico> it might find leaks due to nim bugs, your code bugs, your C libs wrapper bugs, etc
05:11:05FromDiscord<Elegantbeef> I mean it's an ECS based game not many if any cyclical structures i imagine
05:11:15FromDiscord<huantian> Nim bugs? those can't exist
05:11:15FromDiscord<Anuke> I've run Valgrid on it, and it spewed out some nonsense related to graphics drivers, which made it difficult to figure out if I actually had any real leaks
05:11:30FromDiscord<Anuke> does it show stack traces for leaks?
05:11:55FromDiscord<Yardanico> yes
05:11:56FromDiscord<Elegantbeef> Not that i know of it just says "allocated X and freed Y % of frees"
05:12:17FromDiscord<Yardanico> lemme reboot into lanocks and try to run it
05:12:23FromDiscord<Elegantbeef> Linsux\
05:12:45FromDiscord<Anuke> loonix even
05:13:35FromDiscord<Elegantbeef> ShitboxOs perhaps
05:13:49FromDiscord<huantian> I dont' like valgrind, tis far better to just leave your programming running overnight and see if it crashed in the morning
05:14:12FromDiscord<Elegantbeef> Tooling is for nerds i only use my teeth to spin wood on a lathe
05:15:25FromDiscord<7368moons> ls, sha256sum, md5, rsync.all the file data is then listed with size, name, directory, hash and type.↵Different list of files from hard-drive data copies can then be compared with Vim↵to find any file errors.
05:15:31FromDiscord<Anuke> This looks scary, but I'm not sure how much of this is just me not bothering to dispose the music assets https://media.discordapp.net/attachments/371759389889003532/964031123439091732/unknown.png
05:15:47FromDiscord<Yardanico> definitely lost is at least 50kb only
05:15:55FromDiscord<Yardanico> indirectly might be a leak, but also might be some globals and stuff
05:16:04FromDiscord<Yardanico> ill try to check as well
05:16:09FromDiscord<Anuke> https://media.discordapp.net/attachments/371759389889003532/964031284194193408/unknown.png
05:16:27FromDiscord<Yardanico> yeah this just ignore
05:16:29FromDiscord<7368moons> Yeah, there always seems to be something wrong.
05:16:30FromDiscord<Anuke> (x11/nvidia driver related errors, apparently "normal")
05:17:34FromDiscord<7368moons> That is normal, hardware issues are pretty universal with this kind of stuff.↵ Not going to point fingers or name names.
05:18:14FromDiscord<Yardanico> also @Anuke jesus christ
05:18:15FromDiscord<Yardanico> "4.717GiB peakmem;"
05:18:28FromDiscord<Yardanico> the compiler surely has some fun with your macros :P
05:19:26FromDiscord<Anuke> Hey they're not my macros
05:20:17FromDiscord<7368moons> macros are a sign of inferiority
05:20:20FromDiscord<spoon> noted never use macros ever
05:20:30FromDiscord<7368moons> macros are for morons
05:20:31FromDiscord<Anuke> I ran with --leak-check=full, and there's a wall of issues, mostly from sounds
05:20:49FromDiscord<Anuke> but some from nim itself, it seems
05:21:04FromDiscord<spoon> uh oh
05:21:24FromDiscord<7368moons> terrible language, terrible coder with the brain of a pet cat.
05:22:27FromDiscord<spoon> i bet you use javascrpt
05:22:45FromDiscord<spoon> i didnt know there was a leak check command, huh.
05:24:16FromDiscord<Rika> Uh oh
05:24:45FromDiscord<spoon> yea
05:26:05FromDiscord<Anuke> seems to "leak" just as much with --gc:orc
05:28:03FromDiscord<spoon> blame the compiler?
05:28:48FromDiscord<Anuke> correction: almost as much, there's a difference of <200 bytes
05:29:09FromDiscord<spoon> oh
05:29:11FromDiscord<Yardanico> that might just be due to different executions
05:31:41FromDiscord<7368moons> sent a long message, see https://paste.rs/RdG
05:32:52FromDiscord<Rika> Beep book
05:32:55FromDiscord<Rika> FUCK
05:33:03FromDiscord<Rika> Why do I fuck that shit up all the time
05:33:11FromDiscord<Anuke> very human
05:33:12FromDiscord<Yardanico> is today the international troll day or what
05:33:13FromDiscord<aph> boop
05:33:26FromDiscord<aph> In reply to @Yardanico "is today the international": international keyboard troll
05:33:28FromDiscord<Rika> He’s at least funny man
05:33:36FromDiscord<Rika> The other guy was just eh
05:33:38FromDiscord<Anuke> anyway it looks like with refc the leak is reduced to 7kb, not 50
05:33:46FromDiscord<Anuke> concerning
05:33:55FromDiscord<Yardanico> with refc useMalloc doesn't work
05:33:58FromDiscord<Yardanico> just fyi
05:34:03FromDiscord<Yardanico> so all nim allocations are invisible to valgrind
05:34:21FromDiscord<Anuke> oh
05:34:24FromDiscord<Yardanico> there's https://github.com/nim-lang/Nim/pull/16761 but it's not mergedf
05:34:25FromDiscord<Yardanico> (edit) "mergedf" => "merged"
05:35:02FromDiscord<Yardanico> this looks like an actual leak 🤔 https://media.discordapp.net/attachments/371759389889003532/964036029591990302/unknown.png
05:36:23FromDiscord<Anuke> it does
05:36:47FromDiscord<Yardanico> but yeah, those are quite small
05:37:39FromDiscord<Yardanico> fun game - take a random nim project, compile it with arc (or orc) and try to find memory leaks
05:37:57FromDiscord<aph> bu- but the `nim` game is trademarked
05:38:18FromDiscord<Yardanico> lemme find some random nim repo that was updated recently
05:38:56FromDiscord<Anuke> I fixed the audio leaks, and now it's just the "real" ones
05:39:07FromDiscord<Yardanico> they seem to be mostly related to shaders
05:39:17FromDiscord<Anuke> I might be doing something funny with cstrings
05:40:24FromDiscord<Yardanico> https://github.com/WonkySpecs/rolldice surely something as simple as this won't leak
05:40:43FromDiscord<Anuke> surely
05:40:59FromDiscord<Yardanico> ah well, it just doesn't compile due to sink inference
05:41:11FromDiscord<Anuke> Does this look smelly at all? <https://github.com/Anuken/fau/blob/master/src/fau/shader.nim#L118>
05:41:18FromDiscord<Anuke> There's a seq leak here somewhere, apparently
05:41:51FromDiscord<7368moons> sent a long message, see http://ix.io/3V7p
05:42:02FromDiscord<Yardanico> it all makes sense since I'm russian 🤔
05:42:26FromDiscord<Anuke> очень интересно
05:42:29FromDiscord<Yardanico> да
05:43:47FromDiscord<7368moons> With the power of google translate every↵Indian transforms into a Russian Hacker employed by the Kremlin.
05:44:16FromDiscord<impbox [ftsf]> hmm with async http client, can i make say 5 requests at once then handle the responses after they're all done? or does that require other forms of parallelism?
05:45:13FromDiscord<Yardanico> you can, yes
05:45:27FromDiscord<Yardanico> it won't be exactly at once, but close to that
05:45:32FromDiscord<impbox [ftsf]> yeah of course
05:45:39FromDiscord<Yardanico> https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D
05:45:47FromDiscord<Yardanico> just store your futures in a sequence and `await all(myseq)`
05:45:51FromDiscord<impbox [ftsf]> nice, thanks
05:47:11*slowButPresent quit (Quit: leaving)
05:59:22FromDiscord<Elegantbeef> If chronological completion matters i have an example in a PR 😀
05:59:32FromDiscord<7368moons> sent a long message, see http://ix.io/3V7q
06:11:31FromDiscord<Solitude> beef, what the hell https://github.com/nim-lang/Nim/pull/19711
06:11:47FromDiscord<Elegantbeef> The hell what?
06:12:05FromDiscord<Solitude> why did you instantly give up
06:12:09FromDiscord<Solitude> do you think araq knows better?
06:12:47FromDiscord<Elegantbeef> Notice he agreed, so i guess another PR will be eventually
06:14:23FromDiscord<Solitude> okay, okay
06:14:53FromDiscord<Elegantbeef> I dont know that part of the compiler well so i'll have to dick around with it for a bit
06:22:26FromDiscord<impbox [ftsf]> argh, async coding hurts my head >_<
06:23:07FromDiscord<impbox [ftsf]> do people actually find it easier than callbacks?
06:23:35FromDiscord<Elegantbeef> I mean it serves a different purpose
06:24:02FromDiscord<impbox [ftsf]> oh...
06:27:01FromDiscord<Rika> In reply to @impbox "do people actually find": Depends on the person
06:27:12FromDiscord<Rika> Or the use yeah
06:27:29FromDiscord<Rika> Callbacks work if you only need to deal with one event at a time in one function
06:27:46FromDiscord<Rika> Async is better for when one event spawns waiting for another then another then another
06:28:01FromDiscord<Rika> You can see how callbacks would be awful for the latter
06:30:16*m5zs7k quit (Ping timeout: 248 seconds)
06:30:53*m5zs7k joined #nim
06:59:48*Gustavo6046 quit (Remote host closed the connection)
07:00:37*Gustavo6046 joined #nim
07:28:58*xet7 joined #nim
07:30:04*gsalazar joined #nim
07:34:01*xet7 quit (Quit: Leaving)
07:34:50*xet7 joined #nim
07:38:13*yoyojambo quit (Read error: Connection reset by peer)
08:05:12*zeus-supreme1 joined #nim
08:08:11*zeus-supreme quit (Ping timeout: 256 seconds)
08:08:50*xet7 quit (Remote host closed the connection)
08:20:07*toulene8 joined #nim
08:22:34*toulene quit (Quit: Ping timeout (120 seconds))
08:22:34*toulene8 is now known as toulene
08:25:15*Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected])
08:28:01*def- quit (Quit: -)
08:28:13*def- joined #nim
08:29:44*jmd_ quit (Ping timeout: 248 seconds)
09:12:38*dtomato quit (Ping timeout: 272 seconds)
09:44:28*dtomato joined #nim
10:00:57FromDiscord<Phil> In reply to @Elegantbeef "I mostly did it": I fully support my name being used as justification to make things compile faster for any project whatsoever.↵If anyone needs a justification, feel free to use my namne
10:15:40FromDiscord<tandy> sent a code paste, see https://play.nim-lang.org/#ix=3V8q
10:20:44FromDiscord<tandy> figured it
10:31:17FromDiscord<Rika> Lol
10:39:24FromDiscord<hmmm> In reply to @Isofruit "I fully support my": oh so bitching is the key to activate the beefy engine? Well I want error messages of 1 (one) line explaining that the "proc expected foo but you fed it bar so stop being a nimlet and fix your code", if it exceeds one line it should truncate to exactly one line lol
10:42:03FromDiscord<Rika> In reply to @hmmm "oh so bitching is": Okay, 1000 character line for you
10:42:21FromDiscord<hmmm> aaaaaaaaaaaa
10:43:02FromDiscord<Phil> Out of curiosity, would it be possible to format the the suggestions differently when the compiler tells you that you used a proc wrong, there's only "other proc with other signatures" available ?
10:44:19FromDiscord<Phil> It's a thing I'd actually deeply appreciate, I find scanning through the parameters comparatively hard, though I guess that's also asking for a bit much
10:48:41FromDiscord<hmmm> hmm I think nim is doing the right thing but in an extremely verbose way that is offputting and unparsable (for me), when I get a metric ton text in my face it never helps me understand quickly where is the problem (and the problem is 90% very stupid). I wonder if an unofficial app could eat nim errors and spit out something more readable, but it seems something pretty hard to do
10:50:39FromDiscord<Rika> Skull is working on improving error handling
10:51:14FromDiscord<hmmm> uhh I'd rather all their effort be spent inside nim tbh, we are already small as it is
10:52:08FromDiscord<Rika> Tell that to them
10:52:53FromDiscord<hmmm> well they have their reason to do what they do, I just wish you know they found an agreement with araq and be back into nim
10:53:04FromDiscord<Rika> I believe they said that they aren’t doing so as the main Nim devs are not cooperative
10:53:07FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3V8x
10:53:29FromDiscord<Rika> I think it’s okay
10:54:12FromDiscord<hmmm> maybe araq should keep the core for the core and delegate all the rest to the community, I know he has a vision and it carried us well but maybe it's time to let something go to grow bigger and faster
10:54:20FromDiscord<Phil> It's definitely functional in that I can work with it, but I'd love a different spacing that allows me to more easily compare the parts after "got" and the parts after "expected one of"
10:55:36FromDiscord<Rika> In reply to @hmmm "maybe araq should keep": I doubt that he would agree with which and I would if I were him as well
10:56:33FromDiscord<hmmm> I mean what happens if skull gets fantastic error handling? nothing I won't get to use their work on nim 😦
10:56:46FromDiscord<Rika> You will, with skull?
10:57:20FromDiscord<hmmm> hmmm I trust araq vision for nim, he has excellent taste I don't want to jump ship
10:57:52FromDiscord<Rika> Okay
10:59:10FromDiscord<Rika> And it’s not like you have to either, who said you had to use one or the other
10:59:14FromDiscord<Rika> Why can’t you test both
10:59:43FromDiscord<hmmm> uhhh that is a recipe for premature white hair, I'll keep my mangled error messages 😦
10:59:52FromDiscord<Rika> Uh
10:59:54FromDiscord<Rika> You’re strange
10:59:55FromDiscord<Rika> Okay
11:00:20FromDiscord<hmmm> ye I'm known to be unreasonable and bitcy, don't mind me rika ❤️
11:02:05FromDiscord<Rika> Kinda like you want everything on a gold platter or something
11:03:16FromDiscord<hmmm> well I'm goldenspooned user I expect da best for myself 😃 , but yea you are right about that ofc
11:06:41FromDiscord<konsumlamm> In reply to @hmmm "well they have their": the reason nimskull exists is that they don't agree with Araq, idk how you imagine that to work
11:07:39FromDiscord<hmmm> heh a man can change idea, we are not blocks of stones after all
11:09:21FromDiscord<haxscramper> In reply to @Isofruit "Out of curiosity, would": If you want general reformatting you can look into presentFailedCandidates and put logic in there
11:09:42FromDiscord<haxscramper> That is - for error messages on sigmatch failure
11:16:05FromDiscord<Phil> In reply to @haxscramper "If you want general": As someone very much not in the know - presentFailedCandidates is a module name? A proc somewhere in the general nim-lang project? A hook? A document page somehwere on nim's official page?
11:17:20FromDiscord<haxscramper> https://github.com/nim-lang/Nim/search?q=presentFailedCandidates+&type=
11:17:54FromDiscord<Phil> Ahhh, a proc in the nim-lang project. Thanks! I'll take a look!
12:36:31*xet7 joined #nim
12:39:33*rockcavera joined #nim
12:39:33*rockcavera quit (Changing host)
12:39:33*rockcavera joined #nim
12:41:25*xet7 quit (Remote host closed the connection)
12:54:43*xet7 joined #nim
12:55:08*xet7 quit (Remote host closed the connection)
13:07:49*gsalazar quit (Remote host closed the connection)
13:08:06*gsalazar joined #nim
13:13:28*gsalazar quit (Ping timeout: 248 seconds)
13:26:54*arkurious joined #nim
13:34:06*noeontheend joined #nim
13:47:06*noeontheend quit (Remote host closed the connection)
13:48:24*noeontheend joined #nim
13:49:16FromDiscord<Yardanico> @ElegantBeef https://github.com/nim-lang/Nim/issues/19724 :P
14:34:37*zeus-supreme joined #nim
14:37:36*zeus-supreme1 quit (Ping timeout: 250 seconds)
15:04:30*gsalazar joined #nim
15:10:17FromDiscord<Anuke> In reply to @Yardanico "this looks like an": Turns out I was just being stupid, I wasn't calling `=destroy` for seq/table fields in my custom destructors for types
15:23:37*slowButPresent joined #nim
15:24:50*noeontheend quit (Ping timeout: 250 seconds)
15:33:38*Gustavo6046 joined #nim
15:34:35*Gustavo6046 quit (Remote host closed the connection)
15:34:59*Gustavo6046 joined #nim
15:37:43NimEventerNew thread by DMisener: Hopefully simple Nim syntax question , see https://forum.nim-lang.org/t/9104
15:39:34FromDiscord<hmmm> uh oh, that guy got hit by 57 lines of nim error 🤨
15:41:53FromDiscord<Rika> i HONESTLY stopped reading nim errors past "where the error happened"
15:42:02FromDiscord<Rika> and just look around where it happened myself
15:42:31FromDiscord<exelotl> dang their code looks fine too 😕
15:42:34FromDiscord<Rika> disclaimer that i'm aeverr, hi
15:42:35FromDiscord<Rika> lol
15:43:15FromDiscord<Rika> the error is because of `mapIt` and nim's pretty bad expression renderer
15:43:20FromDiscord<Rika> well, not really
15:43:25FromDiscord<Rika> thats somewhat disingenuous
16:05:24FromDiscord<Yayko> sent a long message, see http://ix.io/3Va1
16:08:49FromDiscord<hmmm> as a nim noob this is very interesting to me too. In my mind an object is a thing that has a life of it's own and ref is a mirror of something existing somewhere else but that's just how I picture it in my mind and I might be very wrong lol 🤔
16:09:59FromDiscord<Yardanico> In reply to @Yayko "Hello everyone, Sorry to": can you show in code what you mean by `ref Object`? I don't understand what ref Object you're talking about, since you're talking about `ref object`
16:10:19FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Va4
16:10:22FromDiscord<Yardanico> if so, then you can use it the same as `ref object` just by using `new`
16:10:44FromDiscord<hmmm> what was the difference between init and new yardy
16:10:59FromDiscord<Rika> name convention
16:12:10FromDiscord<hmmm> you mean that for tables for example I can either use new or init and it won't matter?
16:12:15FromDiscord<Yardanico> In reply to @hmmm "what was the difference": this is not the `new` vs `init` you're thinking about
16:12:30FromDiscord<Yardanico> nim has `new` specifically for creating ref objects
16:12:31FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#new%2Ctypedesc
16:12:59FromDiscord<Rika> In reply to @hmmm "you mean that for": it will, init is object new is ref
16:13:05FromDiscord<Yardanico> `let myobj = new MyTypeRef`
16:13:22FromDiscord<hmmm> In reply to @Rika "it will, init is": ah ok that was what I remembered
16:20:27*gsalazar quit (Ping timeout: 240 seconds)
16:21:09FromDiscord<pmunch> Hmm, I've seen quite a few questions about this recently. Maybe I should write a post on object vs. ref object that goes into a bit more detail than my last one\: https://peterme.net/nim-types-originally-a-reddit-reply.html
16:21:58FromDiscord<treeform> In reply to @Patitotective "`XgetPixel` returns a `culong`,": Hey do you know how to set icon with a pixie's Image on an x11 window?
16:23:13FromDiscord<!Patitotective> In reply to @treeform "Hey do you know": never tried it but it shouldn't so hard, let me check
16:23:15FromDiscord<Yayko> In reply to @Yardanico "or do you mean": I am following a tutorial on Sdl2_nim and there is that line https://media.discordapp.net/attachments/371759389889003532/964199162742726706/IMG_0711.png
16:23:25FromDiscord<Yardanico> yes, and what got you confused?
16:23:33FromDiscord<Yardanico> `App` here is no different from a usual `ref object`
16:23:43FromDiscord<Yardanico> you can create it with `new` as well, or assign data to it
16:23:58FromDiscord<treeform> In reply to @Patitotective "never tried it but": I think that would be related to your Image -> XImage work
16:24:45FromDiscord<!Patitotective> actually it was ximage -> image lol
16:24:54FromDiscord<Yardanico> also, apparently orc is faster for htmlparser + xmltree + nimquery stuff
16:24:55FromDiscord<Yardanico> than refc
16:25:19FromDiscord<Yardanico> around 30% faster in my usecase
16:25:53FromDiscord<Yardanico> with full optimizations + march + lto
16:26:40FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Va8
16:27:15FromDiscord<Yardanico> this parses an HTML page into an object with a lot of querySelector from nimquery
16:30:38FromDiscord<!Patitotective> @treeform https://stackoverflow.com/a/15595582/15339152 🤷‍♂️
16:33:24FromDiscord<jmgomez> hey guys, how is going? I dont get something, if I emit some definitions in file A and then include a type from C it does work fine. But if I import the type from file B in the same spot, it doesnt emit the definitions and that point. Is it because the file B is always loaded first?
16:34:58FromDiscord<treeform> In reply to @Patitotective "<@107140179025735680> https://stackoverflow.com/a/1": Yeah I am trying that, and its not working for me, how do they get the buffer[] ?
16:35:00FromDiscord<hmmm> In reply to @pmunch "Hmm, I've seen quite": this was very well written pmunchie! I think to make it even better you can put some code example that show a bit the expensiveness of objects and the mirrorness of refs
16:35:13FromDiscord<jmgomez> In reply to @jmgomez "hey guys, how is": the only way it works is by emitting in both files
16:36:43FromDiscord<Alea> In reply to @Patitotective "<@107140179025735680> https://stackoverflow.com/a/1": have you been trying to figure out how to set your app icon?
16:36:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vab
16:37:54FromDiscord<!Patitotective> In reply to @Alea "have you been trying": i actually got dear imgui to set the icon so 🤷‍♂️
16:38:21FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Vab" => "https://play.nim-lang.org/#ix=3Vac"
16:38:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vad
16:38:56FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Vad" => "https://play.nim-lang.org/#ix=3Vae"
16:39:12FromDiscord<treeform> In reply to @Alea "have you been trying": yes
16:39:37FromDiscord<treeform> In reply to @Alea "have you been trying": it seems like the buffer is width, height + BGRA data?
16:39:58FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Vaf
16:40:14FromDiscord<jmgomez> (edit) "https://play.nim-lang.org/#ix=3Vaf" => "https://play.nim-lang.org/#ix=3Vag"
16:46:03FromDiscord<demotomohiro> @jmgomez I don't understand what you actually doing but header pragma might help you: https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-header-pragma
16:46:36FromDiscord<Alea> At least for windows I just used the .ico + .rc method to set my icon↵No code required iirc
16:47:34FromDiscord<jmgomez> In reply to @demotomohiro "<@726017160115126333> I don't understand": thanks. Im using it but I need the code above emitted before the file is include via the header. When doing it in one file it just works, problem comes when I split the includes for multiple types in multiple files
16:47:34FromDiscord<pmunch> sent a long message, see http://ix.io/3Vah
16:47:45FromDiscord<jmgomez> (edit) "emitted" => "emited"
16:47:51FromDiscord<jmgomez> (edit) "emited" => "emitted"
16:48:18FromDiscord<Rika> thats a lot of text
16:49:20FromDiscord<pmunch> Sorry, it's hard to tell how much I've written when I'm on the phone
16:49:52FromDiscord<dom96> In reply to @impbox "hmm with async http": note that you'll need 5 instances of AsyncHttpClient to do this
16:50:23FromDiscord<jmgomez> In reply to @pmunch "Sorry, it's hard to": To write all of that in a phone is not a minor thing! lol
16:50:56FromDiscord<jmgomez> Talking about refs, how do nim interpret an actual ref type in cpp? As ptr? or there is some other keyworkd?
16:51:32FromDiscord<demotomohiro> If you import functions or types with header pragma, Nim
16:52:52FromDiscord<demotomohiro> @jmgomez You can specify mutiple #include directive in header pragma like "#include <Windows.h>\n#include <foo.h>"
16:54:06FromDiscord<pmunch> Thumbs of fury!↵(@jmgomez)
16:55:00FromDiscord<jmgomez> In reply to @demotomohiro "<@726017160115126333> You can specify": yeah I know that but I dont want to import that always, I want to emit what I posted in a single place only (if that's not possible now how to make it a var)
16:55:57FromDiscord<jmgomez> (edit) "possible now" => "possible, would be great to know"
16:57:59*vicfred quit (Quit: Leaving)
16:58:37FromDiscord<demotomohiro> @jmgomez If you write header file X.h and Y.h and Y.h uses types/defines/functions/etc in X.h, I think Y.h should do #include "X.h" so that people can use Y.h without taking care of dependency.
17:00:21FromDiscord<jmgomez> In reply to @demotomohiro "<@726017160115126333> If you write": the problem is all of that definitions are required for parsing all of those headers, if not the compiler fails to include them
17:02:09FromDiscord<jmgomez> I just want to emit them in a single file and for them to be available everywhere
17:11:10*Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected])
17:16:00NimEventerNew thread by Jmgomez: Map complex C++ types into Nim, see https://forum.nim-lang.org/t/9105
17:34:27*NimBot joined #nim
17:34:48*arkanoid joined #nim
17:35:13*xet7 joined #nim
17:37:18*slowButPresent joined #nim
17:37:18*adium joined #nim
17:40:11*vicfred joined #nim
17:41:27*drewr joined #nim
17:42:16*xet7 quit (Remote host closed the connection)
17:43:53*rockcavera quit (Ping timeout: 248 seconds)
17:44:11*xet7 joined #nim
17:46:10FromDiscord<Rika> thinking about the model/data of an application is one of the harder things of making an app i'd say @_@ maybe i'm just overthinking things and considering too many options
17:49:33FromDiscord<!Patitotective> im new to using c stuff in nim and i want to use this in my nim program https://github.com/mlabbe/nativefiledialog↵how should i start? 🤨
17:49:40*dropkick joined #nim
17:50:11FromDiscord<Rika> gtk dialog, its trash
17:50:35FromDiscord<Rika> im joking, pmunch will prolly plug futhark sooner or later so ill just do it for him or something
17:50:46FromDiscord<Rika> look into it, futhark
18:03:14*dropkick left #nim (#nim)
18:04:03*dropkick joined #nim
18:04:22FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/fTk
18:04:28FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/fC2
18:21:26FromDiscord<!Patitotective> https://github.com/PMunch/futhark/issues/27
18:24:05FromDiscord<spoon> 1.6.5 released?
18:24:53FromDiscord<huantian> odd number = devel/prerelease version
18:26:06FromDiscord<spoon> ah
18:36:17*rockcavera joined #nim
18:36:18*rockcavera quit (Changing host)
18:36:18*rockcavera joined #nim
18:36:41*vicfred quit (Quit: Leaving)
18:45:59*jmdaemon joined #nim
18:57:23FromDiscord<Yayko> sent a long message, see http://ix.io/3VaJ
19:03:40FromDiscord<tandy> could someone help me find out why my nim -\> js is hanging at a certain point?
19:04:27*vicfred joined #nim
19:04:51FromDiscord<tandy> `listenHistory = to(fromJson($tracks[1..^1], seq[FMTrack]), preMirror = some preMirror)`
19:05:07FromDiscord<tandy> https://github.com/Listen2gether/Listen2gether.github.io/blob/6a468b8d0b9e49636213f3e70edbfb653fa7093b/src/sources/lfm.nim#L160
19:09:29FromDiscord<tandy> it seems to be getting lost, not sure how to debug this
19:15:21FromDiscord<ynfle> It's stuck in compilation or execution?
19:16:27FromDiscord<tandy> execution↵(@ynfle)
19:19:07FromDiscord<ynfle> Try break the statment up in to smaller segments to see where it hangs
19:20:42FromDiscord<ynfle> What does `$tracks[1..^1]` give you. Is it valid Json?
19:21:57FromDiscord<tandy> good point, il do that thanks↵(@ynfle)
19:23:04FromDiscord<ynfle> It seems like it is
19:23:21FromDiscord<ynfle> Either way, you could just convert each one separately. It'd probably be fast
19:23:24FromDiscord<ynfle> (edit) "fast" => "faster"
19:24:00FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3VaR
19:24:44FromDiscord<ynfle> I think
19:43:36FromDiscord<morgan> so after making some horrible type class fuckery (well i dunno if it started then or before) nimsuggest started using a lot of cpu and did so for like at least an hour, possibly starting last night, so i quit the process (pretty sure i nicely asked it to quit as well) and now compiling stuff (including not running it) results in `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`
19:49:36FromDiscord<Generic> even if your code shouldn't compile the compiler should never crash
19:50:05FromDiscord<Generic> try reducing removing everything until you have the least amount of code which reproduces it
19:50:15FromDiscord<morgan> and after editing the path so i could actually run it, manually running nimsuggest gives the same error
19:57:24FromDiscord<morgan> hm so yeah running a different file does work
19:57:28FromDiscord<morgan> so i did somehow fuck something up
19:57:33FromDiscord<jmgomez> hey guys, any idea on how to represent a reference in nim?
19:57:51FromDiscord<jmgomez> (a cpp reference I mean)
19:58:47FromDiscord<morgan> ok so it was something in the type class stuff i was doing with tuples containing `untyped` stuff
20:00:12FromDiscord<morgan> ah so it's when you use a procedural type with input of type `untyped`
20:00:32FromDiscord<morgan> yep
20:00:42*noeontheend joined #nim
20:01:28FromDiscord<tandy> il have to test that↵(@ynfle)
20:03:02*rockcavera quit (Ping timeout: 250 seconds)
20:07:39*hellstabber joined #nim
20:11:39FromDiscord<morgan> well i made an issue on nimsuggest, hopefully they fix that
20:13:51FromDiscord<Yardanico> @morgan it's better if you give the complete code to reproduce the error
20:13:56FromDiscord<Yardanico> it can be hard to reproduce crashes like that
20:14:55FromDiscord<morgan> it was `proc (val: untyped): void` in a tuple type
20:15:12FromDiscord<morgan> https://media.discordapp.net/attachments/371759389889003532/964257535014084699/unknown.png
20:15:14*yoyojambo joined #nim
20:16:08FromDiscord<Yardanico> oh, makes sense, but that's invalid anyway
20:16:16FromDiscord<Yardanico> and if it crashes nimsuggest it probably crashes the compiler itself as well
20:16:29FromDiscord<morgan> `foo = tuple[bar: proc (val: untyped): void]` is enough to cause the error
20:16:57FromDiscord<morgan> oh yeah maybe i should've made that on the compiler
20:17:00FromDiscord<morgan> (edit) "compiler" => "compiler's repo"
20:17:10FromDiscord<morgan> cos it does on both
20:17:13FromDiscord<Yardanico> yeah the compiler crashes obviously
20:17:23FromDiscord<Yardanico> just make the issue for the compiler, nimsuggest uses compiler as a library
20:17:28FromDiscord<morgan> ok
20:17:28FromDiscord<Yardanico> unless your bug is nimsuggest-specific which it is not
20:19:08*hellstabber quit (Quit: Textual IRC Client: www.textualapp.com)
20:22:55FromDiscord<Zoom> Do we have any alternatives to illwill to read keyboard characters, including esc-coded ones?
20:23:20FromDiscord<!Patitotective> what do you guys think is a better name for a library: _configure_, _conprefs_ or _settei_? ~~_setty_ for treeform~~
20:24:04FromDiscord<hmmm> patyconf 😃
20:24:37FromDiscord<Yardanico> definitely not "configure" lol
20:24:38FromDiscord<Yardanico> too generic
20:25:11FromDiscord<Zoom> [Patitotective](https://matrix.to/#/%40_discord_762008715162419261%3At2bot.io) what does it do and why is it cool?
20:27:24FromDiscord<spoon> can bridge be configured to put <> around links so it doesnt embed?
20:28:33FromDiscord<!Patitotective> In reply to @Zoom "[Patitotective](https://matrix.to/#/%40_discord_762": i want to make it so the dev can create a `config.niprefs` file (think of yaml) defining all the keys, its default values, types, etc↵and then, when the user inputs its config file, the library compares the keys and values of the config file the dev created and outputs a table with the configuration
20:28:40FromDiscord<!Patitotective> In reply to @Patitotective "i want to make": pretty simple
20:28:49FromDiscord<huantian> it's funny cus if you do <link> in matrix it doesn't get transfered to discord
20:28:50*Gustavo6046 joined #nim
20:29:22FromDiscord<spoon> waw
20:32:21FromDiscord<matthias> sent a long message, see http://ix.io/3Vb1
20:32:27FromDiscord<jmgomez> what's the equivalent of void? ptr void doesnt seem to work
20:32:52FromDiscord<Anuke> `pointer` I think
20:33:15FromDiscord<Yardanico> yep
20:33:43*yoyojambo quit (Quit: Leaving)
20:34:16FromDiscord<jmgomez> ohh good, I lost uncountable hours doing workarounds
20:34:18FromDiscord<jmgomez> thanks!!!
20:35:22FromDiscord<Yardanico> lol
20:36:32FromDiscord<Anuke> I learned it the hard way after trying to do this and being extremely confused at the error message https://media.discordapp.net/attachments/371759389889003532/964262906030088272/unknown.png
20:36:40*yoyojambo joined #nim
20:37:22*yoyojambo quit (Read error: Connection reset by peer)
20:38:26*hellstabber joined #nim
20:39:49FromDiscord<Elegantbeef> yep `ptr` is a typeclass which is invalid for types
20:40:15FromDiscord<Elegantbeef> Any generic can be used without the generic parameter and is considered a type class so you can also do `seq`
20:41:38FromDiscord<tandy> anyone here know anything about github actions? ive set an environment secret and im having trouble getting my nim code to see it..
20:42:00FromDiscord<huantian> you probably have to pass it in as an enviornment variable when you run your program
20:42:26FromDiscord<dom96> In reply to @matthias "I think I'm being": try `repr(body)` and/or `cast[seq[byte]](body)`, might help you see what is happening
20:47:19FromDiscord<tandy> i think i did that↵(@huantian)
20:47:36FromDiscord<jmgomez> what about the ref types? is there something for them?
20:47:56FromDiscord<tandy> like this, but it still fails↵https://github.com/Listen2gether/Listen2gether.github.io/blob/dfd81bfb1a13116dfbcc762c9abb8f9aa57f2436/.github/workflows/test.yml#L32↵(@huantian)
20:48:01FromDiscord<Elegantbeef> What about ref types?
20:48:01FromDiscord<Yardanico> In reply to @jmgomez "what about the ref": what about them?
20:48:10FromDiscord<Elegantbeef> There is no `void` equivalent to ref
20:48:17FromDiscord<Elegantbeef> `RootRef` is the closest
20:48:28FromDiscord<Elegantbeef> You can just do `ref` as a typeclass though
20:48:39FromDiscord<Elegantbeef> and `GCRef`/`GCUnref` them
20:49:07FromDiscord<Elegantbeef> Here's a fun little writeup with Nim + pointers 😛 https://www.jasonbeetham.com/pointerexplanation.html
20:50:26FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Vb5
20:50:45FromDiscord<Yardanico> you should then make nim "output" what is needed
20:50:51FromDiscord<Yardanico> there are pragmas like byref/bycopy
20:50:54*neurocyte8614492 joined #nim
20:51:08FromDiscord<Elegantbeef> `codegendecl` aswell
20:51:41FromDiscord<jmgomez> In reply to @Yardanico "there are pragmas like": ohh byref is what I was looking for I think!
20:51:52FromDiscord<jmgomez> In reply to @Elegantbeef "`codegendecl` aswell": what does that?
20:52:09FromDiscord<Elegantbeef> It allows yout o specifically output code
20:52:37*pch_ joined #nim
20:52:42FromDiscord<Elegantbeef> Nim doesnt always allow you to generate what you want so you can use that to output what you need/want
20:53:47FromDiscord<jmgomez> will look into it!
20:55:33*pch quit (Ping timeout: 260 seconds)
20:56:09FromDiscord<TryAngle> is there something like docs.rs but for nim?
20:56:52FromDiscord<TryAngle> I looked a bit but could only find a repo that "defines" something like this but nothing actual
20:58:52FromDiscord<huantian> what does docs.rs do? just generate docuentation from code?
20:59:07*noeontheend quit (Ping timeout: 240 seconds)
21:03:28FromDiscord<jmgomez> In reply to @Yardanico "there are pragmas like": when using byref in front of an argument it cant find the definition, is that what you ment?
21:03:41FromDiscord<Yardanico> you need to apply in on the argumen typ
21:03:43FromDiscord<Yardanico> (edit) "typ" => "type"
21:03:50FromDiscord<Yardanico> (edit) "argumen" => "argument"
21:03:54FromDiscord<Yardanico> assuming you imported it from C++
21:03:58FromDiscord<Yardanico> or rewrote a C++ one in Nim
21:04:16FromDiscord<jmgomez> gotcha, but then how do you move from ref to non ref etc.
21:04:59*zeus-supreme1 joined #nim
21:05:17*kenran joined #nim
21:08:19*zeus-supreme quit (Ping timeout: 272 seconds)
21:08:53FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Vba
21:09:12FromDiscord<jmgomez> It keeps trying to export it as a pointer instead of ref
21:18:32FromDiscord<Elegantbeef> Dont know if Nim knows how to emit a C++ ref
21:27:13*lumo_e joined #nim
21:27:35FromDiscord<jmgomez> That's what I understood from @Yardanico previous answer. But not sure, doing it as a ptr and reinterpret cast to change the arg make it crash. But dunno if it's because of it or something else
21:28:26FromDiscord<jmgomez> That's a fundamental piece for the approach that Im taking into bind UE because it would allow to replace any unreal reflected function for one on nim
21:31:40FromDiscord<matthias> [dom96](https://matrix.to/#/@dom96:matrix.org)\: This is what I get when I `echo` and `repr` the body, respectively. Not sure it's very enlightening.↵`"{\"fromNumber\":\"+176146\",\"text\":\"Oh\"}"`↵`0x7f3c8d40bcc0"\"{\\\"fromNumber\\\":\\\"+176146\\\",\\\"text\\\":\\\"Oh\\\"}\""`
21:32:45FromDiscord<Elegantbeef> Do you have the code of how you're doing this?
21:44:05FromDiscord<dom96> In reply to @matthias "[dom96](https://matrix.to/#/@dom96:matrix.org)\: T": Parsing it seems to work just fine: https://play.nim-lang.org/#ix=3Vbe
21:44:11FromDiscord<dom96> You sure that's what you're passing to parseJson?
21:44:46FromDiscord<Elegantbeef> I wager they're doing `.to` and expect an int but get a string
22:04:43*kenran quit (Quit: WeeChat info:version)
22:11:16*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
22:11:35*jmdaemon joined #nim
22:39:59*rockcavera joined #nim
22:39:59*rockcavera quit (Changing host)
22:39:59*rockcavera joined #nim
22:44:01FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vbp
22:45:17FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vbq
22:45:24FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Vbq" => "https://play.nim-lang.org/#ix=3Vbr"
22:46:56FromDiscord<!Patitotective> also id like to know if there is a full example of how to use futhark (like the stb_image one but with all the files)
23:08:37*lumo_e quit (Ping timeout: 256 seconds)
23:22:02FromDiscord<TryAngle> In reply to @huantian "what does docs.rs do?": centralized docs platform for all libraries published on crates.io (basically nimble packages)
23:22:30FromDiscord<TryAngle> I mean nimble packages exists, so I see no reason why something like idk nimdocs exists
23:22:38FromDiscord<TryAngle> (edit) "I mean nimble packages exists, so I see no reason why something like idk nimdocs ... exists" added "shoulnd't"
23:22:49FromDiscord<Yardanico> nimble.directory actually tries to build docs for all packages
23:23:20FromDiscord<Elegantbeef> Presently it has a bug
23:23:46*hellstabber quit (Quit: Textual IRC Client: www.textualapp.com)
23:33:57*lumo_e joined #nim
23:34:58FromDiscord<huantian> Yeah it was broken last time I checked
23:37:13FromDiscord<Elegantbeef> Yea i made an issue and the author knows