<< 29-12-2025 >>

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:46deavmitype MyEnumTypeName* = enum ....
16:04:46deavmitype MyEnumTypeName = enum ....
16:04:49deavmiWhat does the * mean?
16:24:16Amun-Radeavmi: it means that declaration is public
17:23:20*przmk joined #nim
17:32:13deavmiAaaaaaah
17:32:22deavmiAccessible outside the module from another than
17:32:24deavmithanks :)
17:33:10Amun-Rayes :)
17:33:34Amun-Raif you want to export anything from the module, mark it with '*'
17:33:55Amun-Raall types/consts/whatevers w/o '*' are private
17:34:08Amun-Raunless you import module {.all.}
17:37:46deavmiAh does that pragma just bring everything in regardless?
17:37:46deavmiNice
17:37:49deavmiThanks!
17:40:56*zodman quit (Quit: Miranda NG! Smaller, Faster, Easier. https://miranda-ng.org/)
17:44:44Amun-Rayes
17:45:18Amun-Rait's useful for writing test cases etc.
17:45:23deavmiOh yes
17:45:25deavmiThat is true
17:45:33deavmiBeing able to inespect internals to verify implementation
17:46:21Amun-Ramhm
17:55:20deavmiI'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:23deavmiAlso the generics are nice
17:55:47deavmiOnly discovered openarray now, I've gotten used to just declaring generic functions rather but I guess this is an alternative
17:56:31Amun-Ranim has the most sophisticated/capable compile time system
17:58:33Amun-Raopenarray is a built-in generic for array/seq
18:01:06deavmiIs it a generic feature or does it simply allow, at compile time, the passing of [ptr, len]?
18:01:33Amun-Raopenarray type accepts any array and seq
18:01:36deavmiCalling 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:41deavmiAmun-Ra: yes
18:01:43deavmiAgreed
18:01:49deavmiJust wondering on the internals more so
18:02:01deavmiAh, I didn't see the seq part. that's neat too
18:02:09Amun-Ratbh I haven't looked at internal implementation
18:02:29Amun-Raseq is just an array with runtime length
18:02:46deavmiThat 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:48Amun-Raarray length must be known compile time
18:02:50deavmiindeed
18:02:52deavmithanks Amun-Ra
18:03:17Amun-Rathe other difference is seq is always controlled by a gc
18:03:34deavmiyes
18:03:57deavmifor allocations etc. (resizing and all)
18:04:09Amun-Rawhether you pass an array or a seq - the length is passed implicitly
18:04:47Amun-Ra(unlike in C)
18:07:54deavmiYessir
18:12:07deavmiLast 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:23Amun-RaI was looking for a nice alternative of C/C++; switched from using rust (bleh) to nim
18:17:01deavmiI 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:01deavmiI 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:35Amun-RaZig is closer to C
18:17:47Amun-RaI'm not a fan of llvm-based languages
18:18:05Amun-Razig's syntax is fine
18:21:35deavmiWhy don't you like languages with an LLVM backend, curious?
18:21:46deavmiToo much magic optimizations that the compiler can't control?
18:22:09deavmiOr the LLVM toolchain itself, other than the llvm ir?
18:25:25Amun-Ratoo much hassle compiling
18:26:05Amun-Rado you need a new version of ghostty (terminal emulator written in zig)
18:26:20Amun-Rathen you need a new version of zig
18:26:27Amun-Raand 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)