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