<< 12-04-2022 >>

00:01:57FromDiscord<huantian> Heh
00:02:12FromDiscord<huantian> Looks like it’s going well
00:02:39FromDiscord<!Patitotective> at least now works lol
00:12:25FromDiscord<!Patitotective> how can i convert a `set[range 0..65535(int)]` to `set[byte]`
00:12:53FromDiscord<Elegantbeef> you might be able to cast
00:13:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UTB
00:13:58FromDiscord<Elegantbeef> `cast[set[byte]](myBaseSet)` should cut off the bits unused
00:18:43FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UTD
00:19:25FromDiscord<Elegantbeef> `echo typeof cast[ptr set[byte]](a.addr)[]`
00:19:51FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UTE
00:20:04FromDiscord<Elegantbeef> Also more expensive
00:20:04FromDiscord<!Patitotective> nvm it doesn't
00:20:27FromDiscord<!Patitotective> In reply to @Elegantbeef "`echo typeof cast[ptr set[byte]](a.addr)[]`": why normal casting doesn't work?
00:21:05FromDiscord<Elegantbeef> Casting stack allocated values gets funky sometimes, and i actually dont know why
00:22:09*xet7 quit (Ping timeout: 256 seconds)
00:25:27*SamuelMarks quit (Ping timeout: 240 seconds)
00:34:26FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UTG
00:34:54FromDiscord<Elegantbeef> What the fuck are you doing
00:35:29FromDiscord<!Patitotective> nvm
00:35:50FromDiscord<Elegantbeef> Why a macro?
00:36:23FromDiscord<!Patitotective> yea, i just realized that
00:36:25FromDiscord<!Patitotective> lol
00:37:57FromDiscord<Elegantbeef> `proc castTo(a: set, b: typedesc[SomeOrdinal]): auto = cast[ptr set[b]](a.unsafeaddr)[]`
00:39:37FromDiscord<!Patitotective> `unsafeAddr` scares me 💀
00:39:52FromDiscord<Elegantbeef> It's the same as `addr`
00:39:53FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/cqa
00:41:34NimEventerNew Nimble package! resultutils - Utility macros for easier handling of Result, see https://github.com/nonnil/resultutils
00:55:27FromDiscord<huantian> In reply to @Elegantbeef "It's the same as": No unsafeAddr is unsafe while addr is very safe
00:55:47FromDiscord<Elegantbeef> lol
00:55:57FromDiscord<Elegantbeef> It's gone in 1.7.x anyway
00:59:34NimEventerNew Nimble package! nitro - Nitro state channels in Nim, see https://github.com/status-im/nim-nitro
01:00:06*vicfred quit (Quit: Leaving)
01:01:58FromDiscord<!Patitotective> In reply to @Elegantbeef "It's gone in 1.7.x": unsafeAddr?
01:05:26FromDiscord<Elegantbeef> Cause that's devel and it's a dumb feature
01:05:45FromDiscord<!Patitotective> so now how do you cast byte?
01:05:59FromDiscord<Elegantbeef> `.addr`
01:06:00FromDiscord<!Patitotective> (edit) "now" => "in 1.7.x"
01:06:14FromDiscord<Elegantbeef> `unsafeaddrr` is no more unsafe than `addr` it's a misnomer
01:07:37*kayabaNerve joined #nim
01:11:35NimEventerNew Nimble package! ethers - Port of ethers.js to Nim, see https://github.com/status-im/nim-ethers
01:20:07*neurocyte8614492 quit (Ping timeout: 240 seconds)
02:13:10*arkurious quit (Quit: Leaving)
02:30:16*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])
02:31:35*Gustavo6046 joined #nim
02:32:03FromDiscord<!Patitotective> niprefs now with support for `set[char]` and `set[byte]`, the thing that no one needed but i asked for↵https://github.com/Patitotective/niprefs
02:32:06FromDiscord<!Patitotective> (edit) "niprefs now with support for `set[char]` and `set[byte]`, the thing that no one needed but i asked for↵https://github.com/Patitotective/niprefs ... " added "👀"
02:33:14FromDiscord<Elegantbeef> Why am i 28?
02:33:34FromDiscord<huantian> I don't know cus you're old?
02:33:55FromDiscord<Elegantbeef> Hey that's half a decade older than i
02:34:10*Gustavo6046 quit (Max SendQ exceeded)
02:34:37*Gustavo6046 joined #nim
02:35:33FromDiscord<!Patitotective> 👀 ↵im below 5% (yes im 61) https://media.discordapp.net/attachments/371759389889003532/963266091231084574/unknown.png
02:36:16FromDiscord<Elegantbeef> I think you mean 16, with the amount you use emojis
02:36:26FromDiscord<leorize> huh, didn't know you were that young
02:36:37FromDiscord<Elegantbeef> Who?
02:36:41FromDiscord<spoon> emojis are for the elderly 🙄
02:36:45FromDiscord<!Patitotective> In reply to @Elegantbeef "I think you mean": they're pretty cool, you should use them too
02:36:54FromDiscord<leorize> beef\: I thought you're up there with those old farts like disruptek
02:36:58FromDiscord<Rika> When the hell did I become 22
02:36:59FromDiscord<!Patitotective> (edit) "In reply to @Elegantbeef "I think you mean": they're pretty cool, you should use them too ... " added "🙃"
02:37:04FromDiscord<Elegantbeef> Why?
02:37:11FromDiscord<!Patitotective> In reply to @Rika "When the hell did": when's your birthday?
02:37:12FromDiscord<Elegantbeef> Why the fuck does everyone think i'm old
02:37:14FromDiscord<Elegantbeef> Fuck yall
02:37:24FromDiscord<spoon> i never did that poll, when do those happen
02:37:27FromDiscord<huantian> 🥴
02:37:28FromDiscord<Rika> In reply to @Patitotective "when's your birthday?": What
02:37:38FromDiscord<huantian> rika what's your mother's maiden name
02:37:48FromDiscord<Elegantbeef> What's your SIN/SID?
02:37:55FromDiscord<spoon> What's your home address?
02:37:56FromDiscord<!Patitotective> In reply to @Rika "What": if you tell me your birthday i will tell you when the hell did you become 22
02:37:57FromDiscord<Rika> In reply to @Elegantbeef "What's your SIN/SID?": What are those
02:38:00FromDiscord<!Patitotective> (edit) "In reply to @Rika "What": if you tell me your birthday i will tell you when the hell did you become 22 ... " added "lmfao"
02:38:14FromDiscord<Rika> In reply to @Patitotective "if you tell me": Sorry it’s on February 31
02:38:24FromDiscord<!Patitotective> yea, and im 61
02:38:27FromDiscord<Elegantbeef> USA/Canada have numbers to attach to your economic life called "social insurance number"s
02:38:36FromDiscord<spoon> social security number
02:39:07FromDiscord<spoon> cnida copying us yet again
02:39:27FromDiscord<huantian> In reply to @Elegantbeef "USA/Canada have numbers to": and the social security number was meant to not be identifying so it's designed horribly and you can easily guess random ssns and it'll be valid
02:39:42FromDiscord<Elegantbeef> Yea i know
02:39:45FromDiscord<spoon> yeah, apparently if someone was born right after you, you know their ssn
02:39:53FromDiscord<Elegantbeef> They became the mainstay and it's fucking garbage
02:40:10FromDiscord<Rika> I have neither of those, I’m not even American or European
02:40:30FromDiscord<Elegantbeef> I mean it was a joke
02:40:45FromDiscord<Rika> It was a terrible joke compared to the other ones
02:41:04FromDiscord<Elegantbeef> Clearly
02:41:19FromDiscord<spoon> you just don't understand classy humor
02:41:34FromDiscord<Elegantbeef> Also notice how leorize went "Fuck i thought you were ancient" then skedaddled
02:41:44FromDiscord<Rika> Damn if that’s classy then I don’t think I want to be classy
02:41:53FromDiscord<spoon> lol
02:42:12FromDiscord<Elegantbeef> If my humour is classy i'm scared what you consider blue collar humour
02:42:42FromDiscord<spoon> i think i give off the ambiance of an absolutely ancient individual
02:42:49FromDiscord<spoon> i didn't mean to rhyme but damn
02:43:04FromDiscord<Elegantbeef> No you do not
02:43:50FromDiscord<Rika> You sound younger than me
02:44:28FromDiscord<Rika> If I were to guess I’d say 16 or 17
02:44:33FromDiscord<spoon> i know you all think i'm a wise old man but i'm still college age
02:44:47FromDiscord<spoon> lol damn
02:44:50FromDiscord<Rika> You’re college age?
02:44:53FromDiscord<spoon> yea, 20
02:44:55FromDiscord<Rika> Can’t tell
02:44:59FromDiscord<spoon> turn 21 this year
02:45:01FromDiscord<!Patitotective> @Rika you're the one of your twitch? how are so good at that weird stuff
02:45:04FromDiscord<Rika> Damn really
02:45:15FromDiscord<huantian> Hm I wonder how old I sound
02:45:16FromDiscord<Rika> In reply to @Patitotective "<@259277943275126785> you're the one": Lol years of experience
02:45:21FromDiscord<huantian> don't think I'm as wold as beef
02:45:25FromDiscord<Rika> In reply to @huantian "Hm I wonder how": Thirty ish or older
02:45:27FromDiscord<Rika> What
02:45:30FromDiscord<Rika> Hm
02:45:43FromDiscord<Rika> Okay that’s a good point
02:45:45FromDiscord<huantian> In reply to @Rika "Thirty ish or older": What really I sound that old?
02:45:47FromDiscord<!Patitotective> capitalizing words makes you sound older 💀
02:45:55FromDiscord<Rika> In reply to @Patitotective "capitalizing words makes you": Not really no
02:46:02FromDiscord<spoon> i hate capitalization
02:46:15FromDiscord<Rika> In reply to @spoon "i hate capitalization": Would you rather communisation
02:47:12FromDiscord<!Patitotective> see? only me and @spoon, the young people, dont capitalize words
02:47:29FromDiscord<huantian> ok but capitalismtion is just random for me tbh
02:47:31FromDiscord<Rika> You sounded older to me, Pat
02:47:43FromDiscord<spoon> yeah the word i capitalized earlier was just a fluke i swear
02:48:04FromDiscord<Rika> In reply to @spoon "What's your home address?": Sus
02:48:14FromDiscord<!Patitotective> In reply to @Rika "Sus": now trying to look younger? eh?
02:48:19FromDiscord<Rika> In reply to @Patitotective "now trying to look": The fuck
02:48:40FromDiscord<huantian> this isn't reddit you can't just downvote people
02:48:42FromDiscord<Rika> Lol ask everyone here and they’ll agree that I sound young
02:48:51FromDiscord<Rika> Ask someone who doesn’t know me and they’ll guess I’m 12
02:49:13FromDiscord<Rika> in appearance though
02:49:16FromDiscord<spoon> nah
02:49:25FromDiscord<spoon> not that young
02:49:39FromDiscord<huantian> you haven't even seen rika irl how can you tell
02:49:54FromDiscord<Rika> In reply to @huantian "you haven't even seen": My twitch streams xd
02:49:57FromDiscord<!Patitotective> In reply to @huantian "you haven't even seen": i have seen her (?) arms
02:50:04FromDiscord<Rika> In reply to @Patitotective "i have seen her": HAHAHAHAHAHAHAHAHA
02:50:13FromDiscord<!Patitotective> no creepy
02:50:25FromDiscord<Rika> Weirdest thing to say
02:50:32FromDiscord<spoon> :KoishiThonk:
02:50:38FromDiscord<!Patitotective> also forget i asked for your birthday
02:50:54FromDiscord<Rika> What, I said February 31 already though?
02:51:03FromDiscord<!Patitotective> In reply to @spoon "<a:KoishiThonk:641406273681883137>": having nitro makes you automatically 12
02:51:27FromDiscord<spoon> i have nitro classic, that's why i have old wise energy
02:51:49FromDiscord<huantian> no that's poor child energy
02:52:07FromDiscord<!Patitotective> also, using discord makes you younger↵so, beef...
02:52:16FromDiscord<spoon> hey, i don't wanna pay an extra 5 bucks just for a banner i'll never set
02:52:25FromDiscord<huantian> I just don't have nitro 😎
02:53:50FromDiscord<spoon> buy nitro using fake bot play money
02:53:56FromDiscord<abdu> sent a code paste, see https://paste.rs/acq
02:54:00*SamuelMarks joined #nim
02:54:19FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=3UTV" => "https://play.nim-lang.org/#ix=3UTU"
02:54:33FromDiscord<Rika> Your indentation is bad
02:54:42FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=3UTU" => "https://play.nim-lang.org/#ix=3UTW"
02:54:45FromDiscord<Rika> Okay so that isn’t the error
02:54:48FromDiscord<Rika> F isn’t a file
02:54:54FromDiscord<Rika> You don’t need to close it
02:58:19FromDiscord<spoon> does f exist before you tried to assign to it? you need to use the `let` or `var` keyword otherwise
02:59:05FromDiscord<Rika> Same with the w one in the try
03:04:48FromDiscord<spoon> ah
03:07:40FromDiscord<spoon> is there a license that doesn't even require you to include the license agreement in derivatives, there's wtfpl but...
03:09:12*SamuelMarks quit (Ping timeout: 248 seconds)
03:09:56FromDiscord<Rika> If it doesn’t require you to include it then it’s effectively copyrighted no?
03:10:13FromDiscord<Rika> No license on the work is default copyrighted no?
03:11:20FromDiscord<spoon> yeah, no license should work like that, but i just want something where if you modify it you can redistribute it without the original license
03:11:50FromDiscord<Rika> Again, someone distributing your work without a license would mean people can assume THEY copyrighted the work no?
03:12:05FromDiscord<Rika> And doing that might not agree with the license you’re using
03:12:14FromDiscord<Rika> Unless it’s “do whatever”
03:13:27FromDiscord<spoon> distributing it without a license is more ambiguous like "am i even allowed to fork this", might as well be source available
03:13:47FromDiscord<spoon> why MIT and stuff exist to define that for you
03:14:03FromDiscord<Rika> What
03:14:40FromDiscord<Rika> I don’t know any license that does this, and I don’t know the legal consequences
03:14:49FromDiscord<Rika> Ask a lawyer, in the end licenses are their thing
03:15:04FromDiscord<Elegantbeef> Code without a license is just source available
03:15:25FromDiscord<Elegantbeef> You can release the code as public domain
03:15:36FromDiscord<Elegantbeef> That doesnt require any notice or attribution i think
03:15:51FromDiscord<spoon> yeah, you retain full copyright by default and you can define acceptable use (i'm not a lawyer that's just what i read)
03:16:14FromDiscord<spoon> i mean i can cc0 it
03:17:00FromDiscord<Elegantbeef> The thing with code that doesnt require a license is it prevents reuse if it's inside a project without the notice
03:17:16FromDiscord<Elegantbeef> You cannot know code is in the public domain if it's not annotated as such
03:17:34FromDiscord<Rika> Public domain and “do whatever” is different
03:17:41FromDiscord<Rika> There’s a reason I didn’t say public domain
03:18:10FromDiscord<Elegantbeef> I mean i'm talking about spoons question
03:18:59FromDiscord<Elegantbeef> It doesnt make much sense, but reasonable yea the copyright of the specific code would move along to the authors
03:19:15FromDiscord<spoon> mostly just want people to be able to use my code like it's a stackoverflow question and not have to worry
03:19:32FromDiscord<Elegantbeef> You do realize licenses only matter if you enforce them
03:20:30FromDiscord<spoon> i know, but i still don't want to infringe on people and copy paste from projects from people i don't know
03:20:35FromDiscord<Rika> You should uh
03:20:44FromDiscord<Rika> Probably include a copyright notice on the top of all files
03:20:49FromDiscord<Rika> If you just don’t want to put a license
03:20:56FromDiscord<spoon> yeah, there's usually a license.md
03:21:34FromDiscord<spoon> i could just make my own license and publish it then, like partial copies and modified copies are ok, include this license for verbatim copies
03:21:43FromDiscord<spoon> + warranty clause
03:26:24*vicfred joined #nim
03:28:21FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3UU0
03:28:44FromDiscord<creikey> (edit) "https://play.nim-lang.org/#ix=3UU0" => "https://play.nim-lang.org/#ix=3UU1"
03:29:53FromDiscord<Elegantbeef> `nim -v`?
03:31:39FromDiscord<creikey> sent a code paste, see https://paste.rs/gYU
03:31:54FromDiscord<creikey> when I run it with nim r it just says that the execution failed https://media.discordapp.net/attachments/371759389889003532/963280268045725716/unknown.png
03:32:07FromDiscord<creikey> it correctly prints the exception if I dont use an array for the uninitialized socket
03:32:27FromDiscord<creikey> if I do `var s: array[3, Socket]` is the data all zeros or random memory?
03:32:53FromDiscord<Elegantbeef> I get a nil error on 1.6.4
03:32:57FromDiscord<Elegantbeef> Go to 1.6.4
03:33:01FromDiscord<Elegantbeef> 1.6.0 had regressions
03:33:02FromDiscord<creikey> 1.6.4 does not work on windows right now for me
03:33:06FromDiscord<creikey> last time I checked
03:33:14FromDiscord<Elegantbeef> Uhh
03:33:18FromDiscord<spoon> that's what i use
03:33:24FromDiscord<spoon> i'm on windows 11 right now
03:33:27FromDiscord<Elegantbeef> Well 1.6.0 is a build with a regression
03:33:27FromDiscord<creikey> https://media.discordapp.net/attachments/371759389889003532/963280662079602728/unknown.png
03:33:35FromDiscord<creikey> I remember I tried uninstalling everything and reinstalling it and it still didn't wor
03:33:37FromDiscord<creikey> (edit) "wor" => "work"
03:33:52FromDiscord<creikey> this looks a lot like it's reusing old build symbols to me
03:33:56FromDiscord<spoon> i installed nim through scoop instead of choosenim though
03:34:07FromDiscord<Elegantbeef> pass `-f`
03:34:10FromDiscord<creikey> I have like 5 package managers on windows right now and 4 pythons in my path
03:34:20FromDiscord<spoon> oh
03:34:26FromDiscord<creikey> In reply to @Elegantbeef "pass `-f`": same thing
03:34:29FromDiscord<Elegantbeef> I get a nil error on 1.6 on linux
03:34:40FromDiscord<creikey> In reply to @Elegantbeef "pass `-f`": how do I get the knowledge you have do I just read the manual top to bottom
03:34:47FromDiscord<Elegantbeef> Does it worrk with `1.4.8`?
03:35:01FromDiscord<Elegantbeef> Yes multiple times, then contribute to the compiler and repeat↵(@creikey)
03:35:26FromDiscord<spoon> i just get undeclared identifier `Thread`
03:35:32FromDiscord<Elegantbeef> `--threads:on`
03:35:33FromDiscord<creikey> In reply to @spoon "i just get undeclared": -d:threads
03:35:36FromDiscord<creikey> --threads:on
03:36:12FromDiscord<creikey> In reply to @Elegantbeef "Does it worrk with": https://media.discordapp.net/attachments/371759389889003532/963281355494555698/unknown.png
03:36:15FromDiscord<creikey> 1.4.8 does compile though
03:36:31FromDiscord<spoon> it works on nim 1.6.4
03:36:36FromDiscord<Elegantbeef> Well try to get 1.6.4 to worrk
03:36:39FromDiscord<spoon> on windows
03:36:43FromDiscord<Elegantbeef> Does it fail with `1.6.0` spoon?
03:36:58FromDiscord<creikey> I tried for 20 minutes the other day to get 1.6.4 to work and ran out of ideas anybody have any tips
03:37:00*SamuelMarks joined #nim
03:37:03FromDiscord<spoon> i don't know, but norton did try to block it
03:37:05FromDiscord<creikey> nothing compiles under it
03:37:08FromDiscord<creikey> ohhhh wait
03:37:08FromDiscord<Elegantbeef> Use linux
03:37:09FromDiscord<creikey> I remember
03:37:10FromDiscord<creikey> the issue now
03:37:12FromDiscord<creikey> dude windows antivirus
03:37:15FromDiscord<creikey> is deleting nim compiler files
03:37:24FromDiscord<creikey> causing it to fail like this
03:37:34FromDiscord<spoon> yeah, you should be able to exclude them/recover them from quarentine
03:37:35FromDiscord<creikey> In reply to @Elegantbeef "*Use linux*": I'm not shipping to linux!
03:37:43FromDiscord<spoon> sad
03:37:46FromDiscord<spoon> use wsl
03:37:59FromDiscord<creikey> In reply to @spoon "yeah, you should be": it's not in the protection history though
03:38:00FromDiscord<Elegantbeef> You should be↵(@creikey)
03:38:12FromDiscord<Elegantbeef> How do you install Nim anyway?
03:38:18FromDiscord<creikey> In reply to @Elegantbeef "How do you install": I don't even remember
03:38:18FromDiscord<spoon> In reply to @creikey "it's not in the": what antivirus dang
03:38:24FromDiscord<creikey> In reply to @spoon "what antivirus dang": the default windows one
03:38:29FromDiscord<spoon> anything compiled with nim is just cursed
03:38:29FromDiscord<creikey> https://media.discordapp.net/attachments/371759389889003532/963281927970914374/unknown.png
03:38:36FromDiscord<spoon> ah- windows defender
03:38:46FromDiscord<spoon> i got norton
03:38:55FromDiscord<creikey> norton is a virus
03:38:58FromDiscord<Elegantbeef> you should use choosenim to install Nim
03:39:01FromDiscord<creikey> In reply to @Elegantbeef "you should use choosenim": I do
03:39:02FromDiscord<Elegantbeef> Or gitnim
03:39:08FromDiscord<creikey> I thought you were asking how I installed choosenim
03:39:13FromDiscord<spoon> i love mining ethereum and paying 30% of my earnings to mr norton yum yum
03:39:15FromDiscord<Elegantbeef> How the fuck does.... it block it
03:39:21FromDiscord<creikey> `C:\Users\Cameron\Documents\Runnables\choosenim.exe`↵looks like I just downloade dit
03:39:27FromDiscord<creikey> In reply to @Elegantbeef "How the fuck does....": that was just a theory I no longer espouse
03:39:29FromDiscord<Rika> In reply to @spoon "i love mining ethereum": Was it 30 or 50?
03:39:29FromDiscord<creikey> it seems like it is not
03:39:30FromDiscord<spoon> In reply to @Elegantbeef "How the fuck does....": it'll delete files and say they were acting suspicious
03:39:30FromDiscord<creikey> blocking it
03:39:45FromDiscord<Elegantbeef> `choosenim remove 1.6.4`
03:39:51FromDiscord<Elegantbeef> `choosenim 1.6.4`
03:39:51FromDiscord<spoon> In reply to @Rika "Was it 30 or": 15%
03:40:05FromDiscord<xflywind> Can I test whether an ident has has custom pragmas?
03:40:14FromDiscord<xflywind> sent a code paste, see https://play.nim-lang.org/#ix=3UU5
03:40:28FromDiscord<xflywind> (edit) removed "has"
03:40:50FromDiscord<Elegantbeef> You have to get impl flywind
03:41:05FromDiscord<xflywind> getimpl returns nkNilLit
03:41:24FromDiscord<Elegantbeef> Wait what is `body`?
03:42:05FromDiscord<xflywind> (edit) "https://play.nim-lang.org/#ix=3UU5" => "https://play.nim-lang.org/#ix=3UU6"
03:42:06FromDiscord<xflywind> misspelled
03:42:54*SamuelMarks quit (Ping timeout: 250 seconds)
03:43:26FromDiscord<xflywind> nvm, it seems to work for this example
03:43:32FromDiscord<creikey> In reply to @Elegantbeef "`choosenim 1.6.4`": https://media.discordapp.net/attachments/371759389889003532/963283202800234536/unknown.png
03:43:40FromDiscord<creikey> is nim.exe supposed to be in nimble bin?
03:43:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UU7
03:44:05FromDiscord<Elegantbeef> Thanks flywind i need to add this api to micros 🙂
03:46:53FromDiscord<Rika> A “get pragma” API?
03:47:01FromDiscord<Elegantbeef> No a iterate pragma api
03:50:53FromDiscord<creikey> downloaded nim without choosenim https://media.discordapp.net/attachments/371759389889003532/963285049132843048/unknown.png
03:52:26FromDiscord<xflywind> sent a code paste, see https://paste.rs/Gj8
03:53:12FromDiscord<Elegantbeef> No you cannot get the pragma from a `var T`
03:53:24FromDiscord<Elegantbeef> make that a template
03:54:33FromDiscord<Rika> I’m thinking why not just use a generic object that encapsulates the variable instead no?
03:55:04FromDiscord<Elegantbeef> `hasCustomPragma` is less than useless
03:55:07FromDiscord<Elegantbeef> It almost never works
03:55:57FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Zg0
03:56:13FromDiscord<Elegantbeef> You cannot use procs if you want to ensure something was annotated with a pragma
03:56:35FromDiscord<xflywind> thank you, it works!
03:57:08FromDiscord<xflywind> The example needs to compile to JS, so it needs quite a lot of hack like this.
03:57:37FromDiscord<Rika> I’m guessing, you’re trying to make it compile into Svelte?
03:58:19FromDiscord<xflywind> I want to build a Svelte like frameworks based mutation tracking.
03:59:13FromDiscord<xflywind> With these macros, I can actually remove Ref or Reactive in vue3.
04:00:03FromDiscord<Rika> Oh nice
04:01:18FromDiscord<Elegantbeef> Now if only I could get micros to work more
04:01:19FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/963287673374658560/image.png
04:01:34FromDiscord<Elegantbeef> Much more readable if you ask me 😛
04:02:46FromDiscord<Elegantbeef> Ah forgot the `pragNode.kind` check
04:04:47*zeus-supreme1 joined #nim
04:06:09FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/963288889592807434/image.png
04:06:14FromDiscord<Elegantbeef> There we go i'm happy with it!
04:07:03FromDiscord<xflywind> Cool
04:07:31FromDiscord<Elegantbeef> Typesafe expressive api is much nicer than raw Nim macros
04:07:39*zeus-supreme quit (Ping timeout: 246 seconds)
04:09:23*SamuelMarks joined #nim
04:11:44FromDiscord<creikey> @ElegantBeef it only happens with --threads:on on windows
04:11:45FromDiscord<huantian> huh just realized you can use generics for object variant kinds
04:12:06FromDiscord<creikey> I didn't notice because it was in my nims config
04:13:03FromDiscord<huantian> can I make it fully type safe if I use overloadable dots?
04:14:16*SamuelMarks quit (Ping timeout: 248 seconds)
04:14:39FromDiscord<Elegantbeef> What do you mean↵(@huantian)
04:14:53FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=3UUh
04:15:59FromDiscord<Elegantbeef> You'd need `when`
04:16:23FromDiscord<Elegantbeef> also `static FunnyKind`
04:16:57FromDiscord<huantian> huh what does ommitting static do
04:17:18FromDiscord<Elegantbeef> Constraints it to `FunnyKind`
04:18:10FromDiscord<huantian> hm? wdym
04:18:41FromDiscord<Elegantbeef> makes it so `Kind` can only be `FunnyKind`
04:18:50FromDiscord<Elegantbeef> `Funny[FunnyKind]` is the only instantiation valid
04:20:09*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])
04:20:19FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/mGC
04:20:22FromDiscord<Elegantbeef> That's what you want
04:21:18FromDiscord<huantian> ah I see
04:22:31FromDiscord<huantian> properly
04:22:32FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=3UUj
04:22:53FromDiscord<Elegantbeef> What?
04:22:57*slowButPresent quit (Quit: leaving)
04:23:04FromDiscord<huantian> https://play.nim-lang.org/#ix=3UUi↵yeah
04:23:23FromDiscord<Elegantbeef> Ah i thought you meant mine
04:24:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UUk
04:24:51FromDiscord<Elegantbeef> I really like this api style i have an idea to use it for versioning
04:25:14FromDiscord<huantian> yeah it seems nicer since you have compile time safety for object variants
04:25:29FromDiscord<Elegantbeef> I mean they're not variants but yea
04:25:43FromDiscord<huantian> yeah "variants"
04:26:07FromDiscord<huantian> also nim playground really likes <https://play.nim-lang.org/#ix=t%20wr> this ix
04:26:19FromDiscord<Elegantbeef> yea i dont know
04:26:24FromDiscord<huantian> and the url is too similar to this error message in createIx↵https://github.com/PMunch/nim-playground/blob/819a58afcd7153196d64fdc6e638733ab9ee794d/src/nim_playground.nim#L139
04:26:34FromDiscord<huantian> `t wr` just happens to be part of `went wrong`
04:26:54FromDiscord<Elegantbeef> Fuck i forgot to backup my versioning code
04:27:45FromDiscord<Elegantbeef> Whew spamming it here got me a link that's live! https://play.nim-lang.org/#ix=3Tfi
04:28:14FromDiscord<huantian> In reply to @huantian "and the url is": I think this definitely is the error lmao that's hilarious
04:28:36FromDiscord<Elegantbeef> Same premise to your code idea but made for migrating data
04:29:09FromDiscord<huantian> oooh that's smart, I like that
04:31:03FromDiscord<huantian> much clearner than making completely seperate objects
04:31:26FromDiscord<huantian> or at least, associates the versions together and reduces some duplicate code
04:33:37FromDiscord<Elegantbeef> Yep
04:33:53FromDiscord<huantian> wish I could do this in other langs 😔
04:34:07FromDiscord<Elegantbeef> The big benefit is you can write procs that only work on the most recent data and as such require migration
04:34:30FromDiscord<Elegantbeef> so like you could do `proc saveData(data: MyData[Version.high])`
04:36:01FromDiscord<huantian> I have some atrocious migration code that I need to fix at some point
04:36:04FromDiscord<huantian> not today though!
04:36:23FromDiscord<Elegantbeef> Lol imagine if you had this in your tool bag!
04:37:00FromDiscord<huantian> more like imagine if the code was in Nim 😛
04:37:14FromDiscord<Elegantbeef> "had"
04:38:15FromDiscord<Elegantbeef> I assume it's C#
04:38:24*SamuelMarks joined #nim
04:39:26FromDiscord<huantian> mhm
04:40:15fallbackhi elegantbeef
04:40:21FromDiscord<Elegantbeef> Hello
04:40:26fallbacki got nim to build with ports
04:40:32fallbacki cheated :)
04:40:36FromDiscord<Elegantbeef> Nice!
04:41:04fallbacki remove /usr/ports/lang/nim and put version from 7.1 ports.tar.gz
04:41:11fallbackand it worked :))
04:41:22FromDiscord<Elegantbeef> Ah nice
04:41:29fallbackdon't tell any1 :)
04:41:43FromDiscord<Elegantbeef> I mean i will the next time some needs a freebsd build
04:41:46fallbackthat probably will explode on me later
04:41:51FromDiscord<Elegantbeef> A shame you didnt get it to work from source though
04:42:01fallbacknono
04:42:06fallbackthis is openbsd ports
04:42:24fallbacki use source and make install in /usr/ports/lang/nim
04:42:40FromDiscord<huantian> In reply to @huantian "I think this definitely": should the nim plaground backend return a `500` when it fails to upload to ix?
04:42:58fallbacki learn that openbsd ports is source and patches for making supported pkgs
04:43:24fallbackmost patches are to remove -O3 from config files
04:43:30NimEventerNew thread by Mardiyah: On final try-except to go back just as loop, see https://forum.nim-lang.org/t/9103
04:44:40*SamuelMarks quit (Ping timeout: 248 seconds)
04:45:13fallbackbut what i do is prob not very good openbsd best practice
04:46:29FromDiscord<huantian> https://github.com/huantianad/nim-playground/commit/a59bbc048c2bf07dc2f7944ad0f9560d2cac96cc↵did I do this correctly
04:46:42FromDiscord<Elegantbeef> Yea i dont know anything else to say though i dont have a uhh freebsd setup anywhere 😛
04:46:47FromDiscord<Elegantbeef> Anyway atleast you can write Nim now
04:46:57fallbackopenbsd not freebsd
04:47:16FromDiscord<Elegantbeef> Arent you on freebsd?
04:47:24fallbacki will learn freebsd in 1 or 2 years after i am better on openbsd
04:47:27fallbackno
04:47:37FromDiscord<Elegantbeef> I could've sworn you said free
04:47:40FromDiscord<Elegantbeef> Guess i'm crazy
04:48:01fallbackOpenBSD fallback 7.0 GENERIC#6 amd64
04:48:06FromDiscord<Elegantbeef> Seems fine to me huan, but i'm not pmunch
04:48:06fallbacknope :)
04:48:39fallbacknow i build nitter and try to get working on openbsd
04:49:37FromDiscord<huantian> I forgot to change the return signature lemme make a quick git amend
04:49:53*rockcavera quit (Remote host closed the connection)
04:59:08FromDiscord<huantian> oh yeah gonna bounce this to you beef, <https://github.com/nim-lang/Nim/pull/19622#discussion_r846608175>↵I don't think there's any good way to get the error message show up for the entire await statement, at elast not easily
05:00:22FromDiscord<Elegantbeef> My RFC is it
05:00:45FromDiscord<Elegantbeef> There is no way to do it easily in the compiler presently, trust me i looked
05:01:20FromDiscord<huantian> One day 🤞
05:03:08FromDiscord<Elegantbeef> Only if it's accepted 😛
05:11:40*SamuelMarks joined #nim
05:18:39*xet7 joined #nim
05:28:51*SamuelMarks quit (Ping timeout: 246 seconds)
05:29:05FromDiscord<!Patitotective> gn https://media.discordapp.net/attachments/371759389889003532/963309759191187528/unknown.png
05:29:07FromDiscord<!Patitotective> 🌃
05:38:47FromDiscord<aph> gn!
05:42:32*SamuelMarks joined #nim
05:47:16*SamuelMarks quit (Ping timeout: 250 seconds)
06:01:27*SamuelMarks joined #nim
06:05:54*SamuelMarks quit (Ping timeout: 250 seconds)
06:17:52FromDiscord<morgan> ok so i’m thinking about my library while about to go to bed, is there a way to have a generic proc that can be one of a specific list of types and have a switch based on what type it is? i’m guessing no to the second one
06:18:07FromDiscord<Elegantbeef> Yes
06:18:22FromDiscord<morgan> to one or both?
06:18:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UUz
06:18:39FromDiscord<Elegantbeef> Like i showed you previously
06:18:48FromDiscord<morgan> ah i see i see
06:19:14FromDiscord<morgan> i’ll do that tomorrow
06:19:16FromDiscord<morgan> thanks
06:57:16*PMunch joined #nim
06:58:34FromDiscord<tomck> Hello↵Been a while since i used nim, since around 1.5↵what's new? are views stable yet..? 🤞
06:58:47FromDiscord<Elegantbeef> Nope
06:59:36*ltriant quit (Ping timeout: 248 seconds)
06:59:50*ltriant joined #nim
07:00:03PMunchViews? This stuff? https://nim-lang.org/docs/manual_experimental.html#view-types
07:00:19FromDiscord<Elegantbeef> Yes
07:00:55FromDiscord<tomck> Yes, last time i used nim they were pretty broken, so i ended up passing around a ptr + len like in c all the time
07:01:13FromDiscord<Elegantbeef> You know `toOpenArray` exists?
07:02:40FromDiscord<tomck> Yeah but you can't bind open arrays to variables
07:05:31FromDiscord<Elegantbeef> Sure but you said passing 😛
07:05:52FromDiscord<Elegantbeef> 1.6 only really added features to make writing things a bit better
07:26:10*kenran joined #nim
07:39:47*xet7 quit (Ping timeout: 272 seconds)
07:42:03*xet7 joined #nim
07:49:33FromDiscord<hmmm> hallo broskis, stupid question of the day, can I define a proc inside another proc and call from outside of both? 🤔
07:50:22PMunchSure
07:50:28FromDiscord<Elegantbeef> No, but yes. Doesnt make any sense why you want it
07:50:34PMunchAs long as you pass it out of the proc
07:51:00FromDiscord<Elegantbeef> Well pmunch there are also hacks you can do
07:51:04FromDiscord<Elegantbeef> But we dont condone those
07:51:04FromDiscord<hmmm> uh? muchie what do you mean with pass it?
07:51:15FromDiscord<Elegantbeef> return the proc
07:51:57FromDiscord<hmmm> oh shi I never returned a proc, you can return procs? this is so cool,
07:52:09PMunchOf course you can :)
07:53:29PMunchSomething like this: http://ix.io/3UVc
08:03:31FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=3UVg
08:03:53FromDiscord<Elegantbeef> You dont need a name
08:04:02FromDiscord<Elegantbeef> it's a returrned value you do not need to give it a name
08:04:09FromDiscord<hmmm> hmm
08:04:18FromDiscord<Elegantbeef> that is a procedure which returns a `proc(nm:float): float`
08:04:50FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UVh
08:05:05FromDiscord<Elegantbeef> `Rest[AnotherType]`
08:05:18FromDiscord<Elegantbeef> the `: Type` is only for MCS
08:05:23FromDiscord<Elegantbeef> Method call syntax
08:06:03FromDiscord<jmgomez> ohh I thought I tried it, thanks
08:07:39FromDiscord<jmgomez> can the type be sum? or can I somehow override it to make a custom implementation?
08:13:30*jjido joined #nim
08:24:26FromDiscord<hmmm> hmm what does {.gcsafe.} do
08:25:34PMunch@hmmm, it's supposed to be used like this: https://play.nim-lang.org/#ix=3UVs
08:29:46*jmdaemon quit (Ping timeout: 250 seconds)
08:32:43*wyrd quit (Remote host closed the connection)
08:33:00*wyrd joined #nim
08:35:44FromDiscord<Elegantbeef> jsonutils↵(@jmgomez)
08:40:49PMunch@hmmm, gcsafe is a bit tricky to explain. Where did you encounter it?
08:41:24FromDiscord<Elegantbeef> Cmon pmunch it just means the code does not access any global heap allocated data
08:41:33FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#effect-system-gc-safety-effect
08:41:55FromDiscord<hmmm> I'm looking at a threading snippet of code and much of it makes sense, except what gcsafe is and why they use it
08:42:11FromDiscord<Elegantbeef> They use it cause it implies thread safe
08:43:24FromDiscord<hmmm> hmm
08:43:39FromDiscord<hmmm> so it's a limit of what vars threads can read?
08:44:08FromDiscord<Elegantbeef> Yes so you reduce gc issues with threading
08:44:17FromDiscord<hmmm> I see
08:44:57PMunch@Elegantbeef, well it can also mean "this block of code is gcsafe, don't worry about it"
08:45:16FromDiscord<Elegantbeef> Only inside a cast block
08:45:25PMunchAh, that's true
08:45:28FromDiscord<Elegantbeef> Actually never mind the annotation skips checking
08:45:33PMunchIs that a recent change?
08:45:37FromDiscord<Elegantbeef> it's not like `noSIdeEffect`
08:45:38FromDiscord<Elegantbeef> Nah
08:45:55FromDiscord<Elegantbeef> It's like that since the begining
08:47:19FromDiscord<TryAngle> Do channels also deep copy in arc?
08:48:08FromDiscord<Elegantbeef> I think they presently do i might be wrong
08:51:48*SamuelMarks joined #nim
08:52:08FromDiscord<Elegantbeef> I think to solution to this is `isolated` and is coming soon
08:56:38*SamuelMarks quit (Ping timeout: 250 seconds)
08:57:47PMunchIt will probably look like this: https://github.com/nim-lang/threading
08:58:16FromDiscord<TryAngle> In reply to @PMunch "It will probably look": Thanks 😊
08:58:28FromDiscord<TryAngle> In reply to @Elegantbeef "I think to solution": What is that?
08:59:19FromDiscord<Elegantbeef> I think it's ref counted data that can be moved across threads
09:00:25PMunchYeah, as far as I know it's a type that won't be collected when it is isolated, this means that it can be safely moved to another thread and out of scope, then it's taken out of isolation again on the other side which means that it can be collected
09:00:33PMunchOr something like that
09:01:07FromDiscord<Tanguy> gcsafe doesn't skip checking
09:01:47FromDiscord<Elegantbeef> It does to
09:02:34FromDiscord<Tanguy> Oh right, I had a bad test
09:02:41FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3UVJ
09:03:14FromDiscord<Tanguy> It does a warning though
09:03:53FromDiscord<Elegantbeef> Indeed
09:04:07FromDiscord<Elegantbeef> I still say it should behave like `noSideEffect`
09:04:19FromDiscord<Elegantbeef> Where annotation means you want to ensure it's gcsafe and need to `cast` it safe
09:04:22FromDiscord<Elegantbeef> But ymmv
09:07:07FromDiscord<Tanguy> I agree, and that was my understanding based on what araq said here: https://github.com/status-im/nim-chronos/pull/241/files#diff-c1e1958e958f530246209b2176ae811a267b4c8d9ee8ffeac0fadf4a6abab460R291-R292
09:07:27FromDiscord<Tanguy> So I'm really surprised
09:11:59FromDiscord<Elegantbeef> TIL you're a status dev 😛
09:12:19FromDiscord<jmgomez> Saw that there is concepts as experimental feature. They seem to be like the cpp ones, is that correct? Also, they seem to be in experimental for a few years. Are they safe to use?
09:12:37FromDiscord<Rika> Safe? Maybe not very
09:12:47FromDiscord<Elegantbeef> I'd say so
09:12:54FromDiscord<Elegantbeef> Yes they're like the C++ ones
09:12:55FromDiscord<Rika> Usable? Only the second version, which isn’t well documented yet
09:13:05FromDiscord<Elegantbeef> Uhh
09:13:20FromDiscord<Elegantbeef> The fuck are you people doing to your concepts
09:13:27FromDiscord<Elegantbeef> I've heard nothing but "They're unusable" meanwhile i frolic with them
09:14:56FromDiscord<jmgomez> cool, will give them a go. I just like to use them to encode simple monodic stuff
09:15:17FromDiscord<jmgomez> (bind, lyft, fmap etc.) nothing fancy
09:15:25FromDiscord<jmgomez> (edit) "fmap" => "map"
09:15:35FromDiscord<Rika> Because you’re willing to work around the bugs which you also already know
09:16:11FromDiscord<jmgomez> bugs like ones, could you explain @Rika ?
09:16:41*xet7 quit (Ping timeout: 272 seconds)
09:17:08FromDiscord<Rika> Well, historically concepts (version 1) had many issues
09:17:52FromDiscord<ElegantBeef> Does this make the bridge live again
09:18:01FromDiscord<ElegantBeef> Nope so we'll get spam in a bit
09:18:13FromDiscord<Rika> I do not know anything about version 2
09:18:53FromDiscord<ElegantBeef> I think the first are better than the second due to allowing flexibillity
09:19:02FromDiscord<ElegantBeef> But yea the second are cleaner and more understandable
09:19:32FromDiscord<ElegantBeef> The second variation is a trait like declaration
09:19:55FromDiscord<Elegantbeef> The new ones are only really usable for trait like programming
09:19:55FromDiscord<Elegantbeef> So it's not ideal
09:19:56FromDiscord<ElegantBeef> sent a code paste, see https://paste.rs/WCN
09:19:57FromDiscord<Elegantbeef> Damn matrix bridge
09:20:03FromDiscord<Elegantbeef> Really not having it
09:22:02FromDiscord<jmgomez> what limitation do they have? with trait like you mean like rust/haskell?
09:22:14FromDiscord<ElegantBeef> I just showed them
09:22:19FromDiscord<ElegantBeef> That syntax is the only allowed syntax
09:22:36FromDiscord<jmgomez> and before you could specify vars?
09:22:36FromDiscord<ElegantBeef> Yes i mean like Rust traits where you explicitly state procedures using a proc def
09:22:39FromDiscord<Rika> My qualms with the second is really just the limitations though
09:22:41FromDiscord<ElegantBeef> Yes
09:22:48FromDiscord<ElegantBeef> That's my issue to mostly
09:22:52FromDiscord<ElegantBeef> The first composes so much better
09:23:55FromDiscord<jmgomez> ok, doesnt look that bad to me but maybe it's just because I just found out that nim had them lol
09:24:08FromDiscord<ElegantBeef> Well i did use them for my trait system
09:24:53FromDiscord<ElegantBeef> The first are generally more capable so if you need anything other than "This type implements these procedures" you'll want the first
09:26:41FromDiscord<jmgomez> I see
09:28:23*xet7 joined #nim
09:32:47*xet7 quit (Ping timeout: 240 seconds)
09:39:52*xet7 joined #nim
09:46:28*xet7 quit (Read error: Connection reset by peer)
10:18:10*xet7 joined #nim
10:27:05FromDiscord<hmmm> sent a code paste, see https://paste.rs/qNJ
10:27:07FromDiscord<hmmm> I got hit by the unsafeness of my ways
10:27:40FromDiscord<hmmm> so, ok I can pass the vars I need to the thread proc, but can I also, idk import another module and use the vars that are there?
10:33:47*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
10:35:03*zeus-supreme joined #nim
10:36:10PMunch@hmmm, global variables?
10:37:26FromDiscord<hmmm> yea
10:37:47*zeus-supreme1 quit (Ping timeout: 240 seconds)
10:41:31*SamuelMarks joined #nim
10:46:37*SamuelMarks quit (Ping timeout: 256 seconds)
11:01:55*xet7 quit (Ping timeout: 256 seconds)
11:02:32FromDiscord<hmmm> hmm pretty interesting, if I call the threadTest proc from inside main() I will get "Error: internal error: inconsistent environment type", but if I put it outside in the global space it compiles correctly
11:13:59*xet7 joined #nim
11:16:16*kenran quit (Quit: WeeChat info:version)
11:35:48FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UW8
11:38:32PMunchOne concept can call `x is ParentConcept` at least, which should work
11:43:55FromDiscord<TryAngle> I think I already asked this a year ago but has there been a discussion on limiting procs / functions on only the concepts functionality?
11:44:04FromDiscord<TryAngle> (edit) "I think I already asked this a ... year" added "half a "
11:45:16FromDiscord<TryAngle> because it's a bit sussy when I use the same proc for two things of that fullfill the concept but I do something in the proc that neither of those things have
11:45:32FromDiscord<TryAngle> (edit) "because it's a bit sussy when I use the same proc for two things of that fullfill the concept but I do something in the proc that ... neither" added "only one"
11:46:00FromDiscord<TryAngle> (edit) "because it's a bit sussy when I use the same proc for two things of that fullfill the concept but I do something in the proc that only one ... neither" added "or"
11:46:12FromDiscord<jmgomez> In reply to @PMunch "One concept can call": how is it expressed in the example above?
11:46:54*kenran joined #nim
11:47:38PMunchWhat example?
11:47:58FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UWf
11:48:24FromDiscord<TryAngle> In reply to @jmgomez "how is it expressed": https://nim-lang.org/docs/manual_experimental.html#concepts↵the old ones support it like this↵I don't think the new ones support that yet 🤔
11:48:35PMunchHmm, replies don't really work over the IRC bridge..
11:48:58FromDiscord<TryAngle> sent a code paste, see https://paste.rs/BLs
11:49:10FromDiscord<jmgomez> sent a code paste, see https://paste.rs/rqm
11:49:27FromDiscord<jmgomez> how do you express it so MyConceptB has doThing too
11:50:50PMunchLike this? https://play.nim-lang.org/#ix=3UWg
11:51:45PMunchOr something like that, haven't used concepts in ages
11:51:50FromDiscord<jmgomez> beautiful
11:51:50FromDiscord<TryAngle> lol the new ones do?
11:51:52FromDiscord<jmgomez> thanks
12:01:25*SamuelMarks joined #nim
12:05:47*SamuelMarks quit (Ping timeout: 240 seconds)
12:07:31*SamuelMarks joined #nim
12:08:17FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UWs
12:13:42FromDiscord<abdu> sent a code paste, see https://paste.rs/BFr
12:14:15FromDiscord<abdu> (edit) "https://play.nim-lang.org/#ix=3UWv" => "https://paste.rs/RMo"
12:20:20PMunch@abdu, I don't think you can do that with templates
12:22:10FromDiscord<demotomohiro> In reply to @abdu "How to insert multi": Is this what you want to do?↵https://internet-of-tomohiro.netlify.app/nim/faq.en.html#template-how-to-pass-multiple-code-blocks-to-a-templateqmark
12:23:33PMunch@jmgomez https://play.nim-lang.org/#ix=3UWA
12:23:50PMunchNot sure if what you're doing is some kind of new concept syntax, but that should work
12:25:08PMunch(Note I also fixed some style issues that made your code quite hard to read..)
12:26:46FromDiscord<jmgomez> will test that out! That's pretty exciting if it works
12:27:47FromDiscord<jmgomez> (I edited the code later on with another approach)
12:30:41FromDiscord<demotomohiro> In reply to @jmgomez "Should not all of": https://play.nim-lang.org/#ix=3UX1↵This also compiles.
12:30:50FromDiscord<jmgomez> sent a code paste, see https://paste.rs/Kig
12:32:44PMunch@demotomohiro, I could've sworn I tried that while testing and just got an error..
12:34:14FromDiscord<demotomohiro> In reply to @jmgomez "it does compile but": Your code concatenating seqs with `+` that cause infinite recursive call.
12:36:40FromDiscord<jmgomez> Oh I missed that, it's a bit confused to me to use & to concatenate.
12:36:51FromDiscord<jmgomez> In reply to @demotomohiro "https://play.nim-lang.org/#ix=3UX1 This also compil": love this syntax more, thanks!!
12:42:25FromDiscord<ITR> Is there some argument for optimizing compile-time nim code before running it? When I use memoize runtime it's blazingly fast, but when I essentially do the same thing with manually using tables and run it compile-time, it's kinda slow (and hits maxLoopIterations)
12:44:15FromDiscord<ITR> oh, interesting, I set up maxLoopIterations by a lot and it's faster now. Still not as fast as runtime memoize, but faster
12:44:21FromDiscord<ITR> (edit) "oh, interesting, I set up maxLoopIterations by a lot and it's faster now. Still not as fast as runtime memoize, but faster ... " added "than compile time cache"
12:44:30FromDiscord<ITR> (edit) "memoize, but faster than compile time cache" => "memoize though"
12:51:57PMunch@ITR, not quite sure what you're comparing here, but it's known that the VM is a lot slower than compiled code (obviously)
12:56:09FromDiscord<demotomohiro> In reply to @jmgomez "Oh I missed that,": If `x` and `y` are int, float, vector, matrix or etc, `x` + `y` == `y` + `x`.↵But if `x` and `y` are string, seq or array, `x` + `y` and `y` + `x` can be different value.↵I don't know that is why Nim use `&` to concatenate.
12:58:37*xet7 quit (Quit: Leaving)
13:01:23FromDiscord<demotomohiro> In reply to @ITR "Is there some argument": Maybe, you can run your code with `staticExec` at compile time to speed up compile-time Nim code.
13:07:28FromDiscord<ITR> In reply to @PMunch "@ITR, not quite sure": o, it uses a vm for that? I guess that makes sense
13:09:39*rockcavera joined #nim
13:09:39*rockcavera quit (Changing host)
13:09:39*rockcavera joined #nim
13:09:47PMunch@ITR, yes everything that's executed on compile-time is run by a VM
13:49:47*nrds quit (Remote host closed the connection)
13:50:21*nrds joined #nim
13:51:18*arkurious joined #nim
13:54:33*PMunch quit (Quit: Leaving)
13:58:09perrowar sucks
13:58:35perrooops
13:58:41perroit's true, but wrong chan
13:59:09FromDiscord<jmgomez> what's the best way to represent in nim a pack of related const or static values i.e. a list of urls
13:59:35FromDiscord<jmgomez> i.e. in other langs you usually uses a static class for for that
14:00:41FromDiscord<jmgomez> maybe const inside a module? can modules work without being in a file?
14:10:55nrds<Prestige99> Not sure what you mean by your last question, but I'd just have a file with exported consts
14:18:18FromDiscord<jmgomez> okay! that will work I think
14:31:07*SamuelMarks quit (Ping timeout: 240 seconds)
14:33:34*jjido joined #nim
14:35:55*Gustavo6046 joined #nim
14:43:57FromDiscord<!Patitotective> is there an equivalent to cpp static keyword?↵ive read that if you define a static variable inside a function, it persists across calls, so it's essentially like a global variable declared inside a procedure
14:44:08FromDiscord<!Patitotective> (edit) "is there an equivalent to cpp static keyword?↵ive read that if you define a static variable inside a function, it persists across calls, so it's essentially like a global variable declared inside a procedure ... " added "🙃"
14:44:37FromDiscord<Recruit_main707> Maybe with a template you can do something like that
14:45:16FromDiscord<huantian> Are you talking about the global pragma
14:45:36FromDiscord<Recruit_main707> That would work too now that I remember it
14:47:01FromDiscord<Yardanico> yes it will, but global pragma is half broken with ARC and generally considered kind of deprecated
14:49:23FromDiscord<!Patitotective> it works with the global pragma 🙃
14:49:26FromDiscord<!Patitotective> (edit) "🙃" => ":D"
14:50:11FromDiscord<Yardanico> In reply to @Patitotective "it works with the": yes, but it's better to rework the code
14:50:14FromDiscord<Yardanico> you can just use a global variable
14:50:17FromDiscord<Yardanico> it's essentially the same
14:51:54FromDiscord<kevin> Is it possible to use Windows native TLS implementation with Nim `-d:ssl` network sockets?
14:52:09FromDiscord<Yardanico> no
14:52:12FromDiscord<kevin> boo
14:52:26FromDiscord<kevin> openssl sucks
14:52:37FromDiscord<Yardanico> https://github.com/treeform/puppy uses native tls implementation on windows i think, but it's more limited than httpclient
14:52:46FromDiscord<Yardanico> In reply to @kevin "openssl sucks": 🤷
14:52:57FromDiscord<kevin> we need a Nim native SSL library
14:53:12FromDiscord<Yardanico> make one and then spent 5 years fixing security vulnerabilities ;)
14:53:17FromDiscord<Yardanico> (edit) "spent" => "spend"
14:53:22FromDiscord<kevin> 😩
14:53:24FromDiscord<kevin> no
14:54:11FromDiscord<Yardanico> also what's your issue with openssl? there are things like libressl and similar so you can statically link SSL into your binary
14:55:29FromDiscord<kevin> I thought you needed to use openssl specifically for `std/net` sockets and `std/httpclient` web requests
14:55:56FromDiscord<Yardanico> if you want ssl, then yes
14:56:02FromDiscord<Yardanico> but there are some openssl compatible libs
14:56:03FromDiscord<Yardanico> like libressl
14:56:16FromDiscord<kevin> is it possible to substitute openssl for libressl with Nim's sockets/webclients?
14:56:31FromDiscord<Yardanico> of course, because libressl is largely openssl compatible
14:57:25*SamuelMarks joined #nim
14:57:35FromDiscord<kevin> hmm, okay. how do you do that? Is there some define flags in the `net` or `httpclient` code that allows me to change the SSL library it uses for `-d:ssl` stuff?
14:58:00FromDiscord<Yardanico> nim itself will work fine if you don't have openssl but have libressl dynlib, but if you want to statically link you'll have to pass -d:libressl
14:58:39FromDiscord<kevin> is that define instead of or additionally to `-d:ssl`
14:58:45FromDiscord<Yardanico> additionally
14:59:21FromDiscord<kevin> Ok, thank you @Yardanico for the help
14:59:35FromDiscord<kevin> Haven't thought of using libressl before
14:59:40FromDiscord<kevin> I'll give that a try 🙂
14:59:50FromDiscord<Yardanico> but again, what was your problem with openssl?
15:00:34FromDiscord<kevin> uhh, I guess it's really big and i don't wanna bundle a dll with my software
15:00:48FromDiscord<huantian> You’re gonna have to bundle libressl instead
15:00:59FromDiscord<kevin> probably statically link it i guess?
15:01:02FromDiscord<Yardanico> yeah, even if you statically compile libressl it'll add like ~0.5-1.5mb, I don't remember now
15:01:08FromDiscord<Yardanico> In reply to @kevin "probably statically link it": it'll still add to the file size
15:01:13FromDiscord<kevin> for sure
15:01:16FromDiscord<Yardanico> and you can statically link openssl too btw
15:01:22FromDiscord<kevin> openssl is like 7 MB or something i thought
15:01:50FromDiscord<kevin> idk it's really big
15:02:03FromDiscord<kevin> i''d ideally just like to use whatever is installed on the system
15:03:07*SamuelMarks quit (Ping timeout: 272 seconds)
15:03:37*Gustavo6046 quit (Read error: Connection reset by peer)
15:05:39*kenran quit (Quit: WeeChat info:version)
15:06:06FromDiscord<kevin> e.g.: Windows schannel or linux built in which is usually openssl
15:06:22*Gustavo6046 joined #nim
15:06:35FromDiscord<kevin> mostly trying to figure out my options i guess
15:07:57*slowButPresent joined #nim
15:23:00*Fareloch joined #nim
15:23:47*Fareloch quit (Client Quit)
15:39:03FromDiscord<Catarino> In reply to @Elegantbeef "There is https://github.com/arnetheduck/nbindgen fo": Cool! But it would be interesting if it was part of the upstream project.↵Now it is in wip cbindgen may have zig support.
15:52:32*kenran joined #nim
15:59:08*SamuelMarks joined #nim
16:02:35*kenran quit (Quit: WeeChat info:version)
16:03:52*kenran joined #nim
16:04:29*kenran quit (Client Quit)
16:21:56FromDiscord<jmgomez> Is there a pragma or something to make all fields public by default?
16:27:28FromDiscord<!Patitotective> +
16:32:57*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
16:33:02*vicfred quit (Quit: Leaving)
16:38:02FromDiscord<!Patitotective> is there a way i could get the parameters of a procedure as a tuple?
16:38:45FromDiscord<ynfle> In reply to @Patitotective "is there a way": In a macro?
16:40:09FromDiscord<!Patitotective> In reply to @ynfle "In a macro?": yes
16:40:11FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYp
16:40:29FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3UYp" => "https://play.nim-lang.org/#ix=3UYq"
16:41:31FromDiscord<ynfle> It's possible
16:42:59FromDiscord<ynfle> See https://nim-lang.org/docs/macros.html#params%2CNimNode
16:48:06*Gustavo6046 quit (Ping timeout: 250 seconds)
16:57:14*averell joined #nim
17:04:28FromDiscord<!Patitotective> how should i `postfix`? https://nim-lang.org/docs/macros.html#postfix%2CNimNode%2Cstring↵if i want to do something like `hello`, should i `i"hello".postfix("")`?
17:05:19*zeus-supreme1 joined #nim
17:07:10*SamuelMarks quit (Ping timeout: 250 seconds)
17:07:39*zeus-supreme quit (Read error: Connection reset by peer)
17:12:06FromDiscord<ynfle> In reply to @Patitotective "how should i `postfix`?": Ya
17:15:14*SamuelMarks joined #nim
17:19:53*SamuelMarks quit (Ping timeout: 256 seconds)
17:20:33FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYE
17:22:25FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3UYE" => "https://play.nim-lang.org/#ix=3UYF"
17:23:50FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYG
17:23:57FromDiscord<!Patitotective> https://play.nim-lang.org/#ix=3UYH
17:24:02FromDiscord<Rika> Macro
17:24:07FromDiscord<Rika> Try it within a macro
17:24:45FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYI
17:24:53FromDiscord<!Patitotective> 😕
17:26:43FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3UYJ
17:27:02FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3UYK
17:27:20*rockcavera quit (Remote host closed the connection)
17:27:22FromDiscord<!Patitotective> how?
17:29:03FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYM
17:29:58FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3UYN
17:30:09FromDiscord<Rika> You don’t need to get the parameters here
17:30:58FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYO
17:31:15FromDiscord<!Patitotective> In reply to @Rika "You don’t need to": then?
17:31:43FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3UYO" => "https://play.nim-lang.org/#ix=3UYP"
17:31:53FromDiscord<Rika> just wait
17:32:56FromDiscord<ynfle> Is that the only version you need? Why do you need to generate the template then?
17:33:26FromDiscord<Rika> its safe to assume it isnt the only one
17:33:34FromDiscord<ynfle> So what's the variation?
17:33:45FromDiscord<ynfle> The params for begin?
17:34:05FromDiscord<!Patitotective> yea, there are a lot of begin like functions with different names and params
17:34:46FromDiscord<ynfle> So you want to generate the params of the template based on the params of the first function?
17:35:03FromDiscord<!Patitotective> yes...
17:35:11FromDiscord<!Patitotective> (edit) "yes..." => "yes"
17:35:40FromDiscord<Rika> okay since you still take in a body i think you do need to figure out the params
17:36:18FromDiscord<jmgomez> how do you express the common fields in a sum type?
17:36:33FromDiscord<ynfle> In reply to @jmgomez "how do you express": You mean an object variant
17:37:02FromDiscord<!Patitotective> In reply to @Rika "okay since you still": yea but i still need the echoParams thing working
17:37:04FromDiscord<Rika> all fields in each branch of an object variant must have differing names
17:37:04FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3UYR
17:37:07FromDiscord<ynfle> In reply to @Patitotective "yea, there are a": So is the igBegin overloaded or are there different names
17:37:33FromDiscord<ynfle> In reply to @jmgomez "yeh, like what I": Just put them before the case statment
17:37:34FromDiscord<!Patitotective> different names, so i only have to call the macro multiple times with different names
17:37:43FromDiscord<ynfle> In reply to @Patitotective "different names, so i": Ok
17:37:46FromDiscord<ynfle> Give me a second
17:38:30FromDiscord<Rika> im thinking that you could just use proxy objects here, set the destructor to call igEnd or whatever
17:38:37FromDiscord<Rika> raii style
17:38:54FromDiscord<!Patitotective> proxy? 🤨
17:39:28FromDiscord<Rika> empty objects
17:51:27FromDiscord<Rika> also macros making macros/templates are kinda finicky from what i hear
17:52:08*jjido joined #nim
17:58:01*xet7 joined #nim
17:58:16FromDiscord<!Patitotective> how would i do proxy objects stuff? do i need to create a window object and a destroy procedure?
17:58:28FromDiscord<!Patitotective> if so, id need a create procedure too
18:01:27*SamuelMarks joined #nim
18:05:06FromDiscord<!Patitotective> also i dont see how i would make it work like the other `igWindow: body` @Rika
18:05:52FromDiscord<Rika> i forgot. you have overloads, i dont think you're gonna get this working
18:05:56FromDiscord<Rika> i mean
18:05:58FromDiscord<Rika> the macro
18:06:07FromDiscord<Rika> the proxy objects are doable but still kinda manual
18:06:48FromDiscord<Rika> im not sure how to get all overloads of a function, and i'm not really willing to figure it out
18:11:25FromDiscord<ynfle> @!Patitotective https://play.nim-lang.org/#ix=3UYW
18:11:36FromDiscord<ynfle> This won't work if the symbol (proc name) is overloaded
18:11:51FromDiscord<ynfle> That's a whole separate beast
18:12:04FromDiscord<!Patitotective> its not overloaded
18:12:09FromDiscord<!Patitotective> thanks
18:12:12FromDiscord<!Patitotective> 🤩
18:15:52FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3UYX
18:20:43FromDiscord<!Patitotective> oh, i think it's for passing the params to the actual beginproc
18:21:08FromDiscord<Rika> Yeah I had the same implementation
18:21:14FromDiscord<Rika> That’s why I said it wouldn’t work with overloads
18:23:27*jmdaemon joined #nim
18:28:01FromDiscord<!Patitotective> now, there's a problem if i dont pass all the parameters 😕 ↵cause (for example here https://play.nim-lang.org/#ix=3UZ1) it takes the body as the optional param
18:29:00FromDiscord<jmgomez> is there a way to force a type to be one of the variant of a variant type?
18:31:56*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
18:37:24*PMunch joined #nim
18:37:40FromDiscord<Rika> Not statically of course
18:46:20FromDiscord<Tanguy> static: assert X is Y
18:47:09FromDiscord<Rika> I don’t recall variant types having a discrimination on compile time usually?
18:47:31FromDiscord<Rika> If the parameter is static then sure, but it’s not very often
18:48:11PMunchHmm, why don't we see static case parameters more actually?
18:48:37FromDiscord<Rika> Those can be useful yes
18:48:46PMunchIt's already an error to change the case parameter for an existing object, so why not just do it all static?
18:49:11PMunchWell I guess it might make the type an implicit generic and generate a lot more code..
18:49:13FromDiscord<Rika> Because you want to pass the value on runtime
18:49:29PMunchOh right, of course :P
18:49:33FromDiscord<Rika> Lol
18:51:31PMunchHmm, I don't appear to be able to make a static one: https://play.nim-lang.org/#ix=3UZ9
18:56:55FromDiscord<Michal Maršálek> sent a code paste, see https://play.nim-lang.org/#ix=3UZb
18:57:26FromDiscord<Rika> In what way?
18:57:48FromDiscord<SirOlaf> sent a code paste, see https://play.nim-lang.org/#ix=3UZc
18:57:53FromDiscord<SirOlaf> But works on refc
18:58:13FromDiscord<Michal Maršálek> In reply to @Rika "In what way?": the second one gives `wrong number of variables`
18:58:21FromDiscord<Rika> Ah
18:58:28FromDiscord<Rika> Because split is an iterator
18:58:35FromDiscord<Michal Maršálek> ah I see
18:58:42FromDiscord<Rika> And the sequence version uses the pairs iterator
18:58:55FromDiscord<Michal Maršálek> yeah, got it thanks 🙂
18:59:00*yoyojambo joined #nim
18:59:26FromDiscord<SirOlaf> In reply to @SirOlaf "I am back with": Or rather why does it try to use prepareMutation in the vm
18:59:50FromDiscord<SirOlaf> Failing miserably at it
19:00:45*jjido joined #nim
19:01:06FromDiscord<SirOlaf> I am in need of Beef, his pr probably broke it
19:01:06FromDiscord<jmgomez> I mean more in the definition, like variable : variantN
19:01:33FromDiscord<Rika> In reply to @jmgomez "I mean more in": No
19:01:42FromDiscord<Rika> As I’ve said, statically isn’t really possible
19:02:03FromDiscord<Rika> You have to check on runtime with whatever, if statement or assert or similar
19:02:23FromDiscord<jmgomez> oki, thanks
19:06:39*yiggityswaps joined #nim
19:09:45*yoyojambo quit (Ping timeout: 248 seconds)
19:30:47PMunchAnyone else feel like splitLines should really drop the last empty line when the file ends in a newline?
19:31:06PMunchHaving to do `.splitLines[0..^2]` gets old real fast
19:31:32nrds<Prestige99> hmm I could see reasoning both ways
19:31:54nrds<Prestige99> but yeah if it's only a newline at the very end, it makes sense to discard it
19:32:02PMunchExactly
19:32:21PMunchI get a bunch of strings with actual data, then an empty one at the end
19:34:06FromDiscord<Rika> I think there should be a parameter to turn that on and off sure
19:39:51*xet7 quit (Remote host closed the connection)
20:37:13*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:49:02*SamuelMarks quit (Ping timeout: 250 seconds)
20:55:30FromDiscord<hmmm> oh I had to deal with it too, so I vote yes to the pmunchie-rika proposition, since we are all for it I gather it's passed? 🧐
20:59:47PMunchSure go ahead and PR it
21:00:39FromDiscord<Rika> Thanks in advance hmm for doing the PR :))
21:02:38FromDiscord<hmmm> haha I cannot in good conscience do a PR for it when two esteemed experienced pro nimmers can do it in my place 😄
21:03:28FromDiscord<hmmm> but I will be on the sidelines with a "looks good" comment 4 sure 🧐
21:10:54PMunchThink of it this way, if you do this kind of low hanging fruit we're free to do bigger cooler things ;)
21:18:03FromDiscord<Rika> If you don’t know, I have never made a PR to Nim
21:19:55FromDiscord<hmmm> I actually plan to free some time to do this but I think I want start with some documentation. As a fat nim newbie it's a part dear to me
21:24:21*kenran joined #nim
21:34:02FromDiscord<Zoom> Well, if there is an empty line in the file, it would be strange to silently drop it↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
21:34:16PMunch@Zoom, not in the file
21:34:33PMunchBut most files end with a trailing newline, in fact most editors add them automatically when you save the file
21:35:09PMunchIf the file ends with a single newline character and nothing else, then I feel like this should be dropped
21:35:24FromDiscord<Zoom> I know. They add it and it's there, isn't it?
21:35:45PMunchIf I open it in my editor it shows line numbers all the way up to the last line, but not for the one created by the empty newline
21:36:06PMunchIt is, but `splitLine` should split lines, and there isn't a line at the end, it's just a trailing newline
21:39:20FromDiscord<Zoom> I think `\nEOF` counts as an empty line. Otherwise if your program relies on not only reading lines but keeping track of them, it will be off.
21:40:13FromDiscord<Elegantbeef> Using split lines and slices, jeez pmunch buh bye speed 😛
21:42:53*kenran quit (Quit: WeeChat info:version)
21:43:08FromDiscord<Elegantbeef> clearly you should use slicerator's chain and do `for line in chain myFile.lines.filter(line.isEmptyOrWhitespace)`
21:47:29PMunchEh, speed here isn't really an issue
21:47:44PMunchI'm just reading in a couple thousand lines of csv and then running some curve fitting on the data
21:47:46FromDiscord<Elegantbeef> Pmunch how serious am i typically
21:47:58PMunchThe curve fitting is the slow bit :P
21:50:58FromDiscord<Elegantbeef> Just use a flexible material so the curve fits for you
21:52:22PMunchGood point
21:52:31PMunchThe problem is figuring out how much to bend it
21:52:42PMunchHmm, why does this crash the compiler? https://play.nim-lang.org/#ix=3UZL
21:53:14FromDiscord<Elegantbeef> Gotta put my debug hat on
21:53:26PMunchHmm, it works if p is typed
21:56:27FromDiscord<Elegantbeef> Ah i think i know what it is gotta try though
21:57:19FromDiscord<Elegantbeef> Nope it's not a varargs issue
21:57:40FromDiscord<Elegantbeef> Though that the varargs caused the compiler to dereference something odd
22:00:26FromDiscord<SirOlaf> Btw thanks for new stringstream pr
22:00:39FromDiscord<Elegantbeef> No problem
22:00:48FromDiscord<Elegantbeef> Ideally it wouldnt be needed 😀
22:02:43FromDiscord<Elegantbeef> This is an odd bug, certainly will require a debug compiler to check the cause
22:03:04FromDiscord<Elegantbeef> And olaf i had looked into borrowing again and yea it just wont work
22:03:19FromDiscord<SirOlaf> The old distinct borrow?
22:03:32FromDiscord<Elegantbeef> Yea the generic borrowing generic
22:03:43FromDiscord<Elegantbeef> I had everything right but it just doesnt choose the symbol
22:03:56FromDiscord<SirOlaf> Would like to try again too but just don't have enough understanding about internals
22:04:39FromDiscord<Elegantbeef> Yea maybe there's a way around it with the present mechanism, but i think the fact it uses `semOverloadedCall` means it'll never work
22:04:50FromDiscord<Elegantbeef> Since we never pass in generics
22:05:20FromDiscord<Elegantbeef> We basically need a mechanism to choose a generic procedure with out generic parameters, which i think isnt possible
22:05:41FromDiscord<SirOlaf> But shouldn't it work once the generic has been instantiated
22:05:52FromDiscord<SirOlaf> Because no generic parts are left
22:06:25FromDiscord<Elegantbeef> You're right, i think we were slightly to early on our borrow
22:06:25FromDiscord<Elegantbeef> Cause iirc our generic parameters were uninstantiated
22:08:53FromDiscord<Elegantbeef> @jmgomez\: avoid using `T is SomeConcept` as nim has a limited callstack on generics instead do https://play.nim-lang.org/#ix=3UZT
22:09:06FromDiscord<Elegantbeef> on concepts\
22:09:08PMunchOh well, I'm off to bed
22:09:26FromDiscord<Elegantbeef> Buh bye
22:09:28PMunch@Elegantbeef, let me know if you ever figure it out :) But changing it to a typed argument works for now
22:10:03*PMunch quit (Quit: leaving)
22:11:17FromDiscord<Elegantbeef> Also jmgomez those concepts arent working
22:11:21FromDiscord<Elegantbeef> They always return true
22:18:12FromDiscord<hmmm> beefy I got my toy threads in a somewhat working state, I can open as many as I want, but if I close even just one it crashes the whole app 🤔 I guess you wouldn't have an idea why is it so in your doggy wizard hat of yours...unless?
22:18:36FromDiscord<Elegantbeef> You have bad code
22:18:39FromDiscord<Rika> Toy threads?
22:18:53FromDiscord<Elegantbeef> Give me my free internet points
22:19:03FromDiscord<Rika> Sheesh
22:19:06FromDiscord<Rika> So greedy
22:19:10FromDiscord<hmmm> hmm
22:19:11FromDiscord<hmmm> nu lol 😃
22:21:02FromDiscord<Elegantbeef> Anyway @jmgomez i'll just give you the working concepts https://play.nim-lang.org/#ix=3UZU
22:21:38*sagax quit (Quit: Konversation terminated!)
22:23:16FromDiscord<jmgomez> In reply to @Elegantbeef "Anyway <@726017160115126333> i'll just": Awesome! Thank you for the heads up!
22:24:41FromDiscord<Elegantbeef> Comically the new concepts didnt work for this, i think due to the generic
22:26:14FromDiscord<jmgomez> did someone already wrote a monad library using concepts?
22:30:39FromDiscord<Elegantbeef> Probably
22:32:14FromDiscord<Elegantbeef> I dont know if they hvae cause it's all greek to me
22:35:34FromDiscord<SirOlaf> PMunch's error is pretty cool
22:36:04FromDiscord<Elegantbeef> You using a debug compiler? 🙂
22:36:14FromDiscord<SirOlaf> Think it tries to grab the insides of what it thinks is a symbol but p is a identifier
22:36:39FromDiscord<SirOlaf> In reply to @Elegantbeef "You using a debug": Of course
22:36:43FromDiscord<jmgomez> would be great if someone versed in nim and cc does it. When I was looking into cpp concepts didnt find any neither. I guess it should be easier if they map the one from haskell or something like that
22:37:27FromDiscord<Elegantbeef> Well if i spoke greek it'd be a fun thing to do, but i do not so i cannot
22:52:48*Gustavo6046 joined #nim
23:02:12*zgasma quit (Remote host closed the connection)
23:04:35*zgasma joined #nim
23:04:52*vicfred joined #nim
23:09:35FromDiscord<SirOlaf> So why aren't identifiers resolved after a macro
23:09:39FromDiscord<SirOlaf> My guess seems correct
23:09:50FromDiscord<Elegantbeef> They should be
23:10:18FromDiscord<SirOlaf> Well if you check in genBracketExpr it stays as nkIdent
23:10:36FromDiscord<SirOlaf> So skipTypes fails because it's not resolved yet
23:10:48FromDiscord<Elegantbeef> It's a bug then
23:12:58FromDiscord<SirOlaf> You sure this isn't too late in the process
23:13:21FromDiscord<Elegantbeef> The macro should be typed after it's expanded
23:13:32FromDiscord<Elegantbeef> If it's not it's a bug
23:15:38FromDiscord<SirOlaf> Seems strange
23:15:46FromDiscord<SirOlaf> Isn't the point of macros that they modify ast directly
23:15:56FromDiscord<Elegantbeef> Yes?
23:16:00FromDiscord<Elegantbeef> I dont follow your point
23:16:10FromDiscord<SirOlaf> Yeah so it sounds like you're saying a full pass is missing
23:16:18FromDiscord<Elegantbeef> Macros modify AST then that resultant AST needs to be retyped
23:19:12FromDiscord<Elegantbeef> Fiiiine i'll debug it with you
23:20:49FromDiscord<SirOlaf> You're right it does call semAfterMacroCall
23:21:12FromDiscord<SirOlaf> Which is supposed to fix stuff
23:30:40*noeontheend joined #nim
23:30:41FromDiscord<Elegantbeef> Seems `semDirectOp` is causing untyped AST to leak through
23:31:21FromDiscord<Elegantbeef> Sorry it's `semArrayAccess`
23:33:49*greyrat_ quit (Ping timeout: 240 seconds)
23:34:34*zeus-supreme joined #nim
23:35:23FromDiscord<SirOlaf> Pretty cool bug then
23:35:25*lucerne quit (Ping timeout: 240 seconds)
23:35:46FromDiscord<Elegantbeef> Ah i was wrong it's the nkCall branch of `semExpr`
23:36:40FromDiscord<Elegantbeef> Seems nothing causes it to semantically check the arguements
23:37:28*zeus-supreme1 quit (Ping timeout: 248 seconds)
23:37:37FromDiscord<SirOlaf> So it's because of the string conversion in the macro?
23:37:52FromDiscord<Elegantbeef> I'm uncertain sofar
23:38:01FromDiscord<SirOlaf> Well it's the only call that gets generated
23:38:33FromDiscord<Elegantbeef> no the dotexpr is a call
23:38:56FromDiscord<SirOlaf> Oh yeah, should happen after $ though
23:41:21FromDiscord<Elegantbeef> The echo call has an untyped statement after line 2937 inside semexprs
23:41:38FromDiscord<Elegantbeef> I wonder if semcall is called after that
23:44:23FromDiscord<Elegantbeef> Yep i'm lost to where the error happens
23:44:38FromDiscord<SirOlaf> Out of curiosity, is there a way to resolve a symbol inside of macros
23:45:01FromDiscord<Elegantbeef> You can only bindsyms that are accessible inside the macro
23:45:39FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3V08
23:45:40FromDiscord<Elegantbeef> Equally fun error
23:45:54FromDiscord<Elegantbeef> Might put you in the right direction though
23:49:30FromDiscord<SirOlaf> Still seems more approachable than generic borrow
23:49:41FromDiscord<Elegantbeef> Yea it very much is