00:10:54 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:12:35 | * | progranner joined #nim |
00:18:38 | FromDiscord | <Nlits (Ping on reply)> In reply to @Dudugz "``std/tables`` has a ``merge``": only for `CountTable` |
00:19:04 | FromDiscord | <Elegantbeef> Merging a table is ambiguous what you want |
00:19:08 | FromDiscord | <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:35 | FromDiscord | <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:58 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/nimc.html#crossminuscompilation might help |
01:01:15 | FromDiscord | <Elegantbeef> You need to make a config of some sort that sets the path exe and linker for the target |
01:11:26 | FromDiscord | <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:28 | FromDiscord | <Elegantbeef> I think you should be using `--os:any` now |
01:45:42 | FromDiscord | <turtlebasket> interesting, that does change things but now I get `Error: Port memory manager to your platform` |
01:45:43 | FromDiscord | <turtlebasket> has `standalone` been deprecated? |
01:45:45 | FromDiscord | <Elegantbeef> `-d:useMalloc` |
01:45:55 | FromDiscord | <Elegantbeef> And use `--mm:orc` or `--mm:arc` |
01:46:47 | FromDiscord | <Elegantbeef> I don't think it's deprecated per se just |
01:46:53 | FromDiscord | <Elegantbeef> not as usable |
01:47:06 | FromDiscord | <turtlebasket> ah alright |
01:47:12 | FromDiscord | <turtlebasket> is there a distinction? |
01:47:37 | * | derpydoo joined #nim |
01:47:49 | FromDiscord | <Elegantbeef> Deprecation is an explicit act 😄 |
01:48:05 | FromDiscord | <Elegantbeef> Trust me I do tons of self deprecating! |
01:48:05 | FromDiscord | <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:21 | FromDiscord | <Elegantbeef> Are you targetting arm64? |
01:48:25 | FromDiscord | <turtlebasket> yup |
01:48:26 | FromDiscord | <Elegantbeef> If so you need `arm64.` i think |
01:49:07 | FromDiscord | <turtlebasket> ah looks like this got me past the linker-not-working errors |
01:49:21 | FromDiscord | <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:32 | FromDiscord | <turtlebasket> thanks, that was a big help 👍️ |
02:37:29 | FromDiscord | <ajim22> https://tenor.com/view/look-right-airplane-belligerent-smirk-gif-18907953 |
02:37:36 | FromDiscord | <ajim22> nim |
02:51:39 | FromDiscord | <spoon> sent a code paste, see https://paste.rs/Ebu |
02:53:58 | FromDiscord | <Rika> Why the var? |
02:53:59 | FromDiscord | <spoon> ah, i believe it works for ref, so var is only procedure parameters and ref is used in object declarations? |
02:54:02 | FromDiscord | <Rika> Yes |
02:54:06 | FromDiscord | <spoon> odd |
02:54:08 | FromDiscord | <Rika> Kinda yeah |
02:57:13 | FromDiscord | <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:32 | NimEventer | New 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:32 | NimEventer | New Nimble package! pretty - A pretty printer for Nim types, see https://github.com/treeform/pretty |
06:51:42 | FromDiscord | <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:04 | FromDiscord | <Elegantbeef> I do not think there is away |
06:55:07 | FromDiscord | <Elegantbeef> a way even |
06:55:14 | FromDiscord | <Elegantbeef> What are you doing that you need to care about that? |
06:56:54 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> So use `{.exportC.}`? |
06:57:36 | FromDiscord | <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:15 | FromDiscord | <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:08 | FromDiscord | <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:55 | FromDiscord | <sOkam!> what's currently left for 2.0 release? 🤔 |
10:08:45 | NimEventer | New post on r/nim by AbbreviationsJust336: Bye guys!, see https://reddit.com/r/nim/comments/13h8byv/bye_guys/ |
10:11:37 | FromDiscord | <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:36 | FromDiscord | <⚶ Zeno> In reply to @NimEventer "New post on r/nim": "no documentation" ? this guy probably didnt use nim long enough |
10:28:54 | PMunch | TBF the documentation isn't great |
10:29:03 | FromDiscord | <⚶ Zeno> thats true |
10:29:25 | FromDiscord | <leetnewb> Is that considered rage quitting? |
10:30:04 | PMunch | It'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:15 | PMunch | Haha, yes I guess that's considered rage quitting |
10:30:51 | PMunch | Curiously 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:47 | FromDiscord | <leetnewb> scared of committment |
10:42:36 | FromDiscord | <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:19 | PMunch | @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:11 | PMunch | It 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:35 | FromDiscord | <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:13 | PMunch | Never really tried D, but I think I ignored it because of the lack of macros? |
10:55:04 | FromDiscord | <0ffh> Don't know, there where certainly plans for macros but I don't know if or how the panned out. |
10:55:13 | FromDiscord | <pysan> If it's built for specific versions, shouldn't it be linking to a permalink? |
10:55:16 | FromDiscord | <0ffh> (edit) "the" => "they" |
10:58:15 | FromDiscord | <Rika> it should yes, thats what pmunch said |
11:02:50 | FromDiscord | <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:26 | FromDiscord | <0ffh> So, yeah, seems like they dumped any plans they had for macros in the language. |
11:04:58 | FromDiscord | <0ffh> Walter wasn't very specific about those plans anyways and I think he even specifically said they were not a priority. |
11:05:28 | FromDiscord | <0ffh> More like some "thinking out loud" stuff on the list. |
11:08:14 | PMunch | So yeah, it's like Nim, just with a completely different syntax and without one of its most important features |
11:08:19 | PMunch | Pretty much the same thing |
11:08:50 | PMunch | @pysan, it should be permalinked, but it seems like the one who generated the docs did it from the wrong version tag |
11:10:37 | PMunch | @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:19 | PMunch | I've raised it in the moderators chat, someone there should be able to sort it out |
11:14:39 | FromDiscord | <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:38 | PMunch | I believe that's the main doc at the moment, so it is in fact a bug |
11:16:13 | FromDiscord | <sOkam!> sent a code paste, see https://paste.rs/i25 |
11:16:15 | PMunch | I think there are some old docs around somewhere, but I was talking about changing the address found in the `source` link |
11:16:37 | PMunch | I really should get around to creating that documentation hub thing I've been wanting for ages |
11:26:18 | FromDiscord | <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:10 | PMunch | Ooh, Nimdex, I like that |
11:29:34 | PMunch | The 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:10 | PMunch | I 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:29 | PMunch | Preferably with login through the forums so people don't have to make a separate account |
11:30:54 | PMunch | Then of course it would also be possible to integrate third party packages and such as well |
11:31:08 | PMunch | Since everything in Nim can be run through `nim jsondoc` :) |
13:23:58 | FromDiscord | <federico3> It already existed in nimble directory↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
13:24:42 | FromDiscord | <federico3> it was indexing symbols and make them searchable |
13:25:19 | FromDiscord | <willyboar> Nimindex then |
13:25:34 | FromDiscord | <willyboar> Or nindex |
13:27:55 | FromDiscord | <zander> Does anyone know any good visualisation tools for Nim? |
14:12:45 | * | azimut joined #nim |
14:15:43 | FromDiscord | <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:49 | FromDiscord | <Oscour> (edit) "mys" => "my" |
14:15:57 | FromDiscord | <Oscour> (edit) "i" => "I" |
14:17:37 | NimEventer | New 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:43 | PMunch | Playing with C in Nim is fun. Exceptions in a C callback are just ignored, and the entire program hangs :P |
15:26:09 | FromDiscord | <huantian> Fearless interop pmunch! Be fearless! |
15:28:22 | PMunch | Would 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:17 | FromDiscord | <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:28 | FromDiscord | <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:39 | FromDiscord | <huantian> Check out overloadable enums |
17:21:52 | FromDiscord | <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:11 | FromDiscord | <JJ> In reply to @NimEventer "New post on r/nim": "rust copy bitches" LMAO |
17:33:49 | FromDiscord | <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:54 | FromDiscord | <Rika> In reply to @apropos ""rust copy bitches" LMAO": SMH we’re not copying we’re borrowing :InaTehe: |
17:46:12 | FromDiscord | <JJ> ahh you're right |
17:46:26 | FromDiscord | <JJ> i am certainly a copy bitch when writing rust however |
17:46:56 | FromDiscord | <gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPF |
17:47:11 | FromDiscord | <gloopsies> What is the best way to do something like this |
17:47:47 | FromDiscord | <gloopsies> (edit) "https://play.nim-lang.org/#ix=4vPF" => "https://play.nim-lang.org/#ix=4vPG" |
17:48:19 | FromDiscord | <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:47 | FromDiscord | <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:09 | FromDiscord | <Rika> `tuple[..., do: proc(arg: argtype, ...): rettype]` |
17:50:26 | FromDiscord | <Rika> But iirc "do" is a keyword? |
17:50:37 | FromDiscord | <Rika> So it’s likely better to use a different name |
17:50:37 | FromDiscord | <gloopsies> it was a stupid example |
17:50:43 | FromDiscord | <gloopsies> Thanks |
17:55:15 | FromDiscord | <gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPJ |
17:55:29 | FromDiscord | <gloopsies> sent a code paste, see https://play.nim-lang.org/#ix=4vPK |
18:01:04 | FromDiscord | <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:50 | FromDiscord | <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:08 | FromDiscord | <jtv> So you're much better off always explicitly casting anything you put in to the type you think it should be |
20:09:53 | FromDiscord | <jtv> @gloopsies ^ |
20:11:28 | FromDiscord | <jtv> So generally I declare a type, the `sugar` module helps make that readable: `type MyFuncType = (int, int) -> void` |
20:12:08 | FromDiscord | <jtv> Then you cast like this: `MyFuncType(whateverObjectYouAreTryingToAssign)` |
20:12:28 | FromDiscord | <jtv> Well, it's technically a type conversion, not a cast |
20:13:57 | FromDiscord | <jtv> With this issue, the error messages basically never give you a hint as to the real problem 🙂 |
20:17:08 | FromDiscord | <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:24 | FromDiscord | <Elegantbeef> You use `int8` explicitly? |
20:17:39 | FromDiscord | <Elegantbeef> You can write a convert from `int8` to `int` but why would you want to |
20:17:44 | FromDiscord | <Elegantbeef> What are you trying to use int8 for? |
20:18:13 | FromDiscord | <Elegantbeef> For arrays you can do `array[int8, T]` or `array[uint8, T]` |
20:19:35 | FromDiscord | <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:42 | FromDiscord | <jtv> Relatively speaking. |
20:22:11 | FromDiscord | <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:37 | FromDiscord | <demotomohiro> If you cross compile to 8bit cpu, all int type would be 8bits.↵But does Nim supports 8bit cpu? |
20:24:24 | FromDiscord | <demotomohiro> all int type variable |
20:25:13 | FromDiscord | <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:34 | FromDiscord | <Dale> 8bit like a z80 or 6502? |
20:27:21 | FromDiscord | <Elegantbeef> I think you can use nim with llvm-mos |
20:27:32 | FromDiscord | <Dale> If you use the C compile path it’s theoretically possible |
20:27:43 | FromDiscord | <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:14 | FromDiscord | <BoomBang> Do any of you guys know how to turn a YAML file into a dictionary?' |
20:59:36 | FromDiscord | <BoomBang> (edit) "dictionary?'" => "dictionary?" |
21:00:05 | FromDiscord | <Elegantbeef> https://nimyaml.org/ |
21:43:16 | FromDiscord | <BoomBang> after 12 years |
21:43:21 | FromDiscord | <BoomBang> i have made it work |
21:48:08 | FromDiscord | <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:33 | FromDiscord | <gloopsies> (without casting) |
21:48:50 | FromDiscord | <jtv> The type conversion is the thing that's going to be more general purpose and important when you hit similar issues |
21:49:20 | FromDiscord | <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:56 | FromDiscord | <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:54 | NimEventer | New thread by pixel: Does arc deep copy spawn parameters?, see https://forum.nim-lang.org/t/10197 |
21:58:25 | FromDiscord | <!&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:24 | FromDiscord | <Elegantbeef> Is there more than one? |
22:09:20 | * | lucasta joined #nim |
22:24:53 | * | Notxor quit (Remote host closed the connection) |
22:33:02 | FromDiscord | <!&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 |