00:13:42 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
00:51:19 | * | rockcavera joined #nim |
01:42:49 | * | tokyovigilante quit (Remote host closed the connection) |
01:46:25 | * | tokyovigilante joined #nim |
02:25:29 | * | pmp-p quit (Ping timeout: 260 seconds) |
02:34:57 | * | pmp-p joined #nim |
02:59:06 | * | skippy8 joined #nim |
03:24:53 | * | rockcavera quit (Remote host closed the connection) |
04:19:34 | * | xet7 joined #nim |
04:26:51 | * | xet7 quit (Quit: Leaving) |
05:08:49 | * | amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in) |
05:15:19 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
05:15:46 | * | SchweinDeBurg joined #nim |
05:17:28 | * | xet7 joined #nim |
05:57:50 | * | xet7 quit (Quit: Leaving) |
07:08:43 | FromDiscord | <0xfab_10> example? |
07:23:00 | * | jjido joined #nim |
07:45:44 | * | redj quit (Ping timeout: 260 seconds) |
07:46:17 | * | redj joined #nim |
07:51:19 | FromDiscord | <kapendev> TextureId loadTexture(IStr path) |
07:56:01 | FromDiscord | <kapendev> Almost everything in Godot returns an error code. |
08:15:11 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
08:16:53 | * | jjido joined #nim |
08:17:15 | * | jjido quit (Client Quit) |
08:19:26 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=cNogulcP |
08:42:59 | FromDiscord | <0xfab_10> In reply to @kapendev "Almost everything in Godot": well duh as it should, have you seen vulkan or sdl? |
08:44:22 | FromDiscord | <kapendev> In Rust land this would not be the case 90% of the time. |
08:44:51 | FromDiscord | <kapendev> I can also imagine they do that for their bindings/wrappers. |
08:45:14 | * | beholders_eye joined #nim |
08:54:25 | FromDiscord | <lainlaylie> In reply to @blashyrk "Does anyone know if": are you looking for something like mapIt? |
08:55:42 | FromDiscord | <blashyrk> In reply to @lainlaylie "are you looking for": Yes but mapIt works for seqs (it's from sequtils) only I think, and also allocates to the best of my knowledge. |
08:57:59 | FromDiscord | <blashyrk> Oooh but I just realized there's an `inject` pragma, that should do the trick (with a template) |
09:01:05 | FromDiscord | <lainlaylie> mapIt works on arrays (or anything it can iterate over) but indeed returns a seq. there's no closure involve though, the ast passed as argument is expanded directly |
09:01:16 | FromDiscord | <lainlaylie> (edit) "involve" => "involved" |
09:08:09 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=KlZlsfTr |
09:23:14 | FromDiscord | <griffith1deadly> sent a code paste, see https://play.nim-lang.org/#pasty=nhGIpWAz |
09:24:35 | FromDiscord | <lainlaylie> you can, that's what mapIt does |
09:25:37 | FromDiscord | <lainlaylie> this kind of error usually means something in the template is failing to compile |
09:26:31 | FromDiscord | <lainlaylie> In reply to @blashyrk "Thanks! I'd like to": though i can't debug your exact code because it's missing some definitions and the actual call to `magnitude` |
09:27:08 | FromDiscord | <griffith1deadly> In reply to @lainlaylie "you can, that's what": didn't know that |
09:32:40 | FromDiscord | <hawkey5212> In reply to @fabric.input_output "example?": I'd love to see an example as well. Curious about what constitutes abuse of `Result` or `Option` in rust.↵↵In my experience, nothing gets past code review without at least being noticed if it looks like inappropriate use. |
09:34:48 | FromDiscord | <blashyrk> In reply to @lainlaylie "though i can't debug": I think it's because it might be impossible to infer the U param this way... So I also tried this to no avail:↵↵https://play.nim-lang.org/#pasty=JWwuhmWd |
09:35:42 | FromDiscord | <blashyrk> I saw that `mapIt` uses some moderately complex machinery to figure out the output type, maybe I need to copy that |
09:37:28 | FromDiscord | <lainlaylie> `type resType = typeof((let it {.inject.} = default(T); body))` |
09:37:49 | FromDiscord | <lainlaylie> the problem is in typeof(body), there is no `it` so it fails to compile |
09:43:29 | FromDiscord | <blashyrk> Thanks, that did the trick! 🙂 |
09:44:25 | FromDiscord | <blashyrk> Seems kinda "ugly" to use `it` also in the intermediate step for the type, but I'm not complaining 😄 |
09:44:41 | FromDiscord | <0xfab_10> In reply to @kapendev "In Rust land this": why would it not be? |
09:45:15 | FromDiscord | <blashyrk> Ah but it only works if T is the same as U 😦 ... Back to the drawing board |
09:48:10 | FromDiscord | <lainlaylie> In reply to @blashyrk "Ah but it only": that shouldn't be the case |
10:06:34 | * | CypherCat quit (Changing host) |
10:06:34 | * | CypherCat joined #nim |
10:07:33 | FromDiscord | <nnsee> In reply to @fabric.input_output "why would it not": don't you know? rust prevents all errors from ever happening |
10:08:53 | FromDiscord | <nnsee> on a more serious note, the type system is quite powerful and the compiler should stop some invalid states from even being possible, but... that only gets you so far. errors occurring at runtime are runtime errors and no amount of compiler magic changes that |
10:27:05 | FromDiscord | <0xfab_10> also sometimes it's not the function's responsibility to handle the error so the best you can do is just pass it along |
10:28:19 | FromDiscord | <hawkey5212> sent a code paste, see https://play.nim-lang.org/#pasty=gGuVPFPT |
10:29:30 | FromDiscord | <hawkey5212> In reply to @fabric.input_output "also sometimes it's not": which is where code review comes into play. I think kapendev is complaining about bad engineers letting poor design past review, than the language itself. |
12:00:24 | * | przmk joined #nim |
12:00:38 | * | przmk4 quit (Quit: The Lounge - https://thelounge.chat) |
12:02:41 | * | amadaluzia joined #nim |
13:09:14 | FromDiscord | <mayendradwika> today i join nim |
13:25:56 | * | FromDiscord quit (Server closed connection) |
13:26:21 | * | FromDiscord joined #nim |
13:30:40 | FromDiscord | <0xfab_10> welcome |
13:42:20 | FromDiscord | <lainlaylie> do you hate crabs or are you a hate-crab |
13:50:20 | * | xet7 joined #nim |
14:16:51 | FromDiscord | <mayendradwika> i hate rust |
14:17:47 | * | amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in) |
14:19:02 | FromDiscord | <lucidrains (Phil Wang)> i know this comes up a lot, but what would people recommend for multithreading for nim lang in 2025? |
14:19:31 | FromDiscord | <lucidrains (Phil Wang)> i'm looking at making weave work, but just want to hear some affirmations |
14:31:03 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
14:38:51 | FromDiscord | <kapendev> In reply to @fabric.input_output "also sometimes it's not": I get that, and I don't really have a source for that lol, but most of them pass the error up without even trying to deal with it. "It's your problemo, friend." And then we have exceptions again. |
14:41:23 | FromDiscord | <kapendev> I would remove the `?` thing from the language just to make it harder to pass the problem up. |
15:15:58 | FromDiscord | <hawkey5212> In reply to @kapendev "I get that, and": if "that's your preblemo, friend" is how you see errors being passed up, then I can only imagine you've been mentored by engineers that have no idea what they're doing. |
15:21:10 | FromDiscord | <hawkey5212> sent a long message, see https://pasty.ee/wFVnhYFn |
15:23:04 | FromDiscord | <kapendev> There are a lot of things that can be improved about Rust. I am not saying that you should never pass things up. |
15:25:40 | FromDiscord | <hawkey5212> there are a lot of things that can be improved in _every_ language. I think rust is proven itself as the language that has the highest quality engineering behind it, though. I can only think of 3 or 4 things about it that are arguably due to lack of engineering quality going into the project. |
15:28:08 | FromDiscord | <hawkey5212> the sync/async issue. const generics. async trait methods. some edge cases on module/library dependency stuff. function constraints are the ones that come to mind. |
15:28:47 | FromDiscord | <hawkey5212> allocations assumed to not fail. |
15:29:25 | FromDiscord | <hawkey5212> not treating embedded as a first class citizen. |
15:33:41 | FromDiscord | <hawkey5212> sent a long message, see https://pasty.ee/igDegLbA |
15:36:04 | FromDiscord | <kapendev> Everything is kinda vibe based when designing a language. My good version of Rust will probably not be the same as most Rust users just because I like writing C, C++ and D more. Same for Nim actually. My good version of Nim would probably have better docs 🙂↵I don't really do embedded stuff, so no idea. |
15:45:59 | FromDiscord | <hawkey5212> sent a long message, see https://pasty.ee/ngVGecaC |
15:47:56 | FromDiscord | <kapendev> Making a language easily grepable is a nice idea. I think C3 kinda tries that. |
15:50:45 | FromDiscord | <hawkey5212> sent a long message, see https://pasty.ee/xhioqmDY |
15:53:11 | FromDiscord | <hawkey5212> sent a code paste, see https://play.nim-lang.org/#pasty=UZsVmlhJ |
16:05:39 | * | przmk_ joined #nim |
16:06:13 | * | przmk_ quit (Remote host closed the connection) |
16:06:42 | * | przmk quit (Ping timeout: 248 seconds) |
16:07:57 | * | przmk joined #nim |
16:18:29 | * | beholders_eye quit (Ping timeout: 260 seconds) |
16:54:19 | * | beholders_eye joined #nim |
16:58:45 | * | ntat joined #nim |
17:11:18 | * | bcksl quit (Ping timeout: 252 seconds) |
17:11:34 | * | end quit (Ping timeout: 260 seconds) |
17:13:38 | * | skippy8 joined #nim |
17:33:13 | * | bcksl joined #nim |
17:47:32 | * | end joined #nim |
18:14:35 | * | nils` joined #nim |
19:13:22 | * | beholders_eye quit (Ping timeout: 272 seconds) |
19:41:49 | * | ntat quit (Quit: Leaving) |
20:10:31 | * | amadaluzia joined #nim |
20:16:49 | * | amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in) |
20:17:41 | * | amadaluzia joined #nim |
20:50:16 | * | Guest33 joined #nim |
20:50:56 | * | lucerne quit (Server closed connection) |
20:51:02 | * | Guest33 quit (Client Quit) |
20:52:11 | * | lucerne joined #nim |
20:52:51 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
21:03:37 | * | jjido joined #nim |
21:28:35 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:31:00 | * | cm quit (Ping timeout: 252 seconds) |
21:31:36 | * | cm joined #nim |
22:30:00 | * | amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in) |