00:02:44 | * | vicfred joined #nim |
00:04:49 | * | xet7 joined #nim |
00:11:59 | * | vicfred quit (Quit: leaving) |
00:12:17 | * | vicfred joined #nim |
00:28:42 | FromDiscord | <Elegantbeef> Went full on Canadian |
00:28:48 | FromDiscord | <Elegantbeef> @that_dude. |
00:29:08 | FromDiscord | <that_dude.> Sorry I don't know what you mean by that |
00:29:16 | FromDiscord | <Elegantbeef> I'm impressed someone noticed within a week |
00:29:22 | FromDiscord | <Elegantbeef> What's the Canadian TLD? 😛 |
00:30:33 | FromDiscord | <that_dude.> Got it, I was looking for your blog, and the google result + discord search both still had the `.com` variant |
00:30:43 | * | vicfred quit (Quit: leaving) |
00:31:06 | FromDiscord | <Elegantbeef> One day I'll add a writeup about hot code reload |
00:31:07 | * | vicfred joined #nim |
00:31:40 | FromDiscord | <that_dude.> I wanted to refresh myself on concepts before I asked Araq questions lol |
00:32:16 | FromDiscord | <Elegantbeef> About implementation or usage? |
00:32:46 | FromDiscord | <that_dude.> How they fit into the ecosystem of the language since I think he was introducing afaict a new .requires pragma |
00:33:22 | FromDiscord | <Elegantbeef> Ah his plan is to make `concept`s some mixin instead of how they are now afaict |
00:34:29 | FromDiscord | <that_dude.> Seems reasonable to me I think. I was just curious on his vision behind the updates |
00:36:20 | FromDiscord | <Elegantbeef> I also don't touch on new concepts in my writeups as they're buggy and not overly useful in my endeavours |
00:43:10 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Ah his plan is": huh, how would that be different compared to the current impl |
00:51:41 | FromDiscord | <nixfreak> Hi Elegantbeef is this library usable ? Been looking for an inotify for nim. I want to use nim to replace some bash scripts. |
00:59:44 | FromDiscord | <nixfreak> https://github.com/beef331/potato/blob/master/src/potato/inotifyevents.nim |
01:07:45 | FromDiscord | <janakali> sent a code paste, see https://play.nim-lang.org/#pasty=KupvfXLP |
01:20:45 | FromDiscord | <Elegantbeef> nixfreak I used it for reflector and it seems right |
01:21:41 | FromDiscord | <Elegantbeef> https://github.com/beef331/reflector/blob/master/reflector.nim has some niceties in that regard |
01:57:11 | * | Jjp137 quit (Quit: Leaving) |
01:58:45 | * | Jjp137 joined #nim |
02:05:41 | * | xet7 quit (Ping timeout: 248 seconds) |
02:06:21 | * | mahlon quit (Quit: PotatoTech) |
02:17:47 | * | xet7 joined #nim |
02:37:11 | * | beholders_eye quit (Ping timeout: 244 seconds) |
03:04:30 | * | vicfred quit (Quit: leaving) |
03:04:48 | * | vicfred joined #nim |
03:06:53 | * | LuxuryMode joined #nim |
03:15:55 | FromDiscord | <ajusa> If you're around beef, how does https://github.com/beef331/micros/blob/master/src/micros/introspection.nim work with default values? I assume it would include the default value types in the tuple? |
03:16:20 | FromDiscord | <nixfreak> Can you post this on a paste?↵(@janakali) |
03:16:29 | FromDiscord | <Elegantbeef> Don't know I rarely use them |
03:17:25 | FromDiscord | <ajusa> I'll try it out, I realize you wrote it a while ago. Thanks! |
03:21:24 | FromDiscord | <Elegantbeef> If you mean optionals it doesnt |
03:26:54 | * | vicfred quit (Ping timeout: 252 seconds) |
03:55:04 | * | vicfred joined #nim |
04:03:56 | * | vicfred quit (Quit: leaving) |
04:24:50 | FromDiscord | <janakali> @nixfreak I get error 500 from pastyy on Nim playground, so check this: https://pastebin.com/5MPCTHD8 |
04:35:33 | FromDiscord | <janakali> same on wandbox: https://wandbox.org/permlink/Y76rfAwGtoQZ51f1 |
04:45:06 | * | shrikant joined #nim |
04:46:17 | * | shrikant left #nim (#nim) |
05:26:12 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
05:33:32 | FromDiscord | <morgan (ping with reply)> sent a code paste, see https://paste.rs/Uvdu1 |
05:34:57 | FromDiscord | <morgan (ping with reply)> reason behind it, it's for a room based air sim. if most rooms have low ceilings, i don't want to have tons of empty space (for better caching) if i need one room to have a pretty high ceiling |
05:35:39 | FromDiscord | <morgan (ping with reply)> i don't need it to vary between rooms, if it did vary i could just have it able to be less than the room's max |
05:35:52 | FromDiscord | <morgan (ping with reply)> i could do a ptr uncheckedarray inside but then that |
05:36:01 | FromDiscord | <morgan (ping with reply)> ... is another level of indirection |
05:37:47 | FromDiscord | <morgan (ping with reply)> actually |
05:37:57 | FromDiscord | <morgan (ping with reply)> ill just write an array3d type |
05:38:01 | FromDiscord | <morgan (ping with reply)> so nevermind lol |
06:50:28 | * | mahlon joined #nim |
07:04:00 | * | ensyde quit (Ping timeout: 244 seconds) |
07:32:40 | FromDiscord | <nnsee> In reply to @janakali "<@460266725988892672> I get error": investigating |
07:40:25 | FromDiscord | <nnsee> should be fine now. server had a network driver crash |
08:25:21 | * | ntat joined #nim |
09:54:06 | * | xet7 quit (Remote host closed the connection) |
11:33:41 | * | beholders_eye joined #nim |
12:20:42 | * | beholders_eye quit (Ping timeout: 272 seconds) |
14:08:14 | FromDiscord | <madonuko> for some reason nim_langserver (or I think nimsuggest) is giving me a bunch of errors (because it can't import some files?) but `nimble run` says otherwise |
15:47:13 | FromDiscord | <alohaer> In reply to @madonuko "for some reason nim_langserver": This may not address your issue, but I'll say that I'm constantly closing and re-opening vscode when programming in Nim to avoid "stale" warnings from nim_suggest about non-existent types/files/functions. |
15:47:56 | FromDiscord | <madonuko> yeah nah for one I don't use vscode for two those are not stale warnings/errors |
15:48:28 | * | tiorock joined #nim |
15:48:28 | * | rockcavera is now known as Guest4637 |
15:48:28 | * | Guest4637 quit (Killed (copper.libera.chat (Nickname regained by services))) |
15:48:28 | * | tiorock is now known as rockcavera |
15:50:33 | * | tiorock joined #nim |
15:50:33 | * | rockcavera is now known as Guest4067 |
15:50:33 | * | Guest4067 quit (Killed (zinc.libera.chat (Nickname regained by services))) |
15:50:33 | * | tiorock is now known as rockcavera |
15:56:24 | * | derpydoo joined #nim |
16:14:11 | FromDiscord | <odexine> In reply to @alohaer "This may not address": you can just restart the extension host |
16:14:38 | FromDiscord | <odexine> quicker than restarting vscode |
16:15:12 | FromDiscord | <alohaer> In reply to @odexine "you can just restart": Oh, thanks 👍 |
16:15:25 | FromDiscord | <odexine> you can find it in the command search panel thing |
16:15:30 | FromDiscord | <odexine> ctrl shift p or smth |
16:33:56 | * | tiorock joined #nim |
16:33:56 | * | tiorock quit (Changing host) |
16:33:56 | * | tiorock joined #nim |
16:33:56 | * | rockcavera quit (Killed (mercury.libera.chat (Nickname regained by services))) |
16:33:56 | * | tiorock is now known as rockcavera |
16:36:03 | * | tiorock joined #nim |
16:36:03 | * | rockcavera is now known as Guest1367 |
16:36:03 | * | Guest1367 quit (Killed (iridium.libera.chat (Nickname regained by services))) |
16:36:03 | * | tiorock is now known as rockcavera |
17:05:26 | * | derpydoo quit (Quit: derpydoo) |
18:31:25 | * | beholders_eye joined #nim |
18:42:13 | FromDiscord | <jseb> sent a long message, see https://pasty.ee/zwzgoIAO |
19:13:09 | FromDiscord | <solitudesf> on the site itself is says that docs are 2 years old |
19:13:18 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=ApQaAnOO |
19:14:21 | FromDiscord | <heysokam> (edit) "https://play.nim-lang.org/#pasty=pqbhkBJC" => "https://play.nim-lang.org/#pasty=ygbvbtRr" |
19:38:06 | * | def- quit (Quit: -) |
19:38:29 | * | def- joined #nim |
19:43:05 | * | def- quit (Client Quit) |
19:46:46 | * | def- joined #nim |
19:49:19 | * | def- quit (Client Quit) |
19:50:02 | FromDiscord | <jseb> Thank you |
20:15:41 | * | def- joined #nim |
20:21:52 | FromDiscord | <jabuci> sent a code paste, see https://play.nim-lang.org/#pasty=ufOooQIn |
20:22:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=PigEqAat |
20:22:22 | FromDiscord | <Elegantbeef> well `var b = a` 😄 |
20:23:05 | FromDiscord | <fl4shk> so that's how you use `new` |
20:23:10 | FromDiscord | <fl4shk> I had been wondering about that |
20:23:18 | FromDiscord | <fl4shk> not the only thing you can do with `new`, I'm aware |
20:23:32 | FromDiscord | <Elegantbeef> Well it's overloaded for `var ref T` aswell |
20:23:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VMjWbRqC |
20:32:56 | FromDiscord | <jabuci> When I write `var a = @[1, 2, 3]`, what happens? I thought the following: `a` is a reference on the stack, and the sequence is put in the heap. Is that correct or wrong? |
20:35:10 | FromDiscord | <Elegantbeef> Well a is a object on the stack which has `len: int, data: ptr SeqData` but the thing is Nim copies sequences on assignment |
20:35:14 | FromDiscord | <Elegantbeef> so `b = a` will make a copy |
20:39:51 | FromDiscord | <jabuci> Does it mean that when I pass a sequence to a proc, a complete copy is made? That'd make passing sequences around expensive. |
20:40:09 | FromDiscord | <Elegantbeef> Nope cause that's not assignment |
20:41:33 | FromDiscord | <Elegantbeef> Though even on assignment isn't write since Nim has move semantics |
20:41:43 | FromDiscord | <Elegantbeef> `b = a` can copy or can even be a implicit cursor to a sequence |
20:42:06 | FromDiscord | <Elegantbeef> b could even just consume a |
20:56:53 | * | ntat quit (Quit: Leaving) |
20:57:45 | * | cnx left #nim (#nim) |
21:02:00 | FromDiscord | <jabuci> Thanks! |
21:37:45 | * | scmutalisk joined #nim |
21:38:30 | * | scmutalisk left #nim (#nim) |
21:39:22 | * | mahlon quit (Quit: PotatoTech) |
21:48:58 | * | scmutalisk joined #nim |
21:58:05 | * | beholders_eye quit (Ping timeout: 260 seconds) |
22:27:51 | FromDiscord | <fl4shk> you could also use `move` I think |
22:28:03 | FromDiscord | <fl4shk> depending on the use case |
22:28:31 | FromDiscord | <aintea> Once the RFC about Enum variants and structural pattern matching will be integrated in Nim, do you think the standard library will be partly rewritten to get rid of errors and replace it with `Result` ? Or even just rewrite `std/options` ? |
22:28:54 | FromDiscord | <fl4shk> ooh Enum variants sound great |
22:29:13 | FromDiscord | <aintea> Or will we still have to deal with different approaches for example when we use manual memory management but the standard library still uses garbage collection |
22:29:45 | FromDiscord | <fl4shk> `seq` at least apparently doesn't use garbage collection, but not sure about `Table` and `HashSet` |
22:30:08 | FromDiscord | <fl4shk> (edit) "collection," => "collection (with ORC/ARC)," |
22:30:21 | FromDiscord | <aintea> it is true that now it uses ORC/ARC |
22:30:34 | FromDiscord | <aintea> but I'm not sure how the compatibility stuff will happen when enum variants will be included |
22:30:56 | FromDiscord | <aintea> will ML-like pattern matching be a feature or will it be the standard |
22:31:13 | FromDiscord | <Elegantbeef> It will likely stick to exceptions |
22:31:52 | FromDiscord | <Elegantbeef> The RFC seems to just be variant matching |
22:32:34 | FromDiscord | <Elegantbeef> You don't need to use move it's automatic↵(@fl4shk) |
22:33:24 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=IpHnHBXt |
22:33:34 | FromDiscord | <aintea> which isn't incompatible with exceptions |
22:35:10 | FromDiscord | <Elegantbeef> Isn't it though? |
22:35:34 | FromDiscord | <aintea> I don't think it is incompatible |
22:36:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=aeZDGPpR |
22:36:15 | FromDiscord | <Elegantbeef> That should printout `int` |
22:36:28 | FromDiscord | <aintea> why so |
22:36:54 | FromDiscord | <Elegantbeef> well it should print out an int I mean |
22:37:08 | FromDiscord | <Elegantbeef> Otherwise it's wrapping exceptions in results and pretending you're still using exceptions |
22:37:35 | FromDiscord | <aintea> It's not exactly using exceptions, it's just to differentiate |
22:37:43 | FromDiscord | <aintea> differentiate different error messages |
22:38:20 | FromDiscord | <aintea> sent a code paste, see https://play.nim-lang.org/#pasty=dGbIYFRg |
22:38:25 | FromDiscord | <fl4shk> In reply to @Elegantbeef "You don't need to": oh, really? how do you do it? |
22:38:41 | FromDiscord | <fl4shk> ...if an assignment copies |
22:38:48 | FromDiscord | <Elegantbeef> `var b = a # if a is not used after here it's an implicit move` |
22:38:57 | FromDiscord | <fl4shk> oh I see |
22:38:58 | FromDiscord | <fl4shk> interesting |
22:39:00 | FromDiscord | <fl4shk> that's a good design |
22:39:16 | FromDiscord | <Elegantbeef> How do those results work with exceptions? |
22:39:49 | FromDiscord | <aintea> well you'd have to add `{.raises: [].}` at the end of every function to specify that you only need to handle the result |
22:40:13 | FromDiscord | <aintea> and since pattern matching needs to be exhaustive, this ensures runtime safety |
22:40:15 | FromDiscord | <Elegantbeef> So it's not using exceptions? |
22:40:29 | FromDiscord | <Elegantbeef> The point of exceptions is they can bubble |
22:40:29 | FromDiscord | <aintea> not exactly |
22:40:39 | FromDiscord | <michaelb.eth> Result vs. Exception, the olde holy war, Chapter 973441… |
22:40:52 | FromDiscord | <aintea> what do you exactly mean by bubble |
22:41:01 | FromDiscord | <aintea> In reply to @michaelb.eth "Result vs. Exception, the": in war we go |
22:41:16 | FromDiscord | <aintea> Since Nim allows a lot, both should be able to coexist |
22:41:23 | FromDiscord | <aintea> (edit) "lot," => "lot of things," |
22:41:26 | FromDiscord | <Elegantbeef> An exception does not to be handled by the code that called into the procedure, it goes up the stack frame until handler handles it |
22:41:34 | FromDiscord | <Elegantbeef> I mean there are macros to convert between but it always is just wrapping from one to the other |
22:41:57 | FromDiscord | <aintea> In results you're forced to handle it anyways so what is the point of bubbling if there is nothing to bubble up |
22:42:12 | FromDiscord | <Elegantbeef> Well that's the point of an exception, you're not forced |
22:42:22 | FromDiscord | <aintea> then we have our use cases |
22:42:34 | FromDiscord | <aintea> I mean |
22:42:57 | FromDiscord | <aintea> If you don't want to handle anything you can do `let assert Ok(c) = divide(3, 4)` |
22:43:31 | FromDiscord | <aintea> which, if it fails, will raise an AssertDefect |
22:43:37 | FromDiscord | <Elegantbeef> Options and exceptions cannot really coexist in my view as one pollutes the return type and the other pollutes flow control |
22:44:27 | FromDiscord | <aintea> I think both can coexist, not in the same function tho |
22:44:31 | FromDiscord | <aintea> wait |
22:44:51 | FromDiscord | <Elegantbeef> You can of course use both, but that's not really coexisting now is it |
22:45:00 | FromDiscord | <aintea> define coexisting |
22:45:08 | FromDiscord | <aintea> so that we have the same definition |
22:45:17 | FromDiscord | <Elegantbeef> Using the same mechanism to handle either result or option |
22:45:35 | FromDiscord | <Elegantbeef> Not having to worry about which a procedure returns and handling the error in the same way |
22:46:00 | FromDiscord | <aintea> I don't think that is possible, but I think a macro to convert from one to another might be possible |
22:46:05 | FromDiscord | <Elegantbeef> Like I said they can be used together and you can even convert inbetween them, but that's not really coexisting to me |
22:46:11 | FromDiscord | <Elegantbeef> I mean they already exist |
22:46:19 | FromDiscord | <Elegantbeef> There are multiple result libraries out there that do exactly this |
22:46:27 | FromDiscord | <aintea> In reply to @Elegantbeef "Like I said they": then no, they cannot coexist as for your definition of coexisting |
22:47:27 | FromDiscord | <aintea> Also, from this point, I have no more facts to debate this, and it will only be subjective facts and my own opinion |
22:47:55 | FromDiscord | <aintea> so I suggest we end the debate here as it will not help having a logical debate |
22:47:58 | FromDiscord | <Elegantbeef> We're talking about error handling it's all subjective conjecture based in personal bias |
22:48:15 | FromDiscord | <Elegantbeef> It turns out errors implicitly suck and there is no good way of handling them |
22:48:23 | FromDiscord | <aintea> There is |
22:48:29 | FromDiscord | <aintea> writing code that solves one specific problem |
22:48:37 | FromDiscord | <aintea> for example the result of 1+1 |
22:48:42 | FromDiscord | <aintea> no error handling |
22:48:51 | FromDiscord | <Elegantbeef> Except for overflow |
22:49:00 | FromDiscord | <aintea> that's it I'm becoming a farmer |
22:49:03 | FromDiscord | <michaelb.eth> AinTea, have you used arnetheduck’s results library? how about the “questionable” library, nice helper macros for results? |
22:49:19 | FromDiscord | <Elegantbeef> Here we go bitwise and of an unsigned byte |
22:49:22 | FromDiscord | <aintea> In reply to @michaelb.eth "AinTea, have you used": It does help but I'm always wanting to use enum variants |
22:49:25 | FromDiscord | <Elegantbeef> No error handling needed |
22:49:43 | FromDiscord | <aintea> There are always problems even in the simplest of solutions |
22:50:25 | FromDiscord | <aintea> I suggest we just wake up and realise the world is a lie, no more school, work, parenting, programming, handling exceptions |
22:50:33 | FromDiscord | <aintea> we are all gonna die anyway |
22:50:50 | FromDiscord | <aintea> but in the end, results > exceptions |
22:50:57 | FromDiscord | <Elegantbeef> Are you the programmer of a little radiation machine named therac-25? |
22:51:09 | FromDiscord | <aintea> I legally cannot answer |
22:51:34 | FromDiscord | <michaelb.eth> I wonder if The Matrix uses results or exceptions |
22:51:59 | FromDiscord | <aintea> they don't use none, nothing happens when the protagonist wakes up |
22:52:01 | FromDiscord | <Elegantbeef> Results but an incorrect unpack is a panic |
23:22:57 | * | tiorock joined #nim |
23:22:57 | * | tiorock quit (Changing host) |
23:22:57 | * | tiorock joined #nim |
23:22:57 | * | rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
23:22:57 | * | tiorock is now known as rockcavera |
23:25:03 | * | tiorock joined #nim |
23:25:03 | * | tiorock quit (Changing host) |
23:25:03 | * | tiorock joined #nim |
23:25:03 | * | rockcavera is now known as Guest4156 |
23:25:03 | * | Guest4156 quit (Killed (copper.libera.chat (Nickname regained by services))) |
23:25:03 | * | tiorock is now known as rockcavera |
23:29:14 | * | vicfred joined #nim |