<< 14-05-2023 >>

00:10:54*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
00:12:35*progranner joined #nim
00:18:38FromDiscord<Nlits (Ping on reply)> In reply to @Dudugz "``std/tables`` has a ``merge``": only for `CountTable`
00:19:04FromDiscord<Elegantbeef> Merging a table is ambiguous what you want
00:19:08FromDiscord<Elegantbeef> Iterate and do what you need to do
00:31:27*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
00:37:10*xet7 joined #nim
01:00:35FromDiscord<turtlebasket> Is there any documented way to use a custom gcc backend like `aarch64-elf-gcc`? All I can seem to find under the `--cc` flag is `gcc, switch_gcc, llvm_gcc, clang, bcc, vcc, tcc, env, icl, icc, clang_cl`
01:00:58FromDiscord<Elegantbeef> https://nim-lang.org/docs/nimc.html#crossminuscompilation might help
01:01:15FromDiscord<Elegantbeef> You need to make a config of some sort that sets the path exe and linker for the target
01:11:26FromDiscord<turtlebasket> other issue now (sorry lol), but what I'm trying to do is bootstrap a hello world OS under the `standlone` build target, but it looks like I'm missing a module called `panicoverride` - is this something that typically ships with the stdlib?
01:12:28FromDiscord<Elegantbeef> I think you should be using `--os:any` now
01:45:42FromDiscord<turtlebasket> interesting, that does change things but now I get `Error: Port memory manager to your platform`
01:45:43FromDiscord<turtlebasket> has `standalone` been deprecated?
01:45:45FromDiscord<Elegantbeef> `-d:useMalloc`
01:45:55FromDiscord<Elegantbeef> And use `--mm:orc` or `--mm:arc`
01:46:47FromDiscord<Elegantbeef> I don't think it's deprecated per se just
01:46:53FromDiscord<Elegantbeef> not as usable
01:47:06FromDiscord<turtlebasket> ah alright
01:47:12FromDiscord<turtlebasket> is there a distinction?
01:47:37*derpydoo joined #nim
01:47:49FromDiscord<Elegantbeef> Deprecation is an explicit act 😄
01:48:05FromDiscord<Elegantbeef> Trust me I do tons of self deprecating!
01:48:05FromDiscord<turtlebasket> also looks like specifying `arm.any.gcc.linkerexe` doesn't really do anything↵...am I looking at an old version of the docs at https://nim-lang.org/docs/nimc.html#crossminuscompilation ?
01:48:21FromDiscord<Elegantbeef> Are you targetting arm64?
01:48:25FromDiscord<turtlebasket> yup
01:48:26FromDiscord<Elegantbeef> If so you need `arm64.` i think
01:49:07FromDiscord<turtlebasket> ah looks like this got me past the linker-not-working errors
01:49:21FromDiscord<turtlebasket> I need to not include the stdlib since it's standalone but iirc that's just a flag I need to pass through to gcc
01:49:32FromDiscord<turtlebasket> thanks, that was a big help 👍️
02:37:29FromDiscord<ajim22> https://tenor.com/view/look-right-airplane-belligerent-smirk-gif-18907953
02:37:36FromDiscord<ajim22> nim
02:51:39FromDiscord<spoon> sent a code paste, see https://paste.rs/Ebu
02:53:58FromDiscord<Rika> Why the var?
02:53:59FromDiscord<spoon> ah, i believe it works for ref, so var is only procedure parameters and ref is used in object declarations?
02:54:02FromDiscord<Rika> Yes
02:54:06FromDiscord<spoon> odd
02:54:08FromDiscord<Rika> Kinda yeah
02:57:13FromDiscord<Elegantbeef> No borrow checker cannot be a field
03:30:16*lucasta quit (Quit: Leaving)
03:35:59*derpydoo quit (Ping timeout: 240 seconds)
04:56:32NimEventerNew thread by oyster: Feasible lib(s) to do FFT on image with minimal dependencies?, see https://forum.nim-lang.org/t/10195
05:59:15*lucasta joined #nim
06:44:08*azimut quit (Ping timeout: 240 seconds)
06:48:32NimEventerNew Nimble package! pretty - A pretty printer for Nim types, see https://github.com/treeform/pretty
06:51:42FromDiscord<ajusa> Is there a way for me to get the mangled name of a proc as it will appear in the JS backend? Eg, given a reference to myHandler, can I get the name of the proc (which will look something like myHandler_452985104) once it is compiled?
06:55:04FromDiscord<Elegantbeef> I do not think there is away
06:55:07FromDiscord<Elegantbeef> a way even
06:55:14FromDiscord<Elegantbeef> What are you doing that you need to care about that?
06:56:54FromDiscord<ajusa> I'm trying to wire up html that I generate (with an onclick attribute that is a string) to Nim code that I generate
06:57:13FromDiscord<Elegantbeef> So use `{.exportC.}`?
06:57:36FromDiscord<ajusa> Wondering if the better way is for me to use std/dom and stop generating the HTML as a string node and use something else instead, like document.createElement
06:58:15FromDiscord<ajusa> the problem is that the proc I want to call is in anther proc (closure), so I don't think there's actually a way to do this other than generating dom nodes in the JS backend
07:00:08FromDiscord<Elegantbeef> Hard to say
07:20:46*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
07:53:16*ehmry joined #nim
08:24:40*Notxor joined #nim
08:48:45*GreaseMonkey quit (Quit: No Ping reply in 180 seconds.)
08:49:17*Notxor quit (Remote host closed the connection)
08:50:02*greaser|q joined #nim
09:14:51*Notxor joined #nim
09:38:55FromDiscord<sOkam!> what's currently left for 2.0 release? 🤔
10:08:45NimEventerNew post on r/nim by AbbreviationsJust336: Bye guys!, see https://reddit.com/r/nim/comments/13h8byv/bye_guys/
10:11:37FromDiscord<Rika> Lol
10:16:52*greaser|q quit (Changing host)
10:16:52*greaser|q joined #nim
10:21:18*PMunch joined #nim
10:27:36FromDiscord<⚶ Zeno> In reply to @NimEventer "New post on r/nim": "no documentation" ? this guy probably didnt use nim long enough
10:28:54PMunchTBF the documentation isn't great
10:29:03FromDiscord<⚶ Zeno> thats true
10:29:25FromDiscord<leetnewb> Is that considered rage quitting?
10:30:04PMunchIt's okay if you know what you're looking for and where to find it. But there are very few examples of how to actually use a lot of stuff, and important details around edge cases in procs are often missing from the documentation
10:30:15PMunchHaha, yes I guess that's considered rage quitting
10:30:51PMunchCuriously they also seemed very adamant on quitting, and in the last sentence say that they will try again in a few years to see if the situation has improved :P
10:31:47FromDiscord<leetnewb> scared of committment
10:42:36FromDiscord<pysan> I find many `source` link in the official docs pointing to somewhere totally different. Why?? And will anybody not fix it?↵Example: https://nim-lang.org/docs/jsonutils.html#toJsonHook%2CStringTableRef
10:48:06*lucasta quit (Remote host closed the connection)
10:51:19PMunch@pysan, what happens here is that those links are automatically generated when the docs are generated, then the source on GitHub changes which changes the line references
10:52:11PMunchIt seems like the current docs are just tagged to the `version-1-6` branch and not to a specific 1.6.x version, so it's probably a bug with how the documentation was generated
10:53:35FromDiscord<0ffh> Also I dont want to throw shade on Dlang, but it's certainly not "bascially Nim".↵I used to use D1 quite a bit but I quit with the switch to D2 with e.g. it's excessive const madness making strings a pain to use.
10:54:13PMunchNever really tried D, but I think I ignored it because of the lack of macros?
10:55:04FromDiscord<0ffh> Don't know, there where certainly plans for macros but I don't know if or how the panned out.
10:55:13FromDiscord<pysan> If it's built for specific versions, shouldn't it be linking to a permalink?
10:55:16FromDiscord<0ffh> (edit) "the" => "they"
10:58:15FromDiscord<Rika> it should yes, thats what pmunch said
11:02:50FromDiscord<0ffh> In reply to @PMunch "Never really tried D,": I looked in the docs, the only reference to macros I can find is in the documentation generator.↵The documentation comment processor includes a simple macro text preprocessor. When $(NAME) appears in section text it is replaced with the corresponding NAME macro's replacement text. Macros can take arguments: $(NAME argument).
11:03:26FromDiscord<0ffh> So, yeah, seems like they dumped any plans they had for macros in the language.
11:04:58FromDiscord<0ffh> Walter wasn't very specific about those plans anyways and I think he even specifically said they were not a priority.
11:05:28FromDiscord<0ffh> More like some "thinking out loud" stuff on the list.
11:08:14PMunchSo yeah, it's like Nim, just with a completely different syntax and without one of its most important features
11:08:19PMunchPretty much the same thing
11:08:50PMunch@pysan, it should be permalinked, but it seems like the one who generated the docs did it from the wrong version tag
11:10:37PMunch@pysan, in fact if you change the link from using `version-1-6` to `v1.6.12` then they point to the right place
11:12:19PMunchI've raised it in the moderators chat, someone there should be able to sort it out
11:14:39FromDiscord<pysan> In reply to @PMunch "<@709256259437592627>, in fact if": Oh, I see. Didn’t notice that, thanks! I guess the `version-1-6` link comes up first when doing google search? That’s why I thought this was the only doc.
11:15:38PMunchI believe that's the main doc at the moment, so it is in fact a bug
11:16:13FromDiscord<sOkam!> sent a code paste, see https://paste.rs/i25
11:16:15PMunchI think there are some old docs around somewhere, but I was talking about changing the address found in the `source` link
11:16:37PMunchI really should get around to creating that documentation hub thing I've been wanting for ages
11:26:18FromDiscord<Tapeda> In reply to @PMunch "I really should get": Naybe call it Nimdex, a proper search/index of many sources of docs, nimble/doc gen integration would be neat, and when one really has free time a selectively fine-tuned AI assistant included.
11:28:10PMunchOoh, Nimdex, I like that
11:29:34PMunchThe idea was to use `nim jsondoc` to generate an easily machine-readable set of docs, then place that in a database with relations between all the types and such. Then set up a graphical front-end (i.e. website) which allows you to search for things, see all procs that has the same first argument, etc. etc.
11:30:10PMunchI was also thinking of doing a similar thing to Clojure where people are able to comment on each procedure, to add those much wanted examples
11:30:29PMunchPreferably with login through the forums so people don't have to make a separate account
11:30:54PMunchThen of course it would also be possible to integrate third party packages and such as well
11:31:08PMunchSince everything in Nim can be run through `nim jsondoc` :)
13:23:58FromDiscord<federico3> It already existed in nimble directory↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
13:24:42FromDiscord<federico3> it was indexing symbols and make them searchable
13:25:19FromDiscord<willyboar> Nimindex then
13:25:34FromDiscord<willyboar> Or nindex
13:27:55FromDiscord<zander> Does anyone know any good visualisation tools for Nim?
14:12:45*azimut joined #nim
14:15:43FromDiscord<Oscour> Hi everyone, I just installed Nim 2.0 RC2 in mys WSL session and was wondering if i needed to replace the nimble that came from my Nim 1.6.12 install?
14:15:49FromDiscord<Oscour> (edit) "mys" => "my"
14:15:57FromDiscord<Oscour> (edit) "i" => "I"
14:17:37NimEventerNew thread by oyster: Slice 3D Tensor into 2D Tensor in arraymancer?, see https://forum.nim-lang.org/t/10196
15:01:15*arkurious joined #nim
15:04:23*arkurious quit (Client Quit)
15:19:43PMunchPlaying with C in Nim is fun. Exceptions in a C callback are just ignored, and the entire program hangs :P
15:26:09FromDiscord<huantian> Fearless interop pmunch! Be fearless!
15:28:22PMunchWould be nice to have a friendlier `cdecl` option which put everything in a try/catch and crashed the program
16:23:54*PMunch quit (Quit: leaving)
16:25:17FromDiscord<leetnewb> In reply to @zander "Does anyone know any": I'm not sure, but did you check here: https://github.com/ringabout/awesome-nim
16:44:28FromDiscord<aquova> I have two separate enums that happen to have the same name for two items. The compiler throws an error saying that one of them is a redefinition of another. Is there any way around this, barring renaming them? For most languages the scoping of the name under the enum group is enough to differentiate between them
16:58:39FromDiscord<huantian> Check out overloadable enums
17:21:52FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4vPz
17:31:21*cm quit (Ping timeout: 256 seconds)
17:31:49*cm joined #nim
17:32:11FromDiscord<JJ> In reply to @NimEventer "New post on r/nim": "rust copy bitches" LMAO
17:33:49FromDiscord<JJ> that is now how i am describing the arc/orc memory system (in a good way)
17:41:03*krux02 joined #nim
17:45:54FromDiscord<Rika> In reply to @apropos ""rust copy bitches" LMAO": SMH we’re not copying we’re borrowing :InaTehe:
17:46:12FromDiscord<JJ> ahh you're right
17:46:26FromDiscord<JJ> i am certainly a copy bitch when writing rust however
17:46:56FromDiscord<gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPF
17:47:11FromDiscord<gloopsies> What is the best way to do something like this
17:47:47FromDiscord<gloopsies> (edit) "https://play.nim-lang.org/#ix=4vPF" => "https://play.nim-lang.org/#ix=4vPG"
17:48:19FromDiscord<Rika> The procedures must have the same signature, that is to say, that the parameters they take in must be the same, along with the return type
17:48:47FromDiscord<gloopsies> In reply to @Rika "The procedures must have": yeah that's not the problem, but I didn't find any documentation for something like this
17:50:09FromDiscord<Rika> `tuple[..., do: proc(arg: argtype, ...): rettype]`
17:50:26FromDiscord<Rika> But iirc "do" is a keyword?
17:50:37FromDiscord<Rika> So it’s likely better to use a different name
17:50:37FromDiscord<gloopsies> it was a stupid example
17:50:43FromDiscord<gloopsies> Thanks
17:55:15FromDiscord<gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPJ
17:55:29FromDiscord<gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPK
18:01:04FromDiscord<demotomohiro> In reply to @gloopsies "it was a stupid": Here is a ducumentation about procedural type and example code:↵https://nim-lang.org/docs/manual.html#types-procedural-type↵https://nim-lang.org/docs/manual.html#procedures-anonymous-procs
19:25:46*disso-peach joined #nim
19:26:21*rockcavera quit (Remote host closed the connection)
19:30:45*lucasta joined #nim
20:08:50FromDiscord<jtv> I've done a lot of assigning function pointers to things, and I've learned there are lots of internal flags that count as type info for equality there, that aren't obvious to the user
20:09:08FromDiscord<jtv> So you're much better off always explicitly casting anything you put in to the type you think it should be
20:09:53FromDiscord<jtv> @gloopsies ^
20:11:28FromDiscord<jtv> So generally I declare a type, the `sugar` module helps make that readable: `type MyFuncType = (int, int) -> void`
20:12:08FromDiscord<jtv> Then you cast like this: `MyFuncType(whateverObjectYouAreTryingToAssign)`
20:12:28FromDiscord<jtv> Well, it's technically a type conversion, not a cast
20:13:57FromDiscord<jtv> With this issue, the error messages basically never give you a hint as to the real problem 🙂
20:17:08FromDiscord<Goat> Speaking of types, suppose I want all the integers used to be `int8`. How explicit do I have to be for the compiler to catch on to that? Do I have to explicitly convert everything?
20:17:24FromDiscord<Elegantbeef> You use `int8` explicitly?
20:17:39FromDiscord<Elegantbeef> You can write a convert from `int8` to `int` but why would you want to
20:17:44FromDiscord<Elegantbeef> What are you trying to use int8 for?
20:18:13FromDiscord<Elegantbeef> For arrays you can do `array[int8, T]` or `array[uint8, T]`
20:19:35FromDiscord<jtv> Yeah not that performance usually matters, but you generally will lose more in performance than you gain in space. The compiler will either align to a 32-bit or 64-bit boundry anyway (in which case you didn't save space), or, if it doesn't, you'll end up having all sort of performance issues due to alignment issues.
20:19:42FromDiscord<jtv> Relatively speaking.
20:22:11FromDiscord<jtv> On x86 it's generally not even going to allow unaligned accesses, so the extra space will be there like it or not 🙂
20:23:37FromDiscord<demotomohiro> If you cross compile to 8bit cpu, all int type would be 8bits.↵But does Nim supports 8bit cpu?
20:24:24FromDiscord<demotomohiro> all int type variable
20:25:13FromDiscord<Goat> I'm not even trying to be efficient with space or memory. I'm just playing and trying to see how much I can do with them because I'm curious and masochistic.
20:25:34FromDiscord<Dale> 8bit like a z80 or 6502?
20:27:21FromDiscord<Elegantbeef> I think you can use nim with llvm-mos
20:27:32FromDiscord<Dale> If you use the C compile path it’s theoretically possible
20:27:43FromDiscord<Nerve> In reply to @PMunch "I really should get": Wait, this sounds like clojuredocs.org, is that what you're envisioning?
20:29:34*lucasta quit (Quit: Leaving)
20:59:14FromDiscord<BoomBang> Do any of you guys know how to turn a YAML file into a dictionary?'
20:59:36FromDiscord<BoomBang> (edit) "dictionary?'" => "dictionary?"
21:00:05FromDiscord<Elegantbeef> https://nimyaml.org/
21:43:16FromDiscord<BoomBang> after 12 years
21:43:21FromDiscord<BoomBang> i have made it work
21:48:08FromDiscord<gloopsies> In reply to @jtv "So generally I declare": I've got it working by explicitly using `{. nimcall .}` but trying to use sugar just gives me many more errors and it doesn't make it that different so I don't really bother with it
21:48:29*derpydoo joined #nim
21:48:33FromDiscord<gloopsies> (without casting)
21:48:50FromDiscord<jtv> The type conversion is the thing that's going to be more general purpose and important when you hit similar issues
21:49:20FromDiscord<jtv> In this case, seems like you had closure vs nimcall as a type issue, but I've had it be a bunch of other random things
21:49:56FromDiscord<jtv> Best to learn to deal w/ it in the general way where you don't have to worry about figuring out what magic pragma you need to add
21:54:54NimEventerNew thread by pixel: Does arc deep copy spawn parameters?, see https://forum.nim-lang.org/t/10197
21:58:25FromDiscord<!&luke> What's the fastest xml parser for nim
22:04:57*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
22:07:49*Lord_Nightmare joined #nim
22:08:24FromDiscord<Elegantbeef> Is there more than one?
22:09:20*lucasta joined #nim
22:24:53*Notxor quit (Remote host closed the connection)
22:33:02FromDiscord<!&luke> Does the stdlib one have serialization
23:06:12*progranner joined #nim
23:10:10*krux02 quit (Remote host closed the connection)
23:13:12*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
23:17:28*progranner joined #nim
23:19:48*progranner quit (Client Quit)
23:20:28*progranner joined #nim
23:22:54*progranner quit (Client Quit)
23:26:10*progranner joined #nim
23:29:15*disso-peach quit (Quit: Leaving)
23:29:37*progranner quit (Client Quit)
23:38:23*dza quit (Quit: )
23:42:26*dza joined #nim