| 01:07:58 | * | Mister_Magister quit (Quit: bye) |
| 01:10:34 | * | Mister_Magister joined #nim |
| 02:19:36 | * | xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in) |
| 02:19:59 | * | xutaxkamay joined #nim |
| 02:26:19 | * | xutaxkamay quit (Quit: ZNC 1.9.1+deb2+b3 - https://znc.in) |
| 02:29:17 | * | xutaxkamay joined #nim |
| 08:13:15 | * | om3ga quit (Ping timeout: 245 seconds) |
| 08:14:26 | * | om3ga joined #nim |
| 12:23:13 | * | Avinash joined #nim |
| 12:23:54 | * | Avinash left #nim (#nim) |
| 15:27:52 | * | zodman joined #nim |
| 15:55:57 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
| 15:56:19 | * | Jhonny2x4 joined #nim |
| 16:04:46 | deavmi | type MyEnumTypeName* = enum .... |
| 16:04:46 | deavmi | type MyEnumTypeName = enum .... |
| 16:04:49 | deavmi | What does the * mean? |
| 16:24:16 | Amun-Ra | deavmi: it means that declaration is public |
| 17:23:20 | * | przmk joined #nim |
| 17:32:13 | deavmi | Aaaaaaah |
| 17:32:22 | deavmi | Accessible outside the module from another than |
| 17:32:24 | deavmi | thanks :) |
| 17:33:10 | Amun-Ra | yes :) |
| 17:33:34 | Amun-Ra | if you want to export anything from the module, mark it with '*' |
| 17:33:55 | Amun-Ra | all types/consts/whatevers w/o '*' are private |
| 17:34:08 | Amun-Ra | unless you import module {.all.} |
| 17:37:46 | deavmi | Ah does that pragma just bring everything in regardless? |
| 17:37:46 | deavmi | Nice |
| 17:37:49 | deavmi | Thanks! |
| 17:40:56 | * | zodman quit (Quit: Miranda NG! Smaller, Faster, Easier. https://miranda-ng.org/) |
| 17:44:44 | Amun-Ra | yes |
| 17:45:18 | Amun-Ra | it's useful for writing test cases etc. |
| 17:45:23 | deavmi | Oh yes |
| 17:45:25 | deavmi | That is true |
| 17:45:33 | deavmi | Being able to inespect internals to verify implementation |
| 17:46:21 | Amun-Ra | mhm |
| 17:55:20 | deavmi | I've been taking a look at nim again, still busy on "Book 1" and the compile-time func execution is neat, reminds me a lot of D (where I first ever experienced that). I am liking it a lot. |
| 17:55:23 | deavmi | Also the generics are nice |
| 17:55:47 | deavmi | Only discovered openarray now, I've gotten used to just declaring generic functions rather but I guess this is an alternative |
| 17:56:31 | Amun-Ra | nim has the most sophisticated/capable compile time system |
| 17:58:33 | Amun-Ra | openarray is a built-in generic for array/seq |
| 18:01:06 | deavmi | Is it a generic feature or does it simply allow, at compile time, the passing of [ptr, len]? |
| 18:01:33 | Amun-Ra | openarray type accepts any array and seq |
| 18:01:36 | deavmi | Calling it generic makes it sound like it unfolds to the version I described, which I am under the impression it isn't?: proc dothing[T, I](x: array[I, T]) = |
| 18:01:41 | deavmi | Amun-Ra: yes |
| 18:01:43 | deavmi | Agreed |
| 18:01:49 | deavmi | Just wondering on the internals more so |
| 18:02:01 | deavmi | Ah, I didn't see the seq part. that's neat too |
| 18:02:09 | Amun-Ra | tbh I haven't looked at internal implementation |
| 18:02:29 | Amun-Ra | seq is just an array with runtime length |
| 18:02:46 | deavmi | That more or so answrs my question then, I can gather as much that if it also accepts seq then it's probably [ptr,len] as that is information you can derive from s static/fixed-len array and a seq, both have len and both have a data ptr (static array having a length derivable at compile time) |
| 18:02:48 | Amun-Ra | array length must be known compile time |
| 18:02:50 | deavmi | indeed |
| 18:02:52 | deavmi | thanks Amun-Ra |
| 18:03:17 | Amun-Ra | the other difference is seq is always controlled by a gc |
| 18:03:34 | deavmi | yes |
| 18:03:57 | deavmi | for allocations etc. (resizing and all) |
| 18:04:09 | Amun-Ra | whether you pass an array or a seq - the length is passed implicitly |
| 18:04:47 | Amun-Ra | (unlike in C) |
| 18:07:54 | deavmi | Yessir |
| 18:12:07 | deavmi | Last time I looked at Nim was back in school, I was like 15 or so, knew nothing about programming. Now many years later, I am grokking it all, it's also really expresisve and poetic looking (sounds cringe, but I haven't programmed in anything like this - besides a short stint in Pascal) |
| 18:13:23 | Amun-Ra | I was looking for a nice alternative of C/C++; switched from using rust (bleh) to nim |
| 18:17:01 | deavmi | I looked at Rust, not that interested in super memory safety stuff, makes programming boring (yeah I know some companies care but I don't). I wanted something fun, C++ looks a little - yeah nah. Nim seems to be able to do whatever C++ probably can template wise and probably more as well, CTFE and then macros - which I haven't even used yet. |
| 18:17:01 | deavmi | I was looking at Zig, but damn, it was ass as well, not as ass as Rust (which I never tried but didn't feel like learning). Zig I gave a try but really didn't like it. Idk, Nim seems good. |
| 18:17:35 | Amun-Ra | Zig is closer to C |
| 18:17:47 | Amun-Ra | I'm not a fan of llvm-based languages |
| 18:18:05 | Amun-Ra | zig's syntax is fine |
| 18:21:35 | deavmi | Why don't you like languages with an LLVM backend, curious? |
| 18:21:46 | deavmi | Too much magic optimizations that the compiler can't control? |
| 18:22:09 | deavmi | Or the LLVM toolchain itself, other than the llvm ir? |
| 18:25:25 | Amun-Ra | too much hassle compiling |
| 18:26:05 | Amun-Ra | do you need a new version of ghostty (terminal emulator written in zig) |
| 18:26:20 | Amun-Ra | then you need a new version of zig |
| 18:26:27 | Amun-Ra | and new llvm one |
| 21:02:28 | * | xet7 joined #nim |
| 21:29:40 | * | ursa-major quit (Ping timeout: 246 seconds) |
| 21:30:01 | * | whereiseveryone quit (Ping timeout: 246 seconds) |
| 21:30:09 | * | adigitoleo quit (Ping timeout: 264 seconds) |
| 21:30:46 | * | casaca quit (Ping timeout: 244 seconds) |
| 21:31:25 | * | noeontheend quit (Ping timeout: 250 seconds) |
| 21:31:34 | * | Freneticks quit (Ping timeout: 260 seconds) |
| 21:31:51 | * | johuck quit (Ping timeout: 250 seconds) |
| 21:32:00 | * | mronetwo quit (Ping timeout: 245 seconds) |
| 21:32:54 | * | tmpod quit (Ping timeout: 252 seconds) |
| 21:34:05 | * | robertmeta quit (Ping timeout: 245 seconds) |
| 21:34:23 | * | mronetwo joined #nim |
| 21:34:24 | * | tmpod joined #nim |
| 21:34:26 | * | adigitoleo joined #nim |
| 21:34:29 | * | noeontheend joined #nim |
| 21:34:29 | * | robertmeta joined #nim |
| 21:34:44 | * | casaca joined #nim |
| 21:34:50 | * | whereiseveryone joined #nim |
| 21:34:54 | * | ursa-major joined #nim |
| 21:35:08 | * | johuck joined #nim |
| 21:35:14 | * | Freneticks joined #nim |
| 21:43:39 | * | zodman joined #nim |
| 22:03:22 | * | xet7 quit (Quit: Leaving) |
| 22:06:11 | * | xet7 joined #nim |
| 22:40:08 | * | zodman quit (Read error: Connection reset by peer) |