<< 23-03-2022 >>

00:07:29FromDiscord<Bubblie> well beef, the astericks are there and im out of ideas
00:07:33FromDiscord<Bubblie> its time to make my own shit
00:08:53FromDiscord<Elegantbeef> That's not a procedure in the bindings
00:09:29FromDiscord<Bubblie> oh no I got a new error
00:09:30FromDiscord<Bubblie> lol
00:09:33FromDiscord<Bubblie> forgot to say
00:10:06FromDiscord<Elegantbeef> What's the new issue?
00:10:26FromDiscord<Bubblie> OH WAIT I may have figured out something gimmie one second
00:12:55*acidsys quit (Excess Flood)
00:13:27*acidsys joined #nim
00:13:39FromDiscord<Bubblie> figured it out
00:13:55FromDiscord<Bubblie> okay, so essentially, it was a problem with the extensions, the extensions are just fucked
00:14:11FromDiscord<Bubblie> adding vulkan extensions here doesn't work cause that query thing in the example simply does not exist in any of the files
00:14:28FromDiscord<Bubblie> sorry, any of the places in the vulkan.nim I meant
00:14:33FromDiscord<Bubblie> deleting this fixes the issue
00:14:49FromDiscord<Bubblie> this can be a problem if I want vulkan extensions
00:16:17FromDiscord<Elegantbeef> What do you mean?
00:19:13FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3TdG
00:19:30FromDiscord<Elegantbeef> Now imagine contributing the fixes to the nimgl bindings to make that work
00:20:06FromDiscord<Bubblie> im working on it LMAO
00:20:18FromDiscord<Bubblie> im trying to see why it was just, flat out removed
00:20:37FromDiscord<Elegantbeef> eh i just see "its time to make my own shit" and go "ah yes open source software"
00:21:59FromDiscord<Bubblie> make my own shit can mean make own fix too lol, I was only going to think about making my own bindings because I assumed the bindings were just messed up on windows, nimgl probably works everywhere else (everywhere else meaning linux, im excluding mac)
00:22:12FromDiscord<Bubblie> but now, it seems like this may be an issue with its generator
00:23:02*noeontheend joined #nim
00:23:21FromDiscord<Bubblie> and in general, what ive noticed is that compared to other bindings, nimgl does this weird thing with glfwWindow, it may be restricting the freedom that comes from setting up a proper vulkan pipeline
00:23:35FromDiscord<Bubblie> Im gonna add that to my own fork, and pr it
00:24:55FromDiscord<Bubblie> okay yeah, loadVK_EXT_host_query_reset is not anywhere, not in the main repo not in the seperate repo and not in my project either
00:24:58FromDiscord<Bubblie> hmmmm
00:25:11FromDiscord<Bubblie> maybe its removal was an accident? Maybe they did something else that was also un documented?
00:25:19FromDiscord<Bubblie> let me look into the history
00:26:33FromDiscord<Bubblie> ...
00:26:37FromDiscord<Bubblie> its not even in the history
00:31:12FromDiscord<Elegantbeef> Well time to make an issue or make it in the history
00:31:44FromDiscord<Bubblie> yes, but my question is if it was never added to the vulkan.nim this entire time, how was the example even working?
00:31:50FromDiscord<Bubblie> maybe im being stupid ill keep looking
00:33:55FromDiscord<Bubblie> okay found something, it was here, now I need to find where it was removed
01:58:10*tiorock joined #nim
01:58:10*tiorock quit (Changing host)
01:58:10*tiorock joined #nim
01:58:10*rockcavera is now known as Guest1667
01:58:10*tiorock is now known as rockcavera
01:59:06*Guest1667 quit (Ping timeout: 245 seconds)
02:17:57*noeontheend quit (Ping timeout: 240 seconds)
02:29:04*Gustavo6046 joined #nim
02:31:05*Gustavo6046 quit (Max SendQ exceeded)
02:31:43*Gustavo6046 joined #nim
02:37:14*neurocyte0917090 quit (Ping timeout: 268 seconds)
03:05:30FromDiscord<Hamid_Bluri> In reply to @Elegantbeef "<@121971538898452482> <@767093711112241162> i": amazing
03:07:50FromDiscord<Elegantbeef> Now if only we can get rid of the `DBConn` shit inside the `db_` modules 😛
03:14:20*tiorock joined #nim
03:14:20*tiorock quit (Changing host)
03:14:20*tiorock joined #nim
03:14:20*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
03:14:20*tiorock is now known as rockcavera
03:21:24FromDiscord<dilawar (Dilawar Singh)> I thought since many NIM developers are there, I probably post it there and see. 😟/
03:21:42FromDiscord<Elegantbeef> What's a NIM developer?
03:23:21FromDiscord<dilawar (Dilawar Singh)> I can't login to my account after I changed my nim-forum password. The error is always "wrong username or password". I change it again, try login again and same error again. Feeling a bit like https://www.youtube.com/watch?v=SHJQSRa02iQ.
03:24:09FromDiscord<Elegantbeef> I'd say ping someone that can actually do something
03:24:22FromDiscord<Elegantbeef> Dom or Miran probably
03:24:38FromDiscord<dilawar (Dilawar Singh)> Thanks. I'll ping them. Are they here?
03:25:00FromDiscord<dilawar (Dilawar Singh)> Sorry, autocorrect and my loose grip on English.
03:25:43FromDiscord<dilawar (Dilawar Singh)> I can't post anything on nim forum anymore.
03:28:51*rockcavera quit (Remote host closed the connection)
03:29:51FromDiscord<Elegantbeef> They are here dom96 is dom, think miran uses irc
03:38:47FromDiscord<Hamid_Bluri> https://play.nim-lang.org/#ix=3Teb
03:38:53FromDiscord<Hamid_Bluri> can't understand iterators
03:39:32FromDiscord<Hamid_Bluri> why the value of `x` is not equal to 10
03:39:54FromDiscord<Hamid_Bluri> how do they work 😕
03:40:52FromDiscord<Elegantbeef> This closure doesnt hold state
03:41:23FromDiscord<Elegantbeef> I mean it does 😛
03:41:43FromDiscord<Hamid_Bluri> what
03:42:34FromDiscord<Elegantbeef> `x`'s state is stored in the proc
03:42:36FromDiscord<Elegantbeef> rather closure
03:43:02FromDiscord<Hamid_Bluri> Ah
03:43:39FromDiscord<Rika> first call does the x = a, then enters the loop and stops at the yield
03:43:47FromDiscord<Rika> next calls stay in the loop
03:44:27FromDiscord<Hamid_Bluri> what about `echo c(10, 13)` ?
03:44:43FromDiscord<Elegantbeef> it returns the `yield x`
03:45:36FromDiscord<Elegantbeef> `closure` iterators hold onto their state, which was intialized to `1`
03:46:23FromDiscord<Hamid_Bluri> but if you swap lines 12 & 13
03:46:28FromDiscord<Hamid_Bluri> something strange happens
03:46:52FromDiscord<Elegantbeef> 10 \> 3
03:47:16FromDiscord<Rika> well yeah, a doesnt change but b does
03:47:53FromDiscord<Hamid_Bluri> i kinda get it
03:48:08FromDiscord<Elegantbeef> This isnt a closure generator so the state has to be passed
03:48:24FromDiscord<Elegantbeef> If you want a closure generator look at slicerator's `asClosure`
03:49:36FromDiscord<Hamid_Bluri> ok
03:49:37FromDiscord<Hamid_Bluri> thanks you both
03:49:42FromDiscord<Hamid_Bluri> (edit) "thanks" => "thank"
03:49:43FromDiscord<Elegantbeef> This isnt even a property of iterators it's just closures
03:50:16FromDiscord<Elegantbeef> If you want to see how Nim implements closures https://nim-lang.org/docs/intern.html#code-generation-for-closures
03:50:41FromDiscord<Hamid_Bluri> thank u so much
03:52:08*slowButPresent quit (Quit: leaving)
04:13:58*arkurious quit (Quit: Leaving)
04:18:27FromDiscord<V0id_Matr1x> Is elegantbeef really a bot?
04:18:35FromDiscord<Elegantbeef> sadly not
04:19:06FromDiscord<huantian> why does everyone ask if beef is a bot and not anyone else
04:19:11FromDiscord<V0id_Matr1x> Oh lmao, I was like wow that is the craziest thing I have ever seen lol.
04:19:37FromDiscord<Elegantbeef> Cause i pass the butter
04:20:57FromDiscord<Rika> not the turing test it seems
04:21:02FromDiscord<huantian> I swear more people use Matrix right
04:23:02FromDiscord<Elegantbeef> Perhaps
04:25:11FromDiscord<huantian> hm I have no idea how to do the device verification thing with element
04:26:00FromDiscord<V0id_Matr1x> You need a pass phrase key for backup I think.
04:26:26FromDiscord<V0id_Matr1x> To verify if I remember correctly, I don't use it much.
04:26:34FromDiscord<Elegantbeef> It's in security settings i thiink
04:26:40FromDiscord<V0id_Matr1x> Yeah
04:28:16*pch_ joined #nim
04:28:53FromDiscord<huantian> Oh huh ok that makes sense
04:29:08FromDiscord<Equinox> In reply to @V0id_Matr1x "Oh lmao, I was": No they are a bot, one of the most advanced ai’s ever written
04:29:26FromDiscord<huantian> I have no idea what that actually did but cool
04:29:44FromDiscord<Elegantbeef> Would allow you to continue DMing people i think
04:29:52FromDiscord<Elegantbeef> in a E2E environment
04:29:59*pch quit (Ping timeout: 250 seconds)
04:29:59FromDiscord<V0id_Matr1x> No I looked it up, they logged in with a bot or something. It was like magic at first though lmfao.
04:30:19FromDiscord<Elegantbeef> It's just the matrix bridge
04:30:25FromDiscord<Elegantbeef> We're otherly located
04:30:27FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3Tel
04:30:43FromDiscord<V0id_Matr1x> googled "how to get bot tag on discord" lol
04:31:45FromDiscord<V0id_Matr1x> In reply to @Elegantbeef "It's just the matrix": That makes sense. I will get myself the bot tag too lol.
04:31:48FromDiscord<Elegantbeef> Hamid that's an uninstantiatble distinct
04:32:10FromDiscord<Elegantbeef> `type CustomSlice = distinct HSlice` has no generic on the HSlice
04:32:27FromDiscord<Elegantbeef> Should be `type CustomSlice = distinct HSlice[int, BackwardsIndex]` in this example
04:33:41FromDiscord<Hamid_Bluri> sent a code paste, see https://paste.rs/2Mp
04:34:05FromDiscord<Hamid_Bluri> but is there any way to get rid of `CustomSlice[int, int]( ... )` ?
04:34:07FromDiscord<Elegantbeef> Yes
04:34:22FromDiscord<Elegantbeef> A converter
04:34:36FromDiscord<Elegantbeef> But you'd need a converter for that specific generic
04:34:39FromDiscord<Elegantbeef> So to answer no
04:34:48FromDiscord<Hamid_Bluri> thanks
04:35:54FromDiscord<huantian> hey beef wanna meet up sometime and I verify each other's client xD
04:36:00FromDiscord<Elegantbeef> Works for instance
04:36:03FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ten
04:36:15FromDiscord<Elegantbeef> You coming to bumfuck nowhere Canada?
04:36:52FromDiscord<huantian> hm probably not seems cold
04:36:57FromDiscord<huantian> how about you visit arizona
04:36:59FromDiscord<Elegantbeef> It's warm today
04:37:03FromDiscord<Elegantbeef> It's +2C right now
04:37:25FromDiscord<Elegantbeef> Nope i'm good
04:38:23FromDiscord<huantian> it's around 30 highs over here rn
04:38:35FromDiscord<Elegantbeef> In real units?
04:38:42FromDiscord<huantian> yeah Celcius
04:38:50FromDiscord<Elegantbeef> Ah that's my summer temps
04:38:59FromDiscord<Elegantbeef> I prefer the -50 to that
04:43:44FromDiscord<huantian> hm what if we instead verify sessions via github issue
04:44:26FromDiscord<Elegantbeef> Speaking of github issues, thoughs on my async await message change?
04:45:45FromDiscord<Equinox> In reply to @Elegantbeef "Speaking of github issues,": What did you change
04:45:55FromDiscord<huantian> Yeah I think it's a good idea to mention waitFor in the error message
04:46:43FromDiscord<huantian> should the message mention asyncCheck as well? or is that use case not frequent enough to worry about
04:46:52FromDiscord<Elegantbeef> I didnt change anything i suggested the change to huan's pr
04:47:05FromDiscord<Elegantbeef> `asynCheck` is the `discard` equivlent
04:47:15*wyrd quit (Ping timeout: 240 seconds)
04:47:19FromDiscord<huantian> yeah, so it doesn't wait for the future to complete
04:47:48FromDiscord<Elegantbeef> So it doesnt relate to using await
04:48:12FromDiscord<huantian> true
04:48:22FromDiscord<huantian> there we go bigger cubes
04:49:18*wyrd joined #nim
04:49:54FromDiscord<huantian> Also the other error messages in asyncmacro seem to use "async proc" instead of "proc marked as 'async'" or "'async' marked proc."↵maybe it would be better to just say that
04:50:09FromDiscord<Elegantbeef> Perhaps
04:52:11FromDiscord<Elegantbeef> @Equinox\: this is what we're talking about https://github.com/nim-lang/Nim/pull/19622
04:53:09*pch_ is now known as pch
04:55:03FromDiscord<Elegantbeef> Huan and i talked about it to remove the stupid error message of "yield can only be used in an iterator"
04:55:31FromDiscord<Elegantbeef> I havent used async much but it's the most seen error from people trying to use it heree
04:57:02FromDiscord<huantian> "If waiting" feels a tad awkward, maybe `"If intentional, use 'waitFor' to call a 'async' proc in non-async scope."` is better
04:58:37FromDiscord<huantian> But I think sticking with specifically saying marked is the move
05:00:26FromDiscord<huantian> Man words are hard
05:02:12FromDiscord<Elegantbeef> 'if calling' is better imo
05:02:52FromDiscord<Elegantbeef> "If calling an 'async' proc in a non-async scope use `waitfor`"
05:04:53FromDiscord<huantian> this is just wording but should we say "use waitFor" before saying if?
05:04:58FromDiscord<Elegantbeef> Probably
05:05:20*ltriant_ quit (Read error: Connection reset by peer)
05:06:08FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3Tev
05:06:08FromDiscord<huantian> ok so `Can only 'await' inside a proc marked as 'async'. Use 'waitFor' when calling an 'async' proc in a non-async scope instead`
05:06:22FromDiscord<Elegantbeef> Sounds good to me
05:07:54FromDiscord<Elegantbeef> Hamid you bounded `A` and `B` to the same type
05:08:10FromDiscord<Hamid_Bluri> Oh
05:08:11FromDiscord<Elegantbeef> Wait nvm
05:08:39FromDiscord<Hamid_Bluri> it works with int, int
05:08:45FromDiscord<Hamid_Bluri> (edit) "int, int" => "[int, int]"
05:09:10FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3Tew
05:10:35*ltriant joined #nim
05:13:51FromDiscord<Elegantbeef> It's a bug if i've ever seen one
05:14:32FromDiscord<Hamid_Bluri> intresting
05:14:58FromDiscord<Hamid_Bluri> that works
05:15:02FromDiscord<Hamid_Bluri> sent a code paste, see https://paste.rs/ZyA
05:15:35FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3TeA
05:15:46FromDiscord<huantian> oh yeah beef looking at this windows test, seems to be failing because of `\` and not `/` in paths↵https://github.com/nim-lang/Nim/pull/19622/checks?check_run_id=5609347020
05:17:50FromDiscord<Elegantbeef> Well guess compiler dev right now
05:20:03FromDiscord<huantian> ah I see the issue, the example you sent doesn't use `nimoutFull: true` so it only checks for the parts of the error message that don't have paths
05:20:31FromDiscord<Elegantbeef> Ugh it's another typerel bug i think
05:20:48FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/nBr
05:26:47FromDiscord<Hamid_Bluri> i'm sorry to call you "beef"
05:26:57FromDiscord<Hamid_Bluri> you're "Elegant beef"
05:27:13FromDiscord<Elegantbeef> I'm whatever the fuck i want to respond to 😛
05:27:25FromDiscord<Hamid_Bluri> "Elegant beef" is distinct type of `beef`
05:27:47*Zectbumo joined #nim
05:27:59FromDiscord<Elegantbeef> I hate these distinct issues
05:28:22FromDiscord<Elegantbeef> It's actually not even a distinct issue, just a generic issue
05:28:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TeC
05:28:49FromDiscord<Elegantbeef> For the same reason, typerel is being dumb
05:28:56FromDiscord<Hamid_Bluri> typerel?
05:29:24FromDiscord<Elegantbeef> It's the part of the compiler that reasons type relations
05:30:18FromDiscord<V0id_Matr1x> What is the butter everyone is referring too?
05:33:11FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3TeD
05:33:13FromDiscord<Hamid_Bluri> only last one doesn't work
05:41:11FromDiscord<Elegantbeef> Oh i think i already see the issue
05:46:20FromDiscord<Elegantbeef> Nevermind i'm silly
05:50:15FromDiscord<V0id_Matr1x> Hey elegant, did you merge my pull request because after I told you I was waiting it merged. If so thanks!
05:50:32FromDiscord<Elegantbeef> What PR?
05:51:16FromDiscord<V0id_Matr1x> Oh then nevermind. Must be coincidence, what is your github name?
05:51:25FromDiscord<Elegantbeef> beef331
05:52:24FromDiscord<Elegantbeef> I have no relation with `nim-lang`
05:52:25FromDiscord<V0id_Matr1x> Oh then no, it is definitely coincidence. I thought you were the guy merging` packages.json`
05:53:28FromDiscord<V0id_Matr1x> That makes sense, I figure your were more experienced in Nim than me, and had no idea who you were so I thought I would as for feedback.
05:53:40FromDiscord<V0id_Matr1x> (edit) "figure" => "figured"
05:54:04FromDiscord<Rika> He probably is…?
05:54:10FromDiscord<Rika> I don’t remember seeing you around here
05:54:10FromDiscord<V0id_Matr1x> OH he is lol
05:54:19FromDiscord<V0id_Matr1x> I am a noob to Nim
05:54:29FromDiscord<Rika> Yeah he likely is
05:54:34FromDiscord<V0id_Matr1x> It is my favorite lang now though
05:54:46FromDiscord<Elegantbeef> You forget, i'm an idiot↵(@Rika)
05:55:10FromDiscord<V0id_Matr1x> In reply to @Elegantbeef "You forget, i'm an": I don't believe that for a second lmao.
05:56:04FromDiscord<Elegantbeef> Someone wanna give me a CPU with a higher IPC so i can debug the compiler a tinge faster?
05:56:41FromDiscord<Rika> Go buy a Mac studio or something, it’s only just 4000 USD for the best CPU
05:56:45FromDiscord<Elegantbeef> Ah actually i think i dumbly have the compiler built ind ebug
05:57:15FromDiscord<Elegantbeef> I think that stands for everything i'm against
05:57:43FromDiscord<Elegantbeef> an unupgradable unrepairable lockedown computer
06:02:46FromDiscord<Rika> Then build one
06:06:39FromDiscord<V0id_Matr1x> Wait so Nim Lang is dead, and Nim Skull is the current project? code might be broken??
06:06:48FromDiscord<Elegantbeef> No
06:06:59FromDiscord<Elegantbeef> Nim-lang is alive, nimskull is alive
06:07:10FromDiscord<V0id_Matr1x> I am so confused, can you elaborate please.
06:07:18FromDiscord<Phil> araq and co work on nim
06:07:20FromDiscord<Elegantbeef> Nimskull is a fork of nim
06:07:29FromDiscord<Phil> Other folks that split off of nim work on nimskull
06:07:50FromDiscord<Elegantbeef> I really should leave nimskull's organization
06:07:59FromDiscord<Elegantbeef> I'm equally associated with them as i am with nim-lan 😀
06:08:00FromDiscord<V0id_Matr1x> WHy?
06:08:21FromDiscord<Phil> Differences over the codebase and the scope of the supported featureset IIRC
06:08:21FromDiscord<Elegantbeef> Cause I dont have any reason to be in it
06:08:34FromDiscord<V0id_Matr1x> Ok man
06:08:35FromDiscord<Phil> Ohhh why he's in the group, my bad
06:08:40FromDiscord<Elegantbeef> Why to the fork is read the readme of nimskull
06:08:41FromDiscord<Elegantbeef> It explains why it exists
06:09:19FromDiscord<V0id_Matr1x> I read it and that is where I got the impression Nim was dead, and got worried.
06:09:52FromDiscord<V0id_Matr1x> "↵We love the original vision behind nim-lang; we believe that an element of the vision was lost. We simply believe a different development process was needed to that which was being used and decided that the best way to see this vision materialize was to enforce that process ourselves. "
06:10:10FromDiscord<Rika> Nothing here implies the original is dead
06:11:32FromDiscord<V0id_Matr1x> No worries, thank you for making that clear.
06:43:31FromDiscord<Phil> sent a code paste, see https://paste.rs/1oF
06:44:00FromDiscord<Phil> (edit) "https://paste.rs/F3M" => "https://play.nim-lang.org/#ix=3TeR"
06:44:06FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3TeR" => "https://play.nim-lang.org/#ix=3TeT"
06:44:25FromDiscord<Elegantbeef> `_: typedesc[T]` reduce the proc length
06:44:35FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3TeT" => "https://play.nim-lang.org/#ix=3TeU"
06:44:58FromDiscord<Elegantbeef> proc last so you can use the do syntax imo
06:47:08FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/ZeY
06:47:23FromDiscord<Phil> do-syntax? Is that a nim feature I over-read?
06:47:31FromDiscord<Rika> No
06:47:44FromDiscord<Rika> It’s in the experimental manual but it’s not actually very experimental
06:47:51FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#do-notation
06:48:09FromDiscord<Phil> Ah, Do notation
06:52:51FromDiscord<Phil> So if I understood this right, when calling a proc this is a way of moving the proc-definition to outside of the params and underneath the proc-call, which can be useful for larger anonymous functions
06:53:28FromDiscord<Phil> I'll keep that in mind when writing procs that take proc params! Thanks!
06:53:33FromDiscord<Elegantbeef> Depends what you're doing but yes
06:54:18FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TeX
06:54:30FromDiscord<Phil> You'd only use the do-syntax when creating anonymous procs right? I have a couple times where I invoke the proc and pass it a named proc from another module
06:54:52FromDiscord<Elegantbeef> Yea you'd use the do syntax for anonymous procs
06:55:24FromDiscord<Elegantbeef> for named procs you'd just pass them in
07:07:55FromDiscord<Phil> Check
07:39:47*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
07:42:22FromDiscord<untoreh> In reply to @demotomohiro "<@152784476701851648> Maybe `toStrLit` in": this one almost does it, but it adds whitespace, I guess I have to copy the tree recursion function and just remove the whitespace stuff
07:42:38*Lord_Nightmare joined #nim
08:03:04*acidsys quit (Excess Flood)
08:03:37*acidsys joined #nim
08:03:41*acidsys quit (Excess Flood)
08:04:19*acidsys joined #nim
08:29:17FromDiscord<enthus1ast> It seems when a loaded dll crashes/excepts (loaded via dynlib) i cannot get the error message in the host application, do you know how to do this? Or should my application do this somehow?
08:29:43FromDiscord<enthus1ast> Eg, try and catch in the dll and store the error in a table etc that my host retreives ?
08:30:18FromDiscord<enthus1ast> is maybe the reason that the dll does not have a stdout/strerr ?
08:32:16FromDiscord<Elegantbeef> Wrap the program in try except and propogate it bad with an error handler
08:32:20FromDiscord<Elegantbeef> it back\
08:32:35FromDiscord<enthus1ast> yes sounds resonable
08:32:37FromDiscord<enthus1ast> thank you
08:52:38FromDiscord<wsantos> In reply to @Elegantbeef "<@121971538898452482> <@767093711112241162> i": @ElegantBeef this is amazing I'll need some time to digest it 😄 thank you so much
08:57:04*Zectbumo quit (Remote host closed the connection)
09:05:20FromDiscord<luteva> @wsantos just one more idea: I think what you are searching for was some kind of "interfaces" like in java or in go.↵There are interface implementations in/for nim: Maybe you may want to have a look at iface: https://github.com/yglukhov/iface↵this i s a go-like interface implementation.
09:06:11FromDiscord<Elegantbeef> I mean they only need iface if they want runtime interfaces
09:06:18FromDiscord<Elegantbeef> Concepts give them compiletime inferfaces
09:10:11FromDiscord<luteva> yes. that's definitvely a better solution if you can handle that at compiletime. but whenever not sure you may want to choose runtime interfaces (or maybe not... just an idea.....)↵also: using iface seems to be quite easy! concepts are still a bit more complicated in my opinion.
09:11:51FromDiscord<Elegantbeef> Eh it's a bit more complicated in this case cause of the odd matching needed
09:12:23FromDiscord<Elegantbeef> Otherwise they're more tame and `a.doThing(args) is T`
09:12:58FromDiscord<Phil> In reply to @Elegantbeef "<@121971538898452482> <@767093711112241162> i": This looks like something I should really steal for tinypool
09:13:27FromDiscord<Elegantbeef> It lets you get away from inheritance so I think so
09:15:42FromDiscord<Elegantbeef> I still want to see Norm without the inheritance requirement 😛
09:16:00FromDiscord<Elegantbeef> Not that i'd be any more likely to use it, just dont like inheritance where it's not needed
09:17:37FromDiscord<Phil> Within the very, very limited scope that norm uses it I'm not a fan, but at least it doesn't bother me greatly.↵What does bother me is the requirement of an ID field which makes working with views/fts5 impossible as well as no way to write raw SQL if I wanted to
09:18:02FromDiscord<Phil> But that'd have to be solved with a different type, if it comes....ever
09:19:18FromDiscord<Elegantbeef> Yea i only know of Norm for looking at your code briefly and found the usage of `Model` suspect
09:20:37FromDiscord<enthus1ast> i like the way nisane composes, but it is a more manual way
09:20:50FromDiscord<Elegantbeef> I know nothing of any of this, so i dont comment further
09:21:04FromDiscord<enthus1ast> its a seq to object converter
09:21:05FromDiscord<Phil> nisane is essentially: Take seq[string], convert to object
09:21:46FromDiscord<Phil> Where the strings have to be in the order of the fields in the object
09:21:47FromDiscord<enthus1ast> BUT i guess the correct way is to patch the various db\_\ drivers to get types from the db and generate objects by themself
09:22:25FromDiscord<enthus1ast> sent a long message, see http://ix.io/3Tff
09:23:44FromDiscord<enthus1ast> this way you can collect any sql returns, withouth the id requirement in MyObj
09:24:17FromDiscord<enthus1ast> also if you you join some rows\:↵myRow.to(entryId, entry, userId, user)
09:24:48FromDiscord<Elegantbeef> Yea i dont DB
09:24:51FromDiscord<Elegantbeef> So i dont follow
09:25:31FromDiscord<enthus1ast> how do you store your data then? \:)
09:25:40FromDiscord<Rika> prolly flat files
09:25:44FromDiscord<Rika> or doesnt
09:26:12FromDiscord<Elegantbeef> Store data?
09:26:16FromDiscord<Elegantbeef> The fuck do you think i am a webdev?
09:26:27FromDiscord<Elegantbeef> I make failed projects that dont go anywhere
09:26:35FromDiscord<enthus1ast> ic ;)
09:26:35FromDiscord<Elegantbeef> Dont need to store data there
09:27:04FromDiscord<Elegantbeef> When ii do store data i generally use a binary buffer
09:27:39FromDiscord<enthus1ast> to make flatfile storage really great, we need a datastructure that\:↵provides idx access, MULTI key access (like sql indexes on multiple columns), iteratable from both directions, get next and prev from one element
09:28:00FromDiscord<Elegantbeef> No, we need to be able to get a Nim object out from a file path
09:28:03FromDiscord<Elegantbeef> Anything else is redundant
09:28:21FromDiscord<enthus1ast> if you can do this you still have some limitations
09:28:26FromDiscord<luteva> use lmdb
09:28:31FromDiscord<luteva> 😄
09:28:46FromDiscord<Elegantbeef> Wait until enthus learns i'm joking about the fact i only need game save data in my projects
09:29:04FromDiscord<Rika> lmdb or rocks
09:29:13FromDiscord<Rika> and beef doesnt really have a use for dbs
09:29:27FromDiscord<Rika> he doesnt make things that require massive/low-latency/etc storage
09:29:46FromDiscord<Elegantbeef> Indeed
09:30:00FromDiscord<Elegantbeef> I make things that need to store compact data that can be versioned
09:30:16FromDiscord<Elegantbeef> Still need to expand on my versioning API seemed quite promising though presently pointless
09:30:16FromDiscord<luteva> just use snail mail for storing/archiving data 😉
09:31:28FromDiscord<Rika> snail mail and punch cards
09:31:28FromDiscord<Rika> gotcha
09:31:47FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3Tfi this is what I was lookin at for my save data
09:31:52FromDiscord<Elegantbeef> Some issues with it though
09:32:20FromDiscord<Elegantbeef> Goto line 80 to see it in usue
09:32:40FromDiscord<Rika> versioning is a pretty large problem in database schemas as well
09:33:20FromDiscord<Elegantbeef> This is mostly for enabling typesave versioning and migration of save dataa
09:33:39FromDiscord<Elegantbeef> Interesting concept at least
09:34:13FromDiscord<Rika> thats precisely what versioning is for schemas, data migration and safe (resilient to errors) versioning...?
09:35:08FromDiscord<enthus1ast> the think is\: sql gives me the option to query any data really fast thanks to indexes, and also combine any data in any way. ↵To do this all in eg nim, i must write quite some code that sql can do in a few lines.
09:35:11FromDiscord<enthus1ast> thing
09:35:45FromDiscord<Rika> again, beef doesnt need that
09:35:47FromDiscord<Rika> hence he doesnt use it
09:35:56FromDiscord<enthus1ast> but imho this is because of a missing "awesome" datastructure
09:36:01FromDiscord<Rika> idk what youre even talking about
09:36:02FromDiscord<Elegantbeef> Think enthus is talking about their idea
09:36:02FromDiscord<enthus1ast> yes yes i get it \:)
09:36:06FromDiscord<Rika> ok
09:36:20FromDiscord<Elegantbeef> In reference to this
09:36:24FromDiscord<enthus1ast> yes
09:36:51FromDiscord<Rika> idk why you'd care when you have "good enough" rocks/lm/sqlite
09:36:59FromDiscord<Rika> rocks is kv store only tho
09:37:03FromDiscord<Rika> i think lm is also kv only
09:37:14FromDiscord<Rika> sqlite can prolly be made to use rocks as a storage engine
09:37:17FromDiscord<enthus1ast> the issue is that i must convert from db stuff to nim types
09:37:23FromDiscord<Elegantbeef> Anyway i'm off, so send all your DB spam to your nearest nerd
09:37:32FromDiscord<Rika> okay
09:37:38FromDiscord<enthus1ast> most of my database code is mostly conversion
09:37:44FromDiscord<Phil> In reply to @Elegantbeef "Anyway i'm off, so": bye nerd
09:37:46FromDiscord<enthus1ast> thats stupid in 2022
09:38:16FromDiscord<Rika> what? thats going to be normal, youre going to be hard pressed trying to do otherwise, idgi
09:38:53FromDiscord<enthus1ast> imho thats not normal OR it should not be normal to parse strings
09:39:19FromDiscord<enthus1ast> just to get data from your datasource
09:39:33FromDiscord<Rika> mysql has a binary interface and there are libraries that use that instead
09:39:46FromDiscord<Rika> i mentioned amysql; it has support for the binary interface
09:40:01FromDiscord<Phil> This kinda makes me wish for binary storage in sqlite
09:40:02FromDiscord<enthus1ast> mh yeah that a way i guess
09:40:10FromDiscord<Phil> But then I'd store non-human-readable stuff in sqlite
09:40:15FromDiscord<Phil> And I don't like that
09:40:20FromDiscord<Rika> teeeechnically its still parsing "strings" but its not literal text
09:40:28FromDiscord<Rika> its less-ambiguous binary data
09:40:34FromDiscord<enthus1ast> but you still must tell your database what it must do in a untyped string
09:40:41FromDiscord<Rika> "an untyped string"?
09:40:52FromDiscord<Rika> what does that mean now?
09:41:31FromDiscord<enthus1ast> i meant you write your sql in a string which is very error prone, and crashes on runtime
09:41:55FromDiscord<Rika> ah well you could include a sql parser and validator (good luck)
09:42:26FromDiscord<Rika> perhaps there are C libraries that do so
09:42:27FromDiscord<enthus1ast> imho the problem is sql itself
09:42:32FromDiscord<Rika> though that means it is not compile time
09:42:52FromDiscord<Rika> im not gonna argue that sql is pretty crazy because i agree it is lol
09:42:59FromDiscord<Rika> unfortunately this is the world we live in
09:43:04FromDiscord<enthus1ast> yes
09:44:35*kayabaNerve quit (Ping timeout: 250 seconds)
09:45:24Amun-RaShinyzenith: either use unsafeAddr or make that thing 'var'
09:45:35Amun-Rasorry
09:45:49FromDiscord<Rika> maybe there are validation libraries for mysql at least
09:45:57FromDiscord<Rika> but idk, still doesnt fix the compile time thing
09:49:43FromDiscord<enthus1ast> i must also go (work yay)
10:33:35FromDiscord<System64 ~ Flandre Scarlet> Normal it cannot be assigned to? https://media.discordapp.net/attachments/371759389889003532/956138633096744980/unknown.png
10:33:49FromDiscord<Rika> for e in entities.mitems:
10:34:07FromDiscord<System64 ~ Flandre Scarlet> ah thanks
10:34:15FromDiscord<System64 ~ Flandre Scarlet> that's true it's immutable by default
11:01:57*PMunch joined #nim
11:48:36FromDiscord<Require Support> `int (WINAPI pOrigMessageBox)(HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType) = MessageBoxA;` in c == `var pOrigMessageBox : proc = MessageBoxA` if im importing winim?
12:01:21*Gustavo6046 quit (Quit: I'm a quit message virus. Please replace your old line with this line and help me take over the world. <screw you aloo_shu my old line was better and more creative!>)
12:13:02FromDiscord<demotomohiro> You can write `var pOrigMessageBox = MessageBoxA`.
12:19:44FromDiscord<Schelz> Does someone know how anti debug would be done in nim ?
12:20:30FromDiscord<mratsim> In reply to @Schelz "Does someone know how": binary obfuscation? Like in C.
12:20:56FromDiscord<mratsim> Anything you can do in C you can do in Nim.
12:22:01FromDiscord<mratsim> Nuclear option: tag all functions inline and have a single function that do all. Then pass it to the movusfactor so that everything is a mov instruction.
12:22:46FromDiscord<hmmm> broskis I'm iterating a for loop over a seq, after a compare hit, delete an item from the same seq to avoid duplicates. Now Nim complains I'm changing a seq I'm iterating over, so how do I it
12:23:32FromDiscord<mratsim> In reply to @hmmm "broskis I'm iterating a": Iterate from the end and use indexes. + `del`
12:24:11FromDiscord<mratsim> otherwise `s.toHashset().toSeq()`
12:24:32FromDiscord<hmmm> ty, I'll try and report back
12:34:25FromDiscord<Rika> In reply to @mratsim "Nuclear option: tag all": Or the reductio one I sent a while back https://github.com/xoreaxeaxeax/reductio
12:35:40FromDiscord<tandy> does anyone know what enums are initialised to by default?
12:35:41FromDiscord<tandy> cant do `isNil`
12:37:40FromDiscord<konsumlamm> their first variant i'd guess
12:38:25FromDiscord<konsumlamm> you can only do `isNil` on types that can actually be `nil`
12:38:45FromDiscord<konsumlamm> and enums can't be (it wouldn't make much sense either)
12:41:26FromDiscord<hmmm> turns instead of deleting I could just change the seq element so something that cannot be hit by the compare. Now if I want to check the seq A has exactly the same elements as seq B in different order do I turn both in sets and compare right?
12:41:38FromDiscord<hmmm> turns out
12:55:08*mahlon quit (Ping timeout: 268 seconds)
12:56:51PMunch@tandy, they default to binary 0 as with everything in Nim
12:57:11PMunchIf you don't assign numbers to them then it's the first option as that is value 0
13:03:39FromDiscord<auxym> yes that. Consider using `Option[YourEnumType]` if you want to signal a missing value (or make the first option a special/sentinel value).
13:05:36PMunchhttps://play.nim-lang.org/#ix=3Tg9
13:08:07FromDiscord<auxym> holey enums are not Ordinals anymore though which tends to break a lot of stuff, IIRC (sets, succ/pred, etc)
13:09:14FromDiscord<mratsim> In reply to @auxym "holey enums are not": they never were. and they always broke stuff, it was made apparent.
13:15:27FromDiscord<auxym> oh yeah I know, I meant anymore in the sense that a regular enum is Ordinal, but once you make a hole in it, it's not Ordinal anymore
13:33:30FromDiscord<fbpyr> sent a code paste, see https://paste.rs/dwq
14:02:42FromDiscord<hmmm> friendsies I want to add a feature that takes a nim string and places it into an outlook compose new message, do I need to fiddle with something in osproc / os or there is a simpler way
14:05:49FromDiscord<Rika> 1. Good luck
14:05:58FromDiscord<hmmm> windows has something like send to -> mail recipient in context menu, I think it uses the default mail app which is thunderbird in my case, but that's fine
14:08:00FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3Tgw
14:08:26FromDiscord<hmmm> we need to find a win32 thingy in nim
14:08:33FromDiscord<Rika> Winim?
14:08:37FromDiscord<hmmm> maybe!
14:08:41FromDiscord<hmmm> I'll check
14:11:06FromDiscord<Bubblie> Does nim have anything for protobuf datastructurr
14:11:18FromDiscord<Bubblie> (edit) "datastructurr" => "datastructure"
14:11:55FromDiscord<Rika> A lot
14:11:58FromDiscord<Bubblie> SHEEEEEESH
14:12:01FromDiscord<Bubblie> Lets go
14:12:04FromDiscord<Rika> Search GitHub, can’t be bothered lol
14:12:13FromDiscord<Rika> There’s a good amount given the size of Nim I mean
14:12:16FromDiscord<Bubblie> https://github.com/PMunch/protobuf-nim
14:12:22FromDiscord<Bubblie> I love this language lets go
14:12:36FromDiscord<Bubblie> Im getting use to discard a bit though
14:12:39FromDiscord<Bubblie> Its a new thing for me
14:12:48FromDiscord<Bubblie> Especially when making void methods and procs
14:12:57FromDiscord<Bubblie> Oh yeah, when should I use method and when should I use proc
14:13:02FromDiscord<Bubblie> They seem to be two different things
14:13:11PMunchIn general you should always use proc
14:13:26FromDiscord<Bubblie> Alright
14:13:31FromDiscord<Bubblie> I wonder why method is there then
14:13:33PMunchIf you need method then you would know you needed it :P
14:13:40PMunchIt is runtime dispatch
14:13:47PMunchProcs are compile-time dispatch
14:14:00FromDiscord<Bubblie> Ohhh
14:14:26PMunchSo you use methods for some object oriented stuff
14:14:38PMunchBut in general it's not used a lot
14:14:52FromDiscord<Bubblie> Makes sense
14:15:00PMunchAnd about discard, if you have to use discard you should probably do error handling or something instead :P
14:15:20PMunchdiscard is literally "yes I know this thing returns something that's probably important, but I don't care"
14:36:53*arkurious joined #nim
14:52:00FromDiscord<Shinyzenith> sent a code paste, see https://play.nim-lang.org/#ix=3TgF
14:52:19FromDiscord<Shinyzenith> I'm not sure why but removing it gets rid of the segfault
14:52:47FromDiscord<Shinyzenith> the function call looks fine to me
14:55:42FromDiscord<Shinyzenith> Also noticed something, the template you defined "fieldParentPtr" didn't return a pointer to the base struct
14:55:46FromDiscord<Shinyzenith> which is odd
14:55:52FromDiscord<Shinyzenith> because we're casting it to ptr of T
14:56:57PMunch@Shinyzenith, do you have the code?
14:57:21FromDiscord<auxym> @Shinyzenith also did you see this? https://discord.com/channels/371759389889003530/371759389889003532/955974017364410370
14:57:39FromDiscord<Shinyzenith> In reply to @PMunch "<@633967275090771971>, do you have": yes, I'll push to an experimental branch
14:57:44FromDiscord<Shinyzenith> In reply to @auxym "<@!633967275090771971> also did you": Oh no
14:57:46FromDiscord<Shinyzenith> :( sorry
14:57:50FromDiscord<Shinyzenith> i'll go through it now
14:58:31FromDiscord<Shinyzenith> In reply to @Elegantbeef "So it's due to": 😔
15:01:11FromDiscord<Shinyzenith> @PMunch https://github.com/waycrate/nim-wl/tree/devel
15:02:27PMunchBy the way, you can write a rename callback for Futhark
15:03:05FromDiscord<Shinyzenith> i don't quite understand, can you provide an example?
15:03:06PMunchSo you can have something like `if name.startsWith("struct_"): name[7..^1]` to remove all those `struct` names
15:03:16FromDiscord<Shinyzenith> O
15:03:25PMunchBut I plan on fixing those names in an upcoming release anyways
15:03:35FromDiscord<Shinyzenith> Oh awesome!
15:03:42PMunchThose and the static inlines will likely be the same release
15:03:48FromDiscord<Shinyzenith> I'll wait for the release then, will keep them hardcoded for now
15:04:49FromDiscord<Shinyzenith> also if you wonder why literally almost every single line is commented under the sun, it's cuz I want to make this compositor friendly for people to learn from so I apologize ahead of time if that makes the code messy
15:04:57PMunchI mean you could also remove all the `wl_` prefixes which won't be necessary in Nim :)
15:05:04PMunchAnd upercase all the types
15:05:25PMunchComments are good, as long as they are kept up to date with the code .)
15:05:25FromDiscord<Shinyzenith> In reply to @PMunch "I mean you could": It's just easier to differentiate what is from libwayland and wlroots
15:05:33PMunchWhich part are you having trouble with by the way?
15:05:59FromDiscord<Shinyzenith> In reply to @PMunch "Which part are you": libherb.nim line 148, removing it also removes the segfault
15:06:09FromDiscord<Shinyzenith> In reply to @PMunch "Comments are good, as": yep I'm trying my best 😁
15:07:24PMunchYou don't need semicolons in Nim by the way
15:07:46PMunchAnd it's convention to have a space after colons in type definitions
15:07:47FromDiscord<Shinyzenith> Oh ik, it just satisfies my java brain
15:07:58FromDiscord<Shinyzenith> In reply to @PMunch "And it's convention to": Noted
15:08:10PMunche.g. `var time: struct_timespec`
15:08:44FromDiscord<Shinyzenith> I believe I've done that everywhere
15:09:05FromDiscord<Shinyzenith> other than fieldParentPtr,forgot to change that one
15:09:35FromDiscord<Shinyzenith> nvm i forgot it in a few places
15:10:42FromDiscord<Shinyzenith> fixed
15:11:41NimEventerNew thread by Drkameleon: Ruby's parallel-like functionality in Nim, see https://forum.nim-lang.org/t/9032
15:14:54*noeontheend joined #nim
15:17:26PMunch@Shinyzenith, and you're sure that `data` is actually a pointer to a `wlr_output`?
15:17:54FromDiscord<Shinyzenith> In reply to @PMunch "<@633967275090771971>, and you're sure": which line are you talking about?
15:18:10PMunch124
15:18:18PMunchYou use that variable on line 148
15:18:32PMunchTo look into its structures
15:18:37FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/956210366243803156/unknown.png
15:18:43FromDiscord<Shinyzenith> oh wlr output
15:18:46FromDiscord<Shinyzenith> yeah it should have the data
15:19:03FromDiscord<Shinyzenith> libwayland callbacks will always have the respective struct in the dispatch data
15:19:25FromDiscord<Shinyzenith> Odd thing is, I had this same problem earlier with another callback
15:19:35FromDiscord<Shinyzenith> https://media.discordapp.net/attachments/371759389889003532/956210608523579392/unknown.png
15:19:36FromDiscord<Shinyzenith> these 2
15:19:48FromDiscord<Shinyzenith> they threw the same segfault
15:19:51FromDiscord<Shinyzenith> but moving them to herb.nim fixed it
15:19:53FromDiscord<Shinyzenith> I have no idea why
15:20:14FromDiscord<Shinyzenith> so a) they surely must have the dispatch data in the data field ↵b) something in libherb.nim is causing the fuck up 🥲
15:20:19PMunchHmm, moving them fixed it?
15:20:22FromDiscord<Shinyzenith> Yep
15:20:24PMunchThat sounds a bit fishy
15:20:37FromDiscord<Shinyzenith> I can try to reproduce rn if you want
15:20:42PMunchGuess it's time for some GDB debugging
15:20:53FromDiscord<Shinyzenith> I'll get on it
15:21:32FromDiscord<Shinyzenith> oh wait before that
15:21:38FromDiscord<Shinyzenith> let me try 1 possible fix rq
15:22:03FromDiscord<Shinyzenith> oh nvm it's not a possible fix
15:22:47FromDiscord<auxym> @Shinyzenith you're taking a pointer to a stack variable here: https://github.com/waycrate/nim-wl/blob/devel/src/libherb.nim#L148
15:23:03FromDiscord<auxym> add_signal uses unsafeaddr on herb_output
15:23:13FromDiscord<Shinyzenith> segfault @ pmunch https://media.discordapp.net/attachments/371759389889003532/956211523011887104/unknown.png https://media.discordapp.net/attachments/371759389889003532/956211523234172958/unknown.png
15:23:54PMunch@auxym, oh yeah that might be it
15:24:19FromDiscord<Shinyzenith> In reply to @auxym "add_signal uses unsafeaddr on": signal_add ?
15:24:41PMunchOh well, gotta go for a while
15:24:49FromDiscord<Shinyzenith> Cya, thank you for the help pmunch
15:24:50FromDiscord<Shinyzenith> ❤️
15:25:42FromDiscord<auxym> In reply to @Shinyzenith "signal_add ?": here https://github.com/waycrate/nim-wl/blob/devel/src/libherb.nim#L58
15:26:25FromDiscord<Shinyzenith> so should I change it to addr?
15:26:29FromDiscord<auxym> your herb_output is a stack variable so as soon as init_server() exits its memory is cleared
15:26:44FromDiscord<Shinyzenith> Oh
15:27:02FromDiscord<Shinyzenith> that makes sense why it works in the main file
15:27:11FromDiscord<Shinyzenith> instantiation is done by then, function call ends, and it returns the object
15:27:27FromDiscord<auxym> In reply to @Shinyzenith "so should I change": no. you have to make sure herb_output is kept around somehow. either manual memory management (not recommended unless you really have to for C compat) or using a ref type and keeping a ref around somewhere
15:28:08FromDiscord<Shinyzenith> I guess I'll read up about refs
15:28:43FromDiscord<auxym> ref is just a pointer, but its freeing is handled automatically by Nim's memory-manager
15:29:23FromDiscord<Shinyzenith> https://nim-lang.org/docs/system.html#ref this right?
15:31:23FromDiscord<auxym> https://nim-lang.org/docs/tut1.html#advanced-types-reference-and-pointer-types
15:31:28FromDiscord<Solitude> In reply to @Shinyzenith "https://nim-lang.org/docs/system.html#ref this righ": https://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
15:59:04*slowButPresent joined #nim
16:01:54FromDiscord<wsantos> In reply to @Elegantbeef "<@121971538898452482> <@767093711112241162> i": @ElegantBeef I can be wrong but I think this code is not working your proc open is not being called
16:02:51*noeontheend quit (Ping timeout: 245 seconds)
16:05:11FromDiscord<wsantos> I've added a echo to the open function and it did not echoed anything
16:06:33FromDiscord<wsantos> but if I remove your proc it complains /shrug
16:17:05FromDiscord<Solitude> In reply to @Shinyzenith "https://nim-lang.org/docs/system.html#ref this righ": man, your program doesnt even fail at the place you said...
16:17:07FromDiscord<Solitude> https://github.com/waycrate/nim-wl/blob/devel/src/libherb.nim#L140
16:27:43*mahlon joined #nim
16:33:57FromDiscord<Shinyzenith> In reply to @Solitude "man, your program doesnt": hold up, It doesn't? I made sure I wasn't on release mode and then proceeded to get the error on herb.nim
16:34:14FromDiscord<Shinyzenith> which was being triggered due to the erroneous line in libherb.nim
16:34:24FromDiscord<Shinyzenith> which Is what I mentioned
16:34:29FromDiscord<Shinyzenith> (edit) "Is" => "is"
16:34:35FromDiscord<Shinyzenith> In reply to @Solitude "https://nim-lang.org/docs/manual.html#types-referen": Thank you!
16:44:31FromDiscord<Bubblie> Looking more in depth into the nimgl bindings, whats weird is that the vulkan triangle example does not have the extension code like the main example, but the triangle.nim example doesnt use any extensions so I assume it doesnt even need the extension code, whats also weird is that this vk load function wasnt removed from the vulkan xml but is somehow not present in the nim bindings from the generator, so the generator may be the one with
16:44:39FromDiscord<Bubblie> Hopefully I can fix this today
16:44:45FromDiscord<Bubblie> And pr it
16:44:59FromDiscord<Bubblie> If it doesnt give me trouble of course
16:45:08FromDiscord<Bubblie> (It probably will)
16:46:55FromDiscord<Bubblie> Glfw instance extensions does work, vulkan extensions does not
16:47:28FromDiscord<Solitude> @PMunch any idea why i cant echo futhark generated objects with `/home/solitude/git/nim/lib/system/dollars.nim(108, 12) Error: request to generate code for .compileTime proc: Lit`
16:49:33FromDiscord<Bubblie> Does nimgl have lambdas
16:49:36FromDiscord<Bubblie> Kinda like java lambdas
16:50:24PMunchThat's because Futhark uses macroutils and this bug: https://github.com/nim-lang/Nim/issues/18986
16:50:30PMunch@Solitude ^
16:51:14FromDiscord<Solitude> i dont get it
16:51:17FromDiscord<Solitude> but amazing
16:51:50PMunchAmazing?
16:52:04FromDiscord<Solitude> yes, im truly amazed..
16:52:06FromDiscord<Phil> In reply to @Bubblie "Kinda like java lambdas": It does. You can pass functions like any normal parameter and for writing anonymous procs there's the sugar stdlib
16:52:16PMunch@Solitude, by what?
16:52:19FromDiscord<Phil> Link to docs incoming once I get there
16:52:28FromDiscord<Solitude> by shit like this
16:52:49PMunchAh right, yeah it's unfortunate
16:53:14FromDiscord<Bubblie> What happened?
16:53:16FromDiscord<Solitude> not even `severe` tag...
16:53:18FromDiscord<Bubblie> In reply to @Isofruit "It does. You can": Also cool
16:53:51PMunch@Solitude, I don't think any of the core devs have seen the issue. It's not tagged with anything
16:53:59PMunch@Solitude, which version are you on?
16:54:03FromDiscord<Phil> In reply to @Bubblie "Kinda like java lambdas": https://nim-lang.org/docs/sequtils.html↵You want to look at the first example, notice how they import std/sugar↵(Under the hood it's really just writing the syntax `proc(<yourParams>): <outputType> = <yourProcBody>` for you )
16:54:14FromDiscord<Solitude> bleeding edge
16:54:29PMunchOh, so what unclechu said there isn't correct
16:54:36PMunchOr rather, the actual error isn't fixed
16:54:46PMunchCould you leave a comment about that?
16:58:24FromDiscord<Bubblie> In reply to @Isofruit "https://nim-lang.org/docs/sequtils.html You want to": Swag
16:58:35FromDiscord<Bubblie> I personally really liked the way java di lambdas
16:58:38FromDiscord<Bubblie> Its one of the things they did well
16:58:54FromDiscord<Bubblie> This is pretty similar
16:59:01FromDiscord<Bubblie> With the syntaxic sugar
16:59:19FromDiscord<Phil> The syntactic sugar is straight up JS arrow functions
17:00:12FromDiscord<Phil> Which I think either JS got inspired from java for, or java got inspired for their lambda bei JS arrow functions, I actually don't know what came first
17:00:35FromDiscord<Phil> (edit) "functions," => "functions (in terms of how the syntax looks like,"
17:02:29PMunch@Solitude, is that the commit that introduces the bug?
17:03:44FromDiscord<Bubblie> In reply to @Isofruit "Which I think either": Js from java
17:03:52FromDiscord<Bubblie> Java had lambdas first
17:04:01FromDiscord<Bubblie> Before js
17:05:58FromDiscord<Solitude> In reply to @PMunch "<@104136074569211904>, is that the": its commit my compiler is on
17:06:31PMunchOh right
17:06:43PMunchI guess a `git bisect` might be in order
17:07:52FromDiscord<Solitude> damn, cant even build older compiler... `/home/solitude/git/nim/lib/system/nimscript.nim(206, 10) Error: echo ["[NimScript] ", "exec: " & command] can have an unlisted effect: WriteIOEffect`
17:08:05FromDiscord<Solitude> truly amazing
17:22:34FromDiscord<Jakraes> Quick question, how do you remove an item from a seq at ay index
17:22:43FromDiscord<Jakraes> (edit) " ay index" => "a y index?"
17:23:27PMunch@Solitude, you can't build an older compiler using the new compiler?
17:23:55PMunch@Jakraes, `remove` from strutils?
17:24:07FromDiscord<Jakraes> I'll check it out, thanks
17:24:19FromDiscord<Bung> @PMunch https://github.com/PMunch/nimlsp/pull/120 pls take a look
17:24:30PMunch@Jakraes, delete sorry
17:25:15FromDiscord<Jakraes> I just checked it, it's only for strings :/
17:25:23PMunch@Bubblie, done
17:25:38PMunchOops, @Bung, done
17:26:29PMunch@Jakraes, oh I meant sequtils
17:26:35FromDiscord<Jakraes> Ah, sequtils is the thingy
17:26:36FromDiscord<Jakraes> Yup
17:27:05PMunchMaybe the pain in my leg is getting to me
17:29:24FromDiscord<Bung> hmm why it doesn't run CI ? it runs on my own fork repo well
17:32:01PMunch@Bung, no idea you're the one who implemented it :P
17:32:48PMunchProbably because nothing have been pushed yet?
17:33:44FromDiscord<Bung> uh merge doesn't consider as push?
17:34:47PMunchWell the action wasn't there when it was pushed
17:34:53PMunchIt should run for the next push
17:35:45FromDiscord<Bung> okay , that's nice
17:36:08FromDiscord<Bung> I guess windows platform maybe fails
17:37:01*mahlon quit (Ping timeout: 245 seconds)
17:39:32PMunchAs is tradition
17:56:32*rwb quit (Quit: ZNC - https://znc.in)
17:56:44*rwb joined #nim
18:01:30*kayabaNerve joined #nim
18:01:41*Zectbumo joined #nim
18:43:22FromDiscord<wsantos> Is it possible to use a `concept` as type ? or it can only be used as generic constraints ?
18:44:15*kayabaNerve_ joined #nim
18:44:37*kayabaNerve quit (Ping timeout: 240 seconds)
18:50:45FromDiscord<Rika> Concepts are abstract, so no types
18:56:23*vicecea quit (Remote host closed the connection)
18:57:13*vicecea joined #nim
19:05:56*Zectbumo quit (Remote host closed the connection)
19:12:46*TechAspirer joined #nim
19:14:57*kayabaNerve_ quit (Ping timeout: 240 seconds)
19:37:14FromDiscord<Shinyzenith> @auxym I don't quite understand how to implement the ref solution, can you provide an example?
19:37:26FromDiscord<Shinyzenith> I still don't quite understand it's utility either
19:37:31*Jjp137 quit (Quit: Leaving)
19:38:38FromDiscord<ynfle> @wsantos You cana use it in as a type delaration for a proc/func/etc. param https://play.nim-lang.org/#ix=3Ti2
19:39:02reversem3[m]Trying to learn parsexml like I learned lxml. Is there a good example have to parse out levels of a xml file and attributes ?
19:39:09FromDiscord<wsantos> Yeah, I was wanting to use as a type 😦
19:39:30FromDiscord<ynfle> In reply to @wsantos "Yeah, I was wanting": What do you mean?
19:40:01FromDiscord<ynfle> In reply to @reversem3 "Trying to learn parsexml": What do you mean by levels? Can you show an example of what you'd want to acheive
19:40:05FromDiscord<wsantos> this
19:40:07FromDiscord<wsantos> sent a code paste, see https://play.nim-lang.org/#ix=3Ti3
19:41:59FromDiscord<ynfle> Why are you still using inheritance?
19:42:00*Jjp137 joined #nim
19:45:19FromDiscord<wsantos> What do you mean ? I still need to use so others can create "dbwrappers" for my framework, right ?
19:45:54FromDiscord<wsantos> My plan is to keep inheritance and add what we discussed yesterday, but in the mean time I decided to test concepts as types 😄
19:46:10FromDiscord<ynfle> You don't need to
19:48:01FromDiscord<wsantos> I don't know what to do then
19:48:11FromDiscord<ynfle> What's you issue?
19:48:28FromDiscord<ynfle> Any type that fulfils the ciretion in the concept will compile
19:48:39FromDiscord<ynfle> They don't need to inherit from a specific type
19:48:48FromDiscord<ynfle> It's like an interface in Java
19:49:07FromDiscord<wsantos> I want to abstract databases so my system, just know about the the `DatabaseWrapper` , if we need a new DB one could just implement a new class using ` DatabaseWrapper`
19:49:13FromDiscord<Phil> I would like to point out that java interfaces are decently easier to define
19:49:22FromDiscord<ynfle> In reply to @Isofruit "*I would like to": 💯
19:49:33reversem3[m]https://play.nim-lang.org/#ix=3Ti7
19:49:36FromDiscord<ynfle> But they function the same way that you don't have to implement something,
19:49:38FromDiscord<Phil> In exchange java interfaces give you like 1% of the power
19:49:50FromDiscord<ynfle> In reply to @Isofruit "In exchange java interfaces": Lol
19:49:59FromDiscord<ynfle> In reply to @reversem3 "https://play.nim-lang.org/#ix=3Ti7": What do you want to extract
19:50:25FromDiscord<wsantos> In reply to @ynfle "They don't need to": that code was a test with concepts
19:50:40FromDiscord<Phil> In reply to @ynfle "Lol": Like, being able to arbitrarily logic check your types is pretty damn sexy.... now if I could use that and be a fair bit less confused while doing so I'd love it
19:51:04FromDiscord<wsantos> @ynfle that is my draft so far
19:51:05FromDiscord<wsantos> https://media.discordapp.net/attachments/371759389889003532/956278933760933888/unknown.png
19:51:07FromDiscord<ynfle> In reply to @wsantos "that code was a": I know. But you are trying to define a type instantion with an concept. That doesn't make sense as nim doesn't know the type
19:51:23FromDiscord<ynfle> In reply to @Isofruit "Like, being able to": Lol
19:51:38FromDiscord<wsantos> Yeap I know that, I'm not doing it, it was just a dummy test I did earlier
19:51:38reversem3[m]FromDiscord: The root , the devices qa_status
19:51:48FromDiscord<Recruit_main707> concepts are more like fancy generics, you probably want to used methods and dynamic dispatch
19:52:43FromDiscord<ynfle> In reply to @wsantos "Yeap I know that,": What I was saying yesterday is the DBConn from each db_ module implements the same API so they'd all pass the test of your concept. No need for wrappers
19:52:55FromDiscord<ynfle> In reply to @ynfle "What I was saying": Unless you are doing something fancier
19:53:00FromDiscord<Phil> Wait, are you implementing your own connection pool wsantos? Well, single connection more like, but general point stands
19:53:41FromDiscord<wsantos> Not really @Phil I'm doing a Web framework and I'm working on its ORM right now
19:53:52FromDiscord<wsantos> looks good so far 😄
19:53:53FromDiscord<wsantos> https://media.discordapp.net/attachments/371759389889003532/956279638378819594/unknown.png
19:54:09FromDiscord<wsantos> This all works, now I'm working on the Database connection part, not pool yet
19:54:26FromDiscord<wsantos> But I'll need the `fancier` stuff for sure
19:54:42FromDiscord<wsantos> https://media.discordapp.net/attachments/371759389889003532/956279843425763338/unknown.png
19:54:47FromDiscord<Phil> Next question, why have an extra object type with a single field?
19:54:57FromDiscord<Phil> Instead of using the object directly
19:55:13FromDiscord<Phil> (edit) "object" => "field"
19:55:21FromDiscord<wsantos> You talking about `DatabaseWrapper` ?
19:55:31FromDiscord<wsantos> If so this is just me starting to draft it
19:55:33FromDiscord<Phil> Yeah, you're not attaching any extra data to that one
19:55:37FromDiscord<Phil> Ah, check
19:56:14FromDiscord<wsantos> I'll probably do the same as you do in tinypool there too, but not sure yet
19:56:27FromDiscord<Phil> I'll stick with the advise that chances are such a wrapper type is not needed, but either you'll prove me wrong or as you code it it'll reveal itself
19:56:55FromDiscord<wsantos> In reply to @ynfle "Unless you are doing": I'll have more things there, like DB operators, connection pool and etc and each DB have different approaches and ideas about it
19:56:58FromDiscord<Phil> An alias over multiple connection types would likely do
19:57:19FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: The root ,": The link you posted doens't have that data
19:57:57FromDiscord<wsantos> In reply to @Isofruit "I'll stick with the": That is what I'm not sure yet, hence the code changing and a heck lot of questions here 😄
19:58:07FromDiscord<ynfle> In reply to @wsantos "I'll have more things": That's fine. Are you gonna use the wrappers (or build on) std/db_ wrappers?
19:58:35FromDiscord<Phil> In reply to @wsantos "That is what I'm": Next advise: Stay away from defining the DB schema or reserve that for last, the most important part either way is the db type conversion
19:59:20FromDiscord<wsantos> In reply to @Isofruit "Next advise: Stay away": What do you mean by `defining the DB schema`. this is also "done"
19:59:26FromDiscord<wsantos> Still need to do the migrations tho
19:59:39FromDiscord<Phil> As an ORM user, I do not give a hoot if I can define my DB through you, chances are I can define my own DB myself and more specific than any interface one can generalize over the mixture sqlite, mysql and co
19:59:40FromDiscord<wsantos> sent a code paste, see https://play.nim-lang.org/#ix=3Tia
19:59:41FromDiscord<wsantos> this is how it's defined
20:00:55FromDiscord<ynfle> If you're gonna build on std/db_ wrappers, just use the concept that Beef gave you and then implement the procs separately for each DBConn type
20:01:00FromDiscord<Phil> In reply to @wsantos "this is how it's": And now arbitrary constraints and unique over multiple columns
20:01:25FromDiscord<Phil> (edit) "arbitrary" => "/nextarbitrary"
20:01:28*Zectbumo joined #nim
20:01:31FromDiscord<Phil> (edit) "/nextarbitrary" => "/next arbitrary"
20:01:56FromDiscord<wsantos> In reply to @ynfle "If you're gonna build": Yeah seems like that I need procs for handling the wrappers and not classes or new wrappers, but I still not sold
20:02:07FromDiscord<wsantos> In reply to @Isofruit "And now /next arbitrary": Not sure what you mean
20:02:08reversem3[m]FromDiscord: <ROOT_OEM_REPORT version="1.4">
20:04:07reversem3[m]reversem3[m]: https://play.nim-lang.org/#ix=3Tid
20:04:40FromDiscord<wsantos> @ynfle maybe I still thinking too much like Python/other languages, it will take time to get used to Nim, but I'm loving it
20:04:41FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: <ROOT_OEM_REPORT version="1.4">": You want the version?
20:04:46FromDiscord<ynfle> In reply to @wsantos "<@!767093711112241162> maybe I still": Great
20:04:59FromDiscord<ynfle> With more code, we can help you
20:05:56FromDiscord<Phil> In reply to @wsantos "Not sure what you": In Sqlite (I assume also in other DB's, haven't tried), you can define arbitrary constraints in SQL that every entry in a table must fulfill
20:06:26FromDiscord<Phil> Very nice when, for example, no scenario is allowed where column A contains X while column B contains Y
20:07:19FromDiscord<Phil> Similarly, another issue I so far had with ORMs was not being able to define "unique-together" constraints through them, when a combination of columns must be unique instead of just a single one.
20:07:31reversem3[m]I want to learn how to use the library rather than just coding it for me. So if x = the xmlparser and I call x.kind that shows me xmlElementOpen
20:08:24reversem3[m]how do I pull the element inside xmlElementOpen ?
20:08:35FromDiscord<wsantos> Got it @Phil makes sense
20:09:02FromDiscord<Phil> In reply to @wsantos "Got it <@!180601887916163073> makes": An example for an absolute monster of those is an image table of mine which has 6 foreign keys and only one of these is allowed to be set at once
20:10:33FromDiscord<Phil> In reply to @wsantos "Got it <@!180601887916163073> makes": https://pastebin.com/pVhm022y↵Apparently the SQL is too long for discord
20:11:15FromDiscord<wsantos> that is a lot of constraints for sure
20:11:19FromDiscord<Phil> Ah, also being able to control when a check happens for a transaction (DEFERRABLE part of the column definition) would be good
20:11:24FromDiscord<Phil> It's one constraint, just a big one
20:11:42FromDiscord<Phil> I'm defining all 6 scenarios that are allowed
20:12:53FromDiscord<Phil> The issue with ORMs is that imo it's semi-wasteful in terms of time to bother with DB creation, I want a DB-output-parser for the most part, that's where the actual work is. For fine-grained DB control I want my raw sql
20:13:04FromDiscord<Phil> It's why I never use norm's DB creation feature
20:13:51FromDiscord<Phil> (edit) "The issue with ORMs is that imo it's semi-wasteful in terms of time to bother with DB creation, I want a DB-output-parser for the most part, that's where the actual work is. For fine-grained DB control ... I" added "that's done once"
20:14:35FromDiscord<Phil> That's also why having e.g. the option to write raw SQL and have that be parsed into the model of your choosing is also really nice
20:14:54FromDiscord<Phil> (edit) "That's also why having e.g. the option to write raw SQL and have that be parsed into the model of your choosing is also really nice ... " added "(see Django's rawSQL interface)"
20:17:03FromDiscord<wsantos> In reply to @Isofruit "The issue with ORMs": I have been thinking about that a lot, my idea is to make what you said work and add it to, I don't plan to put effort on db creation for now at least
20:18:47FromDiscord<wsantos> (edit) "to," => "to github,"
20:19:21FromDiscord<ynfle> In reply to @reversem3 "how do I pull": `for i in x:` or `x[0]` for the first elemetn only though
20:19:43FromDiscord<Phil> In reply to @wsantos "I have been thinking": Yeh, Db creation is one of those things where it's a bit of a "you can't really win"-feast
20:19:44FromDiscord<ynfle> In reply to @reversem3 "I want to learn": Are you using xmlparser or parsexml?
20:20:01reversem3[m]FromDiscord: parsexml
20:20:36*mahlon joined #nim
20:20:40FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: parsexml": Sorry that was for xmlparser. That would parse the whole xml tree and return it to you
20:21:10FromDiscord<Phil> Because typically you're at best giving parity to what already exists with rawSQL, for anything that goes beyond that you're implementing constraints at the ORM level and that's going to require some significant design legwork to not explode your complexity
20:21:27FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: parsexml": parsexml is a little more complicated, because you get the elements as they come. You can't look ahead without continueing to parse
20:21:28FromDiscord<Phil> (edit) "that" => " what rawSQL offers "
20:21:39reversem3[m]FromDiscord: yeah I don't want to parse the whole tree , I want to be able to upload this to a server and parse out certain information and store in a database
20:22:05reversem3[m]First I need to figure out how to parse out the information I need
20:22:30FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: yeah I don't": You could parse the whole file then extract that information
20:23:34reversem3[m]FromDiscord: Ok how would I do that , again I just want help figuring out this
20:24:16reversem3[m]Using lxml with python is super easy to do but this has me a little confused
20:24:31FromDiscord<ynfle> In reply to @reversem3 "FromDiscord: Ok how would": https://nim-lang.org/docs/xmlparser.html#loadXml%2Cstring%2Cset%5BXmlParseOption%5D
20:24:39FromDiscord<ynfle> And then helper procs in lxml
20:24:42FromDiscord<ynfle> (edit) "lxml" => "xmltree"
20:25:02FromDiscord<ynfle> Like https://nim-lang.org/docs/xmltree.html#%5B%5D%2CXmlNode%2Cint
20:26:07reversem3[m]ohhh, so what is the point of parsexml then ?
20:26:25reversem3[m]the examples are only for html tags
20:30:15FromDiscord<ynfle> In reply to @reversem3 "ohhh, so what is": parsexml is to parse it yourself and perhaps build a datastructure or something
20:30:39FromDiscord<ynfle> xmlparser is the convinient way to parse the whole xml file/string
20:31:06FromDiscord<ynfle> Also, you can use `findall` in xmltree and the `attr` or `attrs` in xmltree
20:31:49reversem3[m]ok so use xmlparser to open the file then use xmltree to parse out the elements and attributes ?
20:35:55FromDiscord<ynfle> In reply to @reversem3 "ok so use xmlparser": Kinda. xmlparser will parse the file and close it (it can be used for strings and streams also), but it won't return a file handle. It will return an xml tree. the xmltree module is used to access the tree. Some other useful procs are child, text, innertext and tag
20:54:13*Zectbumo_ joined #nim
20:55:55*Zectbumo quit (Ping timeout: 260 seconds)
20:57:39*Zectbumo_ quit (Read error: Connection reset by peer)
21:02:19*Zectbumo joined #nim
21:09:24*Zectbumo quit (Ping timeout: 240 seconds)
21:12:08reversem3[m]<FromDiscord> "<ynfle> In reply to @reversem3..." <- Ok I will look into that , thanks for showing me.
21:18:02FromDiscord<ynfle> In reply to @reversem3 "<FromDiscord> "<ynfle> In reply": 👍 Feel free to ask if you have any further questions
21:20:42*xaltsc quit (Read error: Connection reset by peer)
21:21:18*Zectbumo joined #nim
21:27:01*Zectbumo quit (Ping timeout: 256 seconds)
21:42:15*wyrd quit (Ping timeout: 240 seconds)
21:42:17*PMunch quit (Quit: leaving)
21:47:17*Zectbumo joined #nim
21:49:24*wyrd joined #nim
22:14:04FromDiscord<Elegantbeef> @wsantos\: if you're using `typeof` it doesnt run at runtime
22:14:10FromDiscord<Elegantbeef> `typeof` is a compile time "type this statement"
22:14:14FromDiscord<Elegantbeef> Removing that it'll work
22:14:37FromDiscord<Elegantbeef> @Shinyzenith\: send the file
22:29:34nrds<Prestige99> Is there a cost to wrapping code blocks in a try except (assuming there would be no errors) or is it effectively no-cost?
22:30:11FromDiscord<Elegantbeef> Fairly certain there is only a cost if it raises
22:30:27FromDiscord<Elegantbeef> I guess there is `if exceptionRaised`
22:30:51FromDiscord<Elegantbeef> Benchmarking is your friend 😛
22:31:39*ltriant quit (Ping timeout: 252 seconds)
22:31:59*ltriant joined #nim
22:32:55nrds<Prestige99> Yeah good idea. Hopefully it's negligible
22:38:56FromDiscord<creikey> dang channels are nice
22:53:29FromDiscord<Elegantbeef> they're easy
23:20:39FromDiscord<creikey> `var connected {.threadvar.} : Channel[Socket]`↵can I have a channel of sockets like this?
23:24:57FromDiscord<huantian> Actually no I was wrong
23:25:48FromDiscord<huantian> I think the example just didn't have any paths in the output
23:27:45FromDiscord<huantian> Hm how do I do this
23:34:33FromDiscord<Elegantbeef> Perhaps though it seems a bit weird↵(@creikey)
23:35:11*Gustavo6046 joined #nim
23:35:34FromDiscord<creikey> for this
23:35:37FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3TiU
23:36:29FromDiscord<Elegantbeef> Seems more like a case for a global guarded `connections`
23:37:07FromDiscord<creikey> In reply to @Elegantbeef "Seems more like a": I thought you couldn't do this because each thread has its own heap? seq is on the heap
23:37:23FromDiscord<Elegantbeef> use `orc` or `arc`
23:37:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TiV
23:38:03FromDiscord<creikey> interesting
23:38:07FromDiscord<creikey> then just acquire/release
23:38:22FromDiscord<Elegantbeef> Or even `withLock connLock` 😛
23:38:28FromDiscord<creikey> wow that's nice
23:38:35FromDiscord<creikey> how did I have no idea this exists?
23:38:41FromDiscord<creikey> system/threads doc page needs an example with that
23:38:52FromDiscord<creikey> this is where I was looking
23:39:00FromDiscord<Elegantbeef> Which thing the `guard` or the `withlock`?
23:39:06FromDiscord<creikey> both
23:39:16FromDiscord<creikey> withlock is in std/locks so tha tmakes sense
23:39:30FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual_experimental.html#guards-and-the-locks-section-protecting-global-variables
23:39:38FromDiscord<creikey> In reply to @Elegantbeef "use `orc` or `arc`": ah wait these aren't the dedfault
23:39:41FromDiscord<creikey> (edit) "dedfault" => "default"
23:39:43FromDiscord<creikey> refc is default
23:39:45FromDiscord<Elegantbeef> No they are not
23:39:50FromDiscord<Elegantbeef> `orc` will be the default
23:39:52FromDiscord<Elegantbeef> Soon TM 😜
23:40:02FromDiscord<Elegantbeef> For threading orc/arc are just better
23:40:09FromDiscord<creikey> built different
23:40:18FromDiscord<Elegantbeef> Well they're better all together reaally
23:40:31FromDiscord<huantian> can't wait for orc default
23:40:36FromDiscord<creikey> In reply to @Elegantbeef "Soon TM 😜": wht are we waiting for?
23:40:38FromDiscord<creikey> (edit) "wht" => "what"
23:40:43FromDiscord<creikey> "Unfortunately that makes its performance profile hard to reason about so it is less useful for hard realtime systems.↵"
23:40:46FromDiscord<Elegantbeef> Think the compiler to bootstrap with orc
23:41:00FromDiscord<creikey> In reply to @Elegantbeef "Think the compiler to": why can't it right now
23:41:22FromDiscord<Elegantbeef> Some issues/hacks with refc i think
23:41:24FromDiscord<Elegantbeef> Dont recall exactly
23:41:30FromDiscord<creikey> interesting
23:41:32FromDiscord<Elegantbeef> It'll be the default with 2.0
23:43:16NimEventerNew thread by Mardiyah: How do we preallocate string as element of array as this is.., see https://forum.nim-lang.org/t/9033