00:49:32 | FromDiscord | <Zoom> Dont you expect `os/normalizePath` to deal with separators? I'm reading data created on Win and `fileExists` can't find files due to backslashes. |
01:20:19 | * | lumo_e quit (Quit: Quit) |
01:40:08 | FromDiscord | <ynfle> In reply to @Zoom "Dont you expect `os/normalizePath`": Have you tried the `/` proc? |
01:44:34 | * | cyraxjoe joined #nim |
01:47:17 | * | cyraxjoe quit (Client Quit) |
01:55:48 | * | cyraxjoe joined #nim |
02:32:58 | FromDiscord | <ajusa> I just tried VS Code with saem's extension↵how have I been living without autocomplete, this is amazing |
02:35:48 | * | lumo_e joined #nim |
02:38:12 | FromDiscord | <Elegantbeef> Lol |
02:38:21 | FromDiscord | <Elegantbeef> It's the future |
02:38:47 | FromDiscord | <Elegantbeef> Sadly though autocomplete stumbles a bit with complex files that futhark likes to generate 😄 |
02:53:08 | FromDiscord | <!Patitotective> nimlsp crashes every 5 minutes for me :[ |
02:58:57 | FromDiscord | <ajusa> yeah I've been avoiding templates/macros to keep nimlsp happy as I've heard of the issues |
02:58:57 | FromDiscord | <Elegantbeef> There is that status made LSP server aswell, no clue how well it works |
02:59:46 | FromDiscord | <Yardanico> In reply to @Elegantbeef "There is that status": It uses nimsuggest as a server |
02:59:51 | FromDiscord | <Yardanico> as a process I mean |
03:00:02 | FromDiscord | <Elegantbeef> I mean yea i dont know if it works any better |
03:00:34 | FromDiscord | <Elegantbeef> I know it uses nimsuggest just dont know if it actually solves the issues people face 😄 |
03:00:45 | FromDiscord | <Elegantbeef> I know there is that big showstopper that no one is looking into with nimsuggest |
03:02:08 | FromDiscord | <Elegantbeef> I say no one but i did try to fix it but cannot reason how to |
03:03:39 | FromDiscord | <👾 br4n_d0n> Anyone have a link to the documentation or code where the core language is? I'm curious to look through how things like `` proc `` etc. are defined |
03:03:59 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#procedures |
03:04:14 | FromDiscord | <ajusa> sent a code paste, see https://paste.rs/NLt |
03:04:28 | FromDiscord | <👾 br4n_d0n> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#procedures": Sorry, meant source code; actual Nim files |
03:04:39 | FromDiscord | <Elegantbeef> `semProcAux` inside the nim compiler |
03:04:42 | FromDiscord | <ajusa> oh I don't actually need this, I can just do $3 and move on |
03:04:47 | FromDiscord | <Elegantbeef> It's not very readable but saem did clean it up |
03:05:32 | FromDiscord | <Elegantbeef> It's probably easier to look at `macros.dumptree` than look at the compiler code |
03:05:47 | FromDiscord | <Elegantbeef> That will show the AST and it's much easier to understand than the compiler imo |
03:06:41 | FromDiscord | <👾 br4n_d0n> OK, thanks |
03:08:08 | FromDiscord | <Elegantbeef> I dont even know what you're doing↵(@ajusa) |
03:08:52 | FromDiscord | <ajusa> what I was going for was avoiding converting the last bit (the openarray[(string, string)]) manually, and have the compiler apply $ as needed |
03:09:31 | FromDiscord | <Elegantbeef> Well then make one that actually matches 😄 |
03:10:35 | FromDiscord | <ajusa> well the other issue is that I wanted to be able to mix and match the value types, eg {"q": 3, "m": "test"} which I realize isn't possible |
03:10:46 | FromDiscord | <Elegantbeef> It should be |
03:12:28 | FromDiscord | <Elegantbeef> Aslong as the first is `(string, string)` it 'should' work |
03:12:52 | FromDiscord | <Elegantbeef> Uhh nevermind |
03:14:51 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3ZAM the normal `[]` syntax does work |
03:14:55 | FromDiscord | <Elegantbeef> the table constr is silly |
03:18:17 | FromDiscord | <ajusa> hm interesting |
03:19:02 | FromDiscord | <ajusa> you basically need to apply the converter once if I'm reading this right |
03:19:24 | FromDiscord | <ajusa> (edit) "you basically need to apply the converter once ... if" added "to get it to apply to the remaining elements" |
03:20:13 | FromDiscord | <Elegantbeef> Well arrays attempt to convert to the first element |
03:20:23 | FromDiscord | <Elegantbeef> `[3u8, 10, 20, 30, 40, 50]` for instance |
03:20:39 | FromDiscord | <ajusa> Ah, that's right I forgot about that |
03:20:42 | FromDiscord | <Elegantbeef> This doesnt work with `{}` syntax apparently |
03:49:05 | * | lumo_e quit (Quit: Quit) |
04:09:19 | * | rockcavera quit (Remote host closed the connection) |
04:48:35 | FromDiscord | <NimYT> hmm |
05:36:46 | FromDiscord | <Yardanico> fun question from another nim chat https://play.nim-lang.org/#ix=3ZAE |
05:36:53 | FromDiscord | <Yardanico> @beef do you know if this is supposed to work or not? |
05:38:58 | FromDiscord | <Elegantbeef> `nimvm` magic causes this issue |
05:40:45 | FromDiscord | <Elegantbeef> Hmm i dont know if it should work |
05:41:31 | FromDiscord | <Elegantbeef> Seems `nimvm` doesnt properly cull the other trees...? |
05:42:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZB9 |
05:42:52 | FromDiscord | <Elegantbeef> So seems it doesnt properly cull the pragma syntax |
05:43:28 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZBa |
05:46:16 | FromDiscord | <jmgomez> In reply to @Elegantbeef "<@726017160115126333>\: consider looking at": Will do. Thanks! |
05:47:55 | FromDiscord | <Elegantbeef> No problem it's not overly complicated, just adds a procedure to a table then emits it after a user calls a macro |
05:48:00 | FromDiscord | <Elegantbeef> You could in your case use a custom pragma then just search for it and emit a procedure after |
05:50:11 | FromDiscord | <Elegantbeef> Yea yardanico having a cursory look at the `semWhen` logic it seems it doesnt properly cull if the `when nimVm` is true |
05:50:19 | FromDiscord | <Elegantbeef> `# when nimvm is not elimited until codegen` |
05:52:11 | FromDiscord | <Elegantbeef> Which of course means all compiler magic is used without issue |
05:53:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZBe |
05:54:18 | FromDiscord | <Elegantbeef> The above working should be enough to say it's certainly a bug imo |
06:00:46 | FromDiscord | <jmgomez> Yes, I have to think about if that’s the way I want to approach it or to just made up another keyword for it. It should be possible to create a macro that “replaces” type and in there I guess you can fully manipulate the ast, right? |
06:03:01 | FromDiscord | <Elegantbeef> You can mutate the AST but you have to return a typedef if you're using a typesection macro |
06:03:11 | FromDiscord | <Elegantbeef> So you cannot add procedures and the like |
06:03:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZBh |
06:08:46 | FromDiscord | <jmgomez> Ok! Any examples out there on a typesection? |
06:10:09 | FromDiscord | <Elegantbeef> `dumptree` |
06:10:28 | FromDiscord | <Elegantbeef> I think polymorph uses them but it'll be quite confusing to look at |
06:13:25 | FromDiscord | <jmgomez> 👍 |
06:37:25 | NimEventer | New thread by Bather: Sisix dev fail in nimvm with fatal pragma, see https://forum.nim-lang.org/t/9214 |
06:39:20 | * | ltriant quit (Ping timeout: 255 seconds) |
06:41:12 | * | ltriant joined #nim |
06:45:09 | * | PMunch joined #nim |
07:24:58 | FromDiscord | <NimYT> hmm |
08:02:08 | NimEventer | New Nimble package! LimDB - A wrapper for LMDB the Lightning Memory-Mapped Database, see https://github.com/capocasa/limdb |
08:04:23 | * | pro joined #nim |
09:02:57 | FromDiscord | <Paul (pmo) ♗> sent a long message, see http://ix.io/3ZBH |
09:04:07 | FromDiscord | <Elegantbeef> are you using orc/arc? |
09:06:52 | PMunch | Paul_(pmo)_♗, destructors can be a bit tricky to implement, because if you don't do it correctly then Nim will silently create a destructor for you which will be called instead of yours |
09:07:08 | FromDiscord | <Elegantbeef> The issue here looking at their code is just refc |
09:07:23 | PMunch | I guess it should be an error to define a destructor if Nim has already implicitly defined one |
09:07:25 | FromDiscord | <Elegantbeef> Refc isnt deterministic and what's more is you're using it on a global variable |
09:07:31 | PMunch | Ah, that is also possible |
09:07:33 | FromDiscord | <Elegantbeef> It is indeed |
09:08:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZBI |
09:09:05 | FromDiscord | <Elegantbeef> Global variables are funky when it comes to destructors/movesemantics |
09:09:20 | FromDiscord | <Elegantbeef> Infact internals chat just mentioned it 😛 |
09:10:16 | FromDiscord | <Elegantbeef> Fuck pmunch you couldnt get on earlier... now i cant remember what i was going to ask you 😛 |
09:11:51 | FromDiscord | <Elegantbeef> Thinking about it i think i had an issue with a library i wrapped with futhark but it was indeed just the way the library worked that was the issue |
09:16:37 | PMunch | I've been on for three hours already! |
09:16:55 | FromDiscord | <Elegantbeef> Hey how am i supposed to know i dont speak irc |
09:17:01 | PMunch | Not my fault you don't check IRC join messages :P |
09:17:23 | FromDiscord | <Elegantbeef> I mean this was a few days ago now |
09:17:32 | FromDiscord | <Elegantbeef> So it's best for everyone |
09:17:48 | FromDiscord | <Elegantbeef> You didnt get asked an inane question that wasnt related to your code |
09:18:08 | FromDiscord | <Elegantbeef> Though i still have to annoyingly duplicate all the types for destructors |
09:33:22 | * | krux02 quit (Remote host closed the connection) |
10:57:04 | * | arkurious joined #nim |
11:23:29 | FromDiscord | <NimYT> hmmm bots are getting real smart |
11:31:08 | PMunch | @Elegantbeef, duplicate them? |
12:00:10 | FromDiscord | <hyperreal> Hi all, I'm new to Nim. With regard to dependency-free executables that don't require a vm, does this mean that Nim programs can be executed on any machine without needing Nim installed? And does this mean it's also architecture-agnostic? |
12:00:42 | pro | it compiles to C, so people run it on microcontrollers even |
12:01:22 | PMunch | @hyperreal, you definitely don't need Nim installed, but it's not architecture-agnostic. You need to compile for the architecture you're targeting |
12:01:44 | FromDiscord | <hyperreal> Ah okay |
12:01:47 | PMunch | And I'm one of those people who run it on microcontrollers. Smallest I've run it on this far is an Attiny85 |
12:01:56 | FromDiscord | <hyperreal> Nice |
12:02:33 | pro | you can use kvm/qemu to spin a different arhitecture vm, and just compile nim on it (to speed things up if you're compiling something for raspberry lets say) |
12:20:18 | * | jjido joined #nim |
12:21:05 | FromDiscord | <demotomohiro> I think virtual machines are for architecture-agnostic executables like Java vm. |
12:40:29 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:45:30 | * | xet7 quit (Ping timeout: 240 seconds) |
12:51:28 | FromDiscord | <Cobalt> Virtual machines are just software that virtually emulates the execution of code on a certain machine.↵This machine can have an arbitrary architecture and hardware. A VM may be used to execute foreign code for a pseudo device, like compiled java bytecode for the jvm, on a host machine or to emulate another 'real' device, e.g., a raspberry pi.↵(@demotomohiro) |
12:52:41 | FromDiscord | <Cobalt> You can use a VM that emulates arm64 to compile for arm64 on a x86 machine (if direct cross compilation isn't an option). |
13:01:35 | FromDiscord | <Zoom> How is it relevant? It joins parts of the file, and I want to conform already formed path to the platform requirements with `normalizedPath`↵(@ynfle) |
13:11:43 | FromDiscord | <ynfle> How do you form the path? |
13:25:05 | FromDiscord | <Tepaxyz> I have a small problem, I could not find how to slice a sequence: https://play.nim-lang.org/#ix=3ZCq Any pointers? |
13:26:23 | FromDiscord | <Yardanico> .. is used for slices, just don't forget they're inclusive in Nim |
13:26:24 | FromDiscord | <Rika> “0..<2” |
13:26:29 | FromDiscord | <Rika> In the ??? |
13:26:40 | FromDiscord | <Yardanico> In reply to @Rika "“0..<2”": or 0..1 :) |
13:27:03 | FromDiscord | <NimYT> hmm |
13:27:08 | FromDiscord | <Rika> Yes that would be the preferred way |
13:27:26 | FromDiscord | <Tepaxyz> I could sware I already tried .. but will try again, thanks |
13:27:59 | FromDiscord | <Tepaxyz> Maybe I wrote :: 😄 |
13:28:10 | FromDiscord | <Yardanico> In reply to @Tepaxyz "I could sware I": It probably didn't compile because you used join the wrong way (like in the comment you have) |
13:28:40 | FromDiscord | <Yardanico> In Nim join takes the array/sequence as the first argument and separator as the second |
13:28:44 | FromDiscord | <Yardanico> I mean strutils one |
13:29:17 | FromDiscord | <Yardanico> so b.split()[0..1].join(" ") |
13:29:36 | FromDiscord | <NimYT> anyone got any cool scripts i could run |
13:30:17 | * | rockcavera joined #nim |
13:30:17 | * | rockcavera quit (Changing host) |
13:30:17 | * | rockcavera joined #nim |
13:31:46 | FromDiscord | <Tepaxyz> @Yardanico yes, now it works! Thanks everyone 🙂 https://play.nim-lang.org/#ix=3ZCr |
13:54:43 | * | pro quit (Quit: WeeChat 3.5) |
13:56:24 | FromDiscord | <Zoom> I don't. If you're interested, I process files from a crossplatform program which may use different separators depending on the OS it ran on.↵(@ynfle) |
14:08:38 | FromDiscord | <hyperreal> what do you all recommend for syntax highlighting in Neovim? |
14:08:58 | * | PMunch quit (Quit: Leaving) |
14:13:49 | FromDiscord | <justanotherinternetguy> In reply to @hyperreal "what do you all": i use https://github.com/zah/nim.vim |
14:27:28 | FromDiscord | <Luckayla> I just use the newer extension in vs code |
14:38:06 | FromDiscord | <Yardanico> In reply to @Luckayla "I just use the": vscode isn't neovim :) |
14:38:21 | FromDiscord | <Yardanico> In reply to @hyperreal "what do you all": https://github.com/alaviss/nim.nvim |
14:45:40 | FromDiscord | <Luckayla> In reply to @Yardanico "vscode isn't neovim :)": Ah that's my bad, I missed the neovim part |
15:11:02 | NimEventer | New thread by TKD: Default values for type(object) fields, see https://forum.nim-lang.org/t/9215 |
15:12:46 | FromDiscord | <Yardanico> Lol didn't know this exists |
15:12:47 | FromDiscord | <Yardanico> https://github.com/JuliaComputingOSS/llvm-cbe |
15:12:58 | FromDiscord | <Yardanico> C backend for LLVM |
15:13:54 | FromDiscord | <Yardanico> So you can compile languages that use LLVM via C compilers by using this |
15:33:35 | FromDiscord | <windowsboy111> sent a code paste, see https://play.nim-lang.org/#ix=3ZD3 |
15:39:15 | FromDiscord | <windowsboy111> sent a code paste, see https://paste.rs/uA5 |
15:39:38 | FromDiscord | <Yepoleb> are you actually calling `new result` or `result = new Formula` in your proc? |
15:39:57 | FromDiscord | <windowsboy111> In reply to @Yepoleb "are you actually calling": never called it |
15:39:59 | FromDiscord | <Yepoleb> the default value of a ref object is nil |
15:40:39 | FromDiscord | <windowsboy111> I didn't ask for a ref object though, or does it make one automatically |
15:40:51 | * | derpydoo joined #nim |
15:41:03 | FromDiscord | <Yepoleb> Formula is a `ref object of RootObj` |
15:41:10 | FromDiscord | <Yepoleb> so it's always a ref |
15:41:25 | FromDiscord | <windowsboy111> oh I see |
15:41:35 | FromDiscord | <windowsboy111> I thought the nil thing only applies to attributes |
15:42:53 | FromDiscord | <Yepoleb> all newSomething functions need a `new` call somewhere in it |
15:43:06 | FromDiscord | <Yepoleb> (edit) "all newSomething functions ... need" added "for ref objects" |
15:43:21 | FromDiscord | <Yepoleb> you don't need it for non-ref types |
16:05:16 | * | tiorock joined #nim |
16:05:16 | * | tiorock quit (Changing host) |
16:05:16 | * | tiorock joined #nim |
16:05:16 | * | rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services))) |
16:05:16 | * | tiorock is now known as rockcavera |
16:06:09 | FromDiscord | <d4rckh> https://media.discordapp.net/attachments/371759389889003532/983763804368298044/unknown.png |
16:06:18 | FromDiscord | <d4rckh> im getting this error when i try to compile my program to 32 bit |
16:08:53 | FromDiscord | <Generic> did you pass --cpu:i386 ? |
16:11:54 | FromDiscord | <d4rckh> yes |
16:13:22 | FromDiscord | <hyperreal> So like, Golang people are called Gophers, Python people are called Pythonistas, Rust people are called Rustaceans. So are Nim people called...Nimrods? lol |
16:14:34 | Amun-Ra | we are Knights Who Say Nii(m)! |
16:17:07 | FromDiscord | <hyperreal> Ah lol |
16:17:21 | FromDiscord | <Yardanico> In reply to @d4rckh "im getting this error": You have to tell the C compiler to compile to 32-bit |
16:17:29 | FromDiscord | <Yardanico> Pass -m32 to the C compiler and linker |
16:18:09 | FromDiscord | <d4rckh> thanks |
16:18:15 | FromDiscord | <d4rckh> i compiled it successfully |
16:18:20 | FromDiscord | <LoopeyLine> Is anyone still maintaining the nim bindings for godot? |
16:18:22 | FromDiscord | <d4rckh> wait no |
16:18:46 | FromDiscord | <d4rckh> https://media.discordapp.net/attachments/371759389889003532/983766979498352671/unknown.png |
16:18:51 | FromDiscord | <d4rckh> its failing to link it now |
16:19:02 | FromDiscord | <Yardanico> are you sure? |
16:19:06 | FromDiscord | <Yardanico> Those are just warnings |
16:19:13 | FromDiscord | <Yardanico> Check the output below |
16:19:22 | FromDiscord | <d4rckh> the error was midway |
16:19:23 | FromDiscord | <d4rckh> lol |
16:19:32 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3ZDc |
16:20:15 | FromDiscord | <Yardanico> maybe your compiler is 64-bir only then |
16:20:29 | FromDiscord | <Yardanico> but most 64-bit mingw distributions are multiliv |
16:20:36 | FromDiscord | <Yardanico> (edit) "multiliv" => "multilib" |
16:20:43 | FromDiscord | <d4rckh> im using whatever choosenim downloaded |
16:21:42 | FromDiscord | <Yardanico> looks like it doesn't have 32 bit version then |
16:21:54 | FromDiscord | <d4rckh> how do i get a multilib one? |
16:21:57 | FromDiscord | <d4rckh> (edit) "one?" => "mingw?" |
16:22:48 | FromDiscord | <Yardanico> install some other mingw |
16:22:57 | FromDiscord | <Yardanico> mingw-w64 |
16:23:00 | FromDiscord | <Yardanico> tdm-gcc |
16:23:01 | FromDiscord | <Yardanico> etc |
16:28:04 | FromDiscord | <Generic> In reply to @hyperreal "So like, Golang people": Nimmers seems is the one I've seen the most |
16:30:56 | FromDiscord | <Rika> nimion is common too |
16:36:25 | FromDiscord | <Generic> who's nimion are we? |
16:36:51 | FromDiscord | <hyperreal> The Great and Powerful Nim |
16:38:17 | FromDiscord | <Luckayla> I feel like nimion is a good one |
16:38:43 | FromDiscord | <Luckayla> Nimmer just feels weird to say and I feel like id get weird looks if I said it in public |
16:40:55 | FromDiscord | <Luckayla> I'm only on day two of trying out nim. Though as a 13 year python user it feels really nice to use |
16:48:52 | * | vicecea quit (Remote host closed the connection) |
16:49:26 | * | vicecea joined #nim |
16:50:44 | * | rockcavera quit (Remote host closed the connection) |
16:51:59 | FromDiscord | <Yardanico> In reply to @Luckayla "Nimmer just feels weird": why? |
17:00:47 | FromDiscord | <Luckayla> Nimion sounds close enough to minion |
17:01:16 | FromDiscord | <Luckayla> Don't think people would notice really. |
17:01:33 | FromDiscord | <Sebastian Valmont> finally I'm on discord |
17:01:51 | FromDiscord | <Luckayla> I'm so sorry |
17:01:54 | FromDiscord | <Luckayla> I hope you get better |
17:03:17 | FromDiscord | <Rika> In reply to @Luckayla "Nimion sounds close enough": that was the point |
17:03:20 | FromDiscord | <huantian> Lmao |
17:06:13 | FromDiscord | <Luckayla> In reply to @Rika "that was the point": Yes, that's what I mean. |
17:06:14 | FromDiscord | <Luckayla> I know |
17:06:16 | FromDiscord | <Luckayla> I understand |
17:12:29 | FromDiscord | <ynfle> In reply to @Zoom "I don't. If you're": So it may output posix paths on a windows system? Is this a server of sorts that collects data from different places? |
17:13:35 | FromDiscord | <Alea> Any clues as to what this error means? https://media.discordapp.net/attachments/371759389889003532/983780774442586112/unknown.png |
17:14:10 | FromDiscord | <Rika> compile it and read the error from there |
17:14:29 | FromDiscord | <Yardanico> In reply to @Alea "Any clues as to": you didn't import std/tables |
17:14:43 | FromDiscord | <Yardanico> ah actually no, you're using the wrong key type |
17:14:45 | FromDiscord | <ynfle> In reply to @Alea "Any clues as to": You table is indexed by IVec2 but the key you tried to access was GVec2? |
17:14:49 | FromDiscord | <Yardanico> yep |
17:15:05 | FromDiscord | <Rika> IVec2 mgiht be GVec2[int32] |
17:15:11 | FromDiscord | <Alea> In reply to @Yardanico "you didn't import std/tables": that was it↵would love if the error message actually remotely mentioned that |
17:15:12 | FromDiscord | <ynfle> Is it? |
17:15:16 | FromDiscord | <Rika> i dont know |
17:15:39 | FromDiscord | <Yardanico> In reply to @Alea "that was it would": the proper fix would be to make the whatever module you're using export tables |
17:15:44 | FromDiscord | <Yardanico> if it has exported fields that have Table types |
18:08:07 | * | jjido joined #nim |
18:38:27 | * | arkurious quit (Quit: Leaving) |
18:48:11 | * | Yardanico_ joined #nim |
18:50:44 | * | oddish quit (Ping timeout: 248 seconds) |
18:50:44 | * | Yardanico quit (Ping timeout: 248 seconds) |
18:50:44 | * | ecs quit (Ping timeout: 248 seconds) |
18:51:17 | * | ecs joined #nim |
18:51:23 | * | arkurious joined #nim |
18:51:34 | * | arkurious quit (Remote host closed the connection) |
18:53:44 | * | derpydoo quit (Ping timeout: 258 seconds) |
18:57:46 | * | pro joined #nim |
18:58:27 | FromDiscord | <hector> In reply to @hyperreal "So like, Golang people": Nimjas |
19:01:18 | FromDiscord | <Yardanico> no |
19:04:40 | FromDiscord | <Alea> Nimrods |
19:04:48 | FromDiscord | <System64 ~ Flandre Scarlet> Is casting to Camera type dangerous?↵Camera inherits from Actor https://media.discordapp.net/attachments/371759389889003532/983808766136942612/unknown.png |
19:07:45 | * | derpydoo joined #nim |
19:12:06 | FromDiscord | <Yardanico> arghh |
19:12:12 | FromDiscord | <Yardanico> you almost never need to cast unless dealing with raw pointers/memory |
19:12:19 | FromDiscord | <Yardanico> use type _conversions_ |
19:12:29 | FromDiscord | <Yardanico> like `Camera(type)` |
19:12:41 | FromDiscord | <Yardanico> and yes, it's totally safe for inherited objects |
19:13:26 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Yardanico "like `Camera(type)`": Camera(type) is the same as type.Camera? |
19:13:33 | FromDiscord | <Yardanico> yes of course |
19:13:36 | FromDiscord | <Yardanico> MCS (UFCS) still applies |
19:13:45 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright↵I called thoses... Casts |
19:13:54 | FromDiscord | <Yardanico> casts are `cast[Camera](value)` |
19:14:02 | FromDiscord | <System64 ~ Flandre Scarlet> ah alright |
19:18:01 | NimEventer | New thread by Clavismax: Multi-Dimensional Tuple is not working as expected, see https://forum.nim-lang.org/t/9216 |
19:19:53 | * | cyraxjoe quit (Ping timeout: 244 seconds) |
19:20:42 | * | rockcavera joined #nim |
19:20:42 | * | rockcavera quit (Changing host) |
19:20:43 | * | rockcavera joined #nim |
19:21:59 | * | cyraxjoe joined #nim |
19:24:46 | * | pro quit (Quit: pro) |
19:24:51 | FromDiscord | <System64 ~ Flandre Scarlet> sent a long message, see http://ix.io/3ZDJ |
19:24:58 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "http://ix.io/3ZDJ" => "http://ix.io/3ZDK" |
19:26:43 | FromDiscord | <System64 ~ Flandre Scarlet> I can move the proc in the Actor module, but this proc creates the camera and I think it should stay in place |
19:30:00 | FromDiscord | <huantian> why does Actor have to call a proc to make a Camera |
19:30:48 | FromDiscord | <System64 ~ Flandre Scarlet> It's in the initActors proc↵And Camera is considered as actor https://media.discordapp.net/attachments/371759389889003532/983815306952708147/unknown.png |
19:31:38 | FromDiscord | <System64 ~ Flandre Scarlet> But Camera also imports Actor https://media.discordapp.net/attachments/371759389889003532/983815515128623234/unknown.png |
19:31:45 | FromDiscord | <huantian> you can do a late import I guess |
19:31:55 | FromDiscord | <System64 ~ Flandre Scarlet> what does it mean? |
19:32:24 | FromDiscord | <huantian> put the `import Camer` right before initActors |
19:32:29 | FromDiscord | <huantian> (edit) "Camer`" => "camera`" |
19:32:48 | * | rockcavera quit (Remote host closed the connection) |
19:33:04 | FromDiscord | <huantian> I would probably just move `initActors` out of your actor module though |
19:33:49 | FromDiscord | <System64 ~ Flandre Scarlet> yeah I can do that |
19:34:14 | FromDiscord | <System64 ~ Flandre Scarlet> but it still concerns Actors |
19:42:04 | * | rockcavera joined #nim |
19:42:04 | * | rockcavera quit (Changing host) |
19:42:05 | * | rockcavera joined #nim |
19:45:34 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/sy5 |
19:46:10 | * | crem quit (Quit: WeeChat 3.3) |
19:48:06 | FromDiscord | <tandy> im on fedora 36 |
19:55:58 | * | crem joined #nim |
20:21:53 | FromDiscord | <Yardanico> no free space on /tmp maybe? |
20:34:29 | * | derpydoo quit (Quit: derpydoo) |
20:45:26 | FromDiscord | <Tuatarian> oh beef is on matrix so no tagging |
20:45:26 | FromDiscord | <Tuatarian> right |
20:45:44 | FromDiscord | <Tuatarian> gonna try anyway |
20:45:48 | FromDiscord | <Elegantbeef> You can tag me |
20:45:52 | FromDiscord | <Tuatarian> oh hello |
20:45:54 | FromDiscord | <Tuatarian> also how? |
20:46:00 | FromDiscord | <Elegantbeef> You write Elegantbeef |
20:46:02 | FromDiscord | <Tuatarian> @ElegantBeef works? |
20:46:04 | FromDiscord | <Elegantbeef> What a while world |
20:46:05 | FromDiscord | <Tuatarian> oh just write it |
20:46:08 | FromDiscord | <Tuatarian> elegantbeef |
20:46:18 | FromDiscord | <Elegantbeef> Oh god the pings! |
20:46:26 | FromDiscord | <Tuatarian> Lmao |
20:46:32 | FromDiscord | <Tuatarian> surely not as obnoxious as discord |
20:46:48 | FromDiscord | <Tuatarian> anyway I was going to ask, what Ide do you use? |
20:46:49 | FromDiscord | <Elegantbeef> Nope |
20:47:00 | FromDiscord | <Tuatarian> discord pings are awful |
20:47:08 | FromDiscord | <Tuatarian> they keep making the noise if you don't read them immediately |
20:48:02 | FromDiscord | <Elegantbeef> I dont use an ide i use kate |
20:48:04 | FromDiscord | <Tuatarian> even if you turn sounds off they don't respect the setting 1/2 of the time |
20:48:05 | FromDiscord | <Tuatarian> kate? |
20:48:18 | FromDiscord | <Elegantbeef> Yes the QT based text editor |
20:48:30 | FromDiscord | <Tuatarian> oh I see |
20:48:34 | FromDiscord | <Tuatarian> why not vscode? |
20:48:46 | FromDiscord | <Tuatarian> ms thing? |
20:49:02 | FromDiscord | <Elegantbeef> Cause i wanted to try something that was native code and kate works well |
20:49:05 | FromDiscord | <Tuatarian> or is it that you dislike electron? |
20:49:10 | FromDiscord | <Tuatarian> oh as in built for linux? |
20:50:06 | FromDiscord | <Elegantbeef> No as in it's compiled code and not JS |
20:50:42 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/983835415532433488/image.png |
20:50:48 | FromDiscord | <Elegantbeef> You just cant beat that 😄 |
20:51:00 | FromDiscord | <Elegantbeef> inb4 the vimmer/emac users appear |
21:02:27 | FromDiscord | <Tuatarian> love how you said "vimmer" singular instead of plural |
21:02:28 | FromDiscord | <Tuatarian> very accurate |
21:26:00 | FromDiscord | <clifontaive> I'll help 10 individuals how to earn $20,000 in just 72 hours from the crypto market. But you will pay me 10% commission when you receive your profit. if interested send me a direct message via WhatsApp by asking me HOW for more details on how to get started↵+1 (2297781881 |
21:26:17 | FromDiscord | <Tuatarian> I'm super super interested |
21:26:25 | FromDiscord | <Tuatarian> you'll never find a person more interested than I am |
21:26:32 | FromDiscord | <Tuatarian> my interest is unbounded |
21:26:42 | FromDiscord | <Elegantbeef> They use the same phone number, would be nice if could filter messages with `2297781881` out 😄 |
21:26:47 | FromDiscord | <Tuatarian> lmao |
21:27:07 | FromDiscord | <Tuatarian> why are they targeting programming ircs? |
21:27:12 | FromDiscord | <Tuatarian> i guess the guy is from irc |
21:27:20 | FromDiscord | <Elegantbeef> Matrix |
21:27:26 | FromDiscord | <Tuatarian> close enough |
21:27:43 | FromDiscord | <Tuatarian> but feels like the number of people here likely to fall for that is far lower than on other servers |
21:27:49 | FromDiscord | <Yardanico> they don't care |
21:27:53 | FromDiscord | <Yardanico> it's probably automated anyway |
21:27:58 | FromDiscord | <Elegantbeef> Tech bros are programmers |
21:28:15 | FromDiscord | <Elegantbeef> I dont think so yard, they were reading messages in another matrix room |
21:28:18 | * | noeontheend joined #nim |
21:30:00 | FromDiscord | <Tuatarian> how do they find the servers? |
21:30:05 | FromDiscord | <Tuatarian> they just have some big list somehwere ig? |
21:30:15 | FromDiscord | <Tuatarian> also are most tech/crypto bros programmers? |
21:30:27 | FromDiscord | <Elegantbeef> Matrix has a homeserver list |
21:30:31 | FromDiscord | <Tuatarian> ohh |
21:30:36 | FromDiscord | <Elegantbeef> You can query all public rooms on a homeserver |
21:30:53 | FromDiscord | <Tuatarian> makes sense |
21:33:42 | * | noeontheend quit (Ping timeout: 244 seconds) |
21:33:43 | FromDiscord | <Elegantbeef> Suffice to say there are a lot of crypto related matrix rooms |
21:33:45 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/983846244894007316/image.png |
21:38:35 | FromDiscord | <Tuatarian> why italian? |
21:41:56 | FromDiscord | <System64 ~ Flandre Scarlet> Oh god thoses cycling deps are a nightmare... |
21:42:23 | FromDiscord | <Elegantbeef> Yea dont do cyclical dependancies |
21:43:29 | * | tiorock joined #nim |
21:43:29 | * | tiorock quit (Changing host) |
21:43:30 | * | tiorock joined #nim |
21:43:30 | * | rockcavera is now known as Guest2807 |
21:43:30 | * | tiorock is now known as rockcavera |
21:45:56 | FromDiscord | <Yardanico> In reply to @System64 "Oh god thoses cycling": cycling deps? do they cycle on the roads or what? |
21:46:01 | FromDiscord | <Yardanico> 🤔 |
21:46:06 | FromDiscord | <Elegantbeef> Probably |
21:46:15 | FromDiscord | <Elegantbeef> Got a road bike and they just fucking go |
21:46:26 | FromDiscord | <System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/983849440349683792/unknown.png |
21:46:37 | FromDiscord | <System64 ~ Flandre Scarlet> And no idea how to escape that |
21:46:43 | * | Guest2807 quit (Ping timeout: 256 seconds) |
21:46:53 | FromDiscord | <Yardanico> the usual solution is to just put all your types int oa single file |
21:46:58 | FromDiscord | <Yardanico> (edit) "int oa" => "into a" |
21:47:15 | FromDiscord | <Elegantbeef> Alternatively you break your code up into small parts and pass them as parameters |
21:47:24 | FromDiscord | <Elegantbeef> Though that gets a bit fucking sketchy |
21:47:44 | FromDiscord | <System64 ~ Flandre Scarlet> or I can put a reference to the room in the actor itself |
21:47:56 | FromDiscord | <System64 ~ Flandre Scarlet> Oh no it wont work |
21:48:25 | FromDiscord | <Elegantbeef> Without the source it's hard to suggest project hierarchy |
21:48:47 | FromDiscord | <System64 ~ Flandre Scarlet> can I send the source? |
21:48:49 | FromDiscord | <Elegantbeef> Nim's lack of cyclical dependencies does make game dev a bit awkward |
21:48:59 | FromDiscord | <Elegantbeef> Nah my internet is going to stop working in 3 seconds |
21:49:06 | FromDiscord | <Elegantbeef> Well it's been 3 seconds |
21:52:11 | FromDiscord | <System64 ~ Flandre Scarlet> and will cycling deps be implemented one day? |
21:52:30 | FromDiscord | <Elegantbeef> Cyclic not cycling |
21:52:32 | FromDiscord | <Elegantbeef> But yes |
21:53:31 | FromDiscord | <System64 ~ Flandre Scarlet> ah sorry for the miss spell |
21:57:03 | FromDiscord | <System64 ~ Flandre Scarlet> This is my project, I'm feeling so stuck https://media.discordapp.net/attachments/371759389889003532/983852114163941456/TilengineSmallGame.zip |
21:59:21 | * | noeontheend joined #nim |
21:59:45 | FromDiscord | <Elegantbeef> You clearly have a design issue 😄 |
22:02:24 | FromDiscord | <Elegantbeef> Why not return `Actor` from your `construct` procs and add them to a list after |
22:02:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZEu |
22:03:12 | FromDiscord | <Elegantbeef> Also quit using C bitsets or else i'll find you |
22:03:46 | * | jmdaemon joined #nim |
22:03:58 | FromDiscord | <Generic> I'll find them first |
22:04:19 | FromDiscord | <System64 ~ Flandre Scarlet> yeah I can do that↵But will it fix the dependency issue? |
22:05:19 | FromDiscord | <j-james> man i wish we had arbitrary symbol lookup |
22:05:20 | FromDiscord | <j-james> even if it was behind a `--thisreallyslow` flag |
22:05:39 | FromDiscord | <Elegantbeef> Well yea your dependancy issue is a recursive import of your actor hierarchy |
22:05:40 | FromDiscord | <Elegantbeef> If your actor hierarchy isnt self importing it'll make your life much easier |
22:06:08 | FromDiscord | <Elegantbeef> "arbitrary symbol lookup"? |
22:06:18 | FromDiscord | <j-james> i guess cyclical imports are a slightly different problem, but they're related |
22:06:32 | FromDiscord | <Elegantbeef> They're really not related |
22:06:37 | FromDiscord | <Elegantbeef> Cyclical imports is a logical propblem |
22:06:40 | FromDiscord | <Elegantbeef> problem 😄 |
22:06:52 | FromDiscord | <Elegantbeef> arbitrary symbol look up removes module barriers |
22:07:18 | FromDiscord | <Yardanico> yes, just include all stdlib and user modules, and you have "arbitrary symbol lookup" :P |
22:07:24 | FromDiscord | <Elegantbeef> If you want to access a symbol from another module export it |
22:08:27 | FromDiscord | <Elegantbeef> I've personally never felt the need to go "I really want a symbol named jimbo32" |
22:08:32 | FromDiscord | <j-james> maybe i'm confusing names 🤔 |
22:08:34 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "If your actor hierarchy": And how can I avoid this? |
22:08:47 | FromDiscord | <Elegantbeef> You dont import modules to create a cyclical graph |
22:08:55 | FromDiscord | <Elegantbeef> Use fewer globals and pass state as parameters |
22:09:09 | FromDiscord | <Elegantbeef> your `update` could take a `Room` parameter |
22:09:20 | FromDiscord | <j-james> sent a code paste, see https://play.nim-lang.org/#ix=3ZEv |
22:09:35 | FromDiscord | <Elegantbeef> Well that's a cyclical dependancy |
22:09:39 | FromDiscord | <Elegantbeef> So... uhhh yea |
22:09:46 | FromDiscord | <Elegantbeef> That's not arbitrary symbol lookup |
22:10:08 | FromDiscord | <Yardanico> isn't a big problem the compiler having to figure out sizes of different types? |
22:10:16 | FromDiscord | <Yardanico> and if the type isn't defined but used by another type, the compiler doesn't know |
22:10:33 | FromDiscord | <Elegantbeef> The biggest problem is just properly reasoning the code since it's a top down parser/semantic analyser |
22:10:59 | FromDiscord | <Tuatarian> wait someone help me out |
22:11:06 | FromDiscord | <Tuatarian> how does the above code make any sense? |
22:11:20 | FromDiscord | <Elegantbeef> What above code? |
22:11:29 | FromDiscord | <Tuatarian> In reply to @j-james "doing this, without a": this |
22:11:37 | FromDiscord | <Tuatarian> idk if quoting sends over to matrix |
22:11:40 | FromDiscord | <Elegantbeef> In a world without cyclical dependancy it does |
22:11:49 | FromDiscord | <Tuatarian> how? |
22:11:57 | FromDiscord | <Tuatarian> isn't this just saying |
22:12:00 | FromDiscord | <Elegantbeef> It grows the stack to infinity |
22:12:07 | FromDiscord | <Elegantbeef> So it's an invalid recursive type |
22:12:15 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3ZEw |
22:12:17 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:12:35 | FromDiscord | <Tuatarian> yeah that's what I meant |
22:12:41 | FromDiscord | <Elegantbeef> No it's not |
22:12:41 | FromDiscord | <Tuatarian> like this shouldn't compile I think right? |
22:12:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZEx |
22:12:51 | FromDiscord | <Elegantbeef> They're not type aliases they're objects |
22:12:58 | FromDiscord | <Elegantbeef> It shouldnt compile you're right but not for the reason it doesnt presently compile |
22:13:15 | FromDiscord | <Elegantbeef> It presently doesnt compile cause `Bar` is unknown |
22:13:28 | FromDiscord | <Elegantbeef> It shouldnt compile cause it's a recursive data type |
22:13:35 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "your `update` could take": update() is supposed to be overloaded |
22:13:35 | FromDiscord | <Yardanico> In reply to @Elegantbeef "No it's not": nim has package level objects for that |
22:13:50 | FromDiscord | <Yardanico> i've heard they actually work |
22:13:59 | FromDiscord | <Elegantbeef> That doesnt change what i said↵(@System64 ~ Flandre Scarlet) |
22:14:05 | FromDiscord | <Tuatarian> can you have a recursive datatype that converges somehow? |
22:14:12 | FromDiscord | <Elegantbeef> You pass in room to the update method and that removes requiring to import `Actor` |
22:14:16 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual_experimental.html#package-level-objects |
22:14:24 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "You pass in room": ah alright |
22:14:33 | FromDiscord | <Elegantbeef> The only way to do recursive data types is if they are terminating which requires ref |
22:14:43 | FromDiscord | <huantian> what if you use generics 😛 |
22:14:53 | FromDiscord | <Elegantbeef> Even then huan |
22:15:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZEy |
22:15:22 | FromDiscord | <Tuatarian> how can you make sure it terminates? |
22:15:28 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3ZEz |
22:15:33 | FromDiscord | <Elegantbeef> Ok so static generics |
22:15:35 | FromDiscord | <Tuatarian> you can put when in a type statement!? |
22:15:44 | FromDiscord | <Elegantbeef> Yes |
22:16:00 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/vershun.nim#L80-L93 |
22:16:08 | FromDiscord | <Elegantbeef> You can do quite elaborate things thanks to that |
22:16:12 | * | vicfred_ joined #nim |
22:16:22 | FromDiscord | <Tuatarian> so if using huan's examplem |
22:16:41 | FromDiscord | <Tuatarian> if I say `let z = Foo[0]` |
22:16:42 | FromDiscord | <Elegantbeef> Lol that doesnt compile Huan |
22:16:46 | FromDiscord | <Tuatarian> can I ask for `z.a`? |
22:16:51 | FromDiscord | <huantian> yeah I didn't expect it to lmao |
22:16:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3ZEA |
22:17:20 | FromDiscord | <Elegantbeef> Only when it exists(T \@Tuatarian) |
22:17:24 | FromDiscord | <Tuatarian> isn't segfault a runtime error? |
22:17:29 | FromDiscord | <Elegantbeef> No |
22:17:32 | FromDiscord | <Elegantbeef> The compiler seg faults |
22:17:37 | * | noeontheend quit (Ping timeout: 260 seconds) |
22:17:46 | FromDiscord | <Tuatarian> that's strange |
22:17:55 | FromDiscord | <Elegantbeef> Not really |
22:17:59 | FromDiscord | <Elegantbeef> It doesnt intelligently handle generics in many places |
22:18:03 | FromDiscord | <Tuatarian> is this a gc thing? |
22:18:09 | FromDiscord | <Elegantbeef> No |
22:18:15 | FromDiscord | <Elegantbeef> It's a compiler being dumb thing |
22:18:29 | FromDiscord | <Elegantbeef> Nim's generic implementation has so many bugs |
22:18:40 | FromDiscord | <Tuatarian> oh I see |
22:18:45 | FromDiscord | <tandy> /tmp has free space↵(@Yardanico) |
22:18:48 | FromDiscord | <Elegantbeef> If you go off the commonly used it is bug after bug |
22:18:56 | * | vicfred quit (Ping timeout: 255 seconds) |
22:20:19 | FromDiscord | <Elegantbeef> I do wish i was sadistic enough to attempt to fix the typesystem, but that's not for me |
22:20:39 | FromDiscord | <Tuatarian> wait so isn't that setup really easy to make really horrible? |
22:20:47 | FromDiscord | <Tuatarian> if `z.a` only exists some of the time |
22:20:48 | FromDiscord | <Elegantbeef> What setup? |
22:20:58 | FromDiscord | <Elegantbeef> You statically know when it exists |
22:21:03 | FromDiscord | <Elegantbeef> Generics are statically known |
22:21:06 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=3ZEB |
22:21:16 | FromDiscord | <Tuatarian> we can't pass in a non-static int? |
22:21:28 | FromDiscord | <Elegantbeef> It's a generic of course you cant |
22:21:30 | FromDiscord | <Yardanico> types only exist at compile time |
22:21:36 | FromDiscord | <Tuatarian> ok that makes much more sense |
22:21:37 | FromDiscord | <tandy> oh its because choosenim dir is already in /tmp |
22:22:32 | FromDiscord | <Elegantbeef> What did you think "statically typed language" meant? 😛 |
22:26:30 | * | tiorock joined #nim |
22:26:30 | * | tiorock quit (Changing host) |
22:26:30 | * | tiorock joined #nim |
22:26:30 | * | rockcavera is now known as Guest3850 |
22:26:30 | * | Guest3850 quit (Killed (erbium.libera.chat (Nickname regained by services))) |
22:26:30 | * | tiorock is now known as rockcavera |
22:30:00 | FromDiscord | <System64 ~ Flandre Scarlet> Oh god it seems impossible to fix |
22:30:04 | FromDiscord | <tandy> wish choosenim wasnt unmaintained \:( |
22:30:30 | * | vicfred_ quit (Ping timeout: 272 seconds) |
22:31:27 | FromDiscord | <Yardanico> make a fork :P |
22:31:29 | FromDiscord | <Yardanico> picknim |
22:31:35 | FromDiscord | <Generic> compile latest Nim from git like the rest of us 😛 |
22:31:43 | FromDiscord | <Generic> and enjoy reporting regressions |
22:33:57 | FromDiscord | <tandy> il just install from fedora sources lol |
22:34:28 | FromDiscord | <Elegantbeef> You could use gitnim |
22:34:42 | FromDiscord | <Elegantbeef> Well it's not↵(@System64 ~ Flandre Scarlet) |
22:34:43 | FromDiscord | <j-james> question about `nim doc` - can it be pointed at a project and generate documentation for everything? |
22:34:48 | FromDiscord | <tandy> oh never mind that doesnt exist |
22:34:53 | FromDiscord | <j-james> i've only been able to make it work with individual files |
22:35:00 | FromDiscord | <Elegantbeef> You may have to change the organization of your program but it's fixable |
22:35:00 | FromDiscord | <tandy> will do |
22:36:21 | FromDiscord | <Elegantbeef> Yes↵(@j-james) |
22:36:31 | FromDiscord | <Elegantbeef> `--project` i think is required |
22:43:42 | FromDiscord | <j-james> ah, ty ty |
22:44:14 | FromDiscord | <System64 ~ Flandre Scarlet> Didn't I have cyclic deps here? https://media.discordapp.net/attachments/371759389889003532/983863987215163492/unknown.png |
22:45:04 | FromDiscord | <Elegantbeef> Why does init need to know about actor/camera/player? |
22:45:30 | FromDiscord | <System64 ~ Flandre Scarlet> it's the module that inits the actors |
22:45:33 | FromDiscord | <Elegantbeef> Rather why do the others need to know about init |
22:46:03 | FromDiscord | <Elegantbeef> And where's the cyclical dependancy |
22:46:24 | FromDiscord | <Elegantbeef> init -\> [camera, actor, player] -\> ...? |
22:46:34 | FromDiscord | <System64 ~ Flandre Scarlet> Actor, Camera and Player don't know about Init |
22:46:48 | FromDiscord | <Elegantbeef> So then where is the cyclical dependency? |
22:47:24 | FromDiscord | <Elegantbeef> A cyclical dependency is `A -> B -> Directly/Indirectly A` |
22:51:45 | FromDiscord | <System64 ~ Flandre Scarlet> Okay so this is the current structure https://media.discordapp.net/attachments/371759389889003532/983865876187066419/unknown.png |
23:00:27 | FromDiscord | <dom96> In reply to @tandy "anyone else getting this": Interesting error. Can you run the commands in init.sh to see where it goes wrong and report an issue? Would appreciate it :) |
23:02:29 | FromDiscord | <justanotherinternetguy> what happened in 2013 https://media.discordapp.net/attachments/371759389889003532/983868574785470534/unknown.png |
23:02:33 | FromDiscord | <justanotherinternetguy> (edit) "2013" => "2015" |
23:04:48 | FromDiscord | <Elegantbeef> Probably a share of something on hackernews or similar |
23:06:50 | FromDiscord | <System64 ~ Flandre Scarlet> Okay I found the cycling https://media.discordapp.net/attachments/371759389889003532/983869672749420605/unknown.png |
23:06:53 | FromDiscord | <dom96> My guess, it was the first time slashdot noticed Nim: https://m.slashdot.org/story/213623 |
23:07:25 | FromDiscord | <Elegantbeef> Yea system i said to stop using that global |
23:07:36 | FromDiscord | <Elegantbeef> There's not much reason to have that global just pass the current room as a parameter where you need it |
23:08:32 | FromDiscord | <System64 ~ Flandre Scarlet> Player can't import Room |
23:08:51 | FromDiscord | <Elegantbeef> Welcome to the issue of Nim with gamedev |
23:09:03 | FromDiscord | <Elegantbeef> You need a topdown structure you cannot do these cyclical imports |
23:09:13 | FromDiscord | <Elegantbeef> So either you put all your types together or make a topdown game |
23:09:29 | * | jjido joined #nim |
23:09:56 | FromDiscord | <System64 ~ Flandre Scarlet> so types in a single file↵And proc / methods in another? |
23:10:04 | FromDiscord | <Elegantbeef> Like for my game i have `World` importing player |
23:10:49 | FromDiscord | <Elegantbeef> Then for the player update i give the player the valid move directions and the player sets a `moveDir` that i then use to update the world state |
23:10:55 | FromDiscord | <justanotherinternetguy> |
23:11:05 | FromDiscord | <System64 ~ Flandre Scarlet> Ah alright↵But I want to make a platformer |
23:11:14 | FromDiscord | <Elegantbeef> So what? |
23:11:37 | FromDiscord | <System64 ~ Flandre Scarlet> In fact, the player just needs to know which tile he's hitting |
23:14:54 | FromDiscord | <Elegantbeef> Well you can pass that from whatever is above the player |
23:15:12 | FromDiscord | <Elegantbeef> It's a weird way to write games but it's what Nim forces you to do |
23:15:37 | FromDiscord | <Elegantbeef> Or you merge the types of course |
23:16:04 | FromDiscord | <Elegantbeef> But i feel that's worse as it removes any field accessibillity modifiers |
23:19:33 | FromDiscord | <Zectbumo> It sounds reasonable that the world knows about the player and tile. The world can just make the player turn into the proper state when it is standing on hot coals, in water, or impaled with spikes |
23:19:53 | FromDiscord | <Elegantbeef> Yep it's reasonable but a bit odd if you're not used to it |
23:20:59 | FromDiscord | <Zectbumo> I guess it's either from a puppet master point of view or an autonomous unit |
23:21:45 | FromDiscord | <Elegantbeef> I mean you can always pass a closure into the update to query collisions if you really wanted to |
23:22:43 | FromDiscord | <Zectbumo> What if the player asks the world world.whatTileAmIShandingOn(self) |
23:23:26 | FromDiscord | <Elegantbeef> A delayed import could work, but you could also pass in a closure of `collisionCheck(): CollisionType` |
23:24:19 | FromDiscord | <Elegantbeef> But i'd just do the world manages collisions myself |
23:29:18 | FromDiscord | <System64 ~ Flandre Scarlet> okay I found a solution |
23:54:26 | FromDiscord | <Alea> wait you can't use func args in `when`s |
23:54:28 | FromDiscord | <Alea> https://media.discordapp.net/attachments/802292827341193216/831204121222316132/disintegrate.gif |
23:54:39 | FromDiscord | <Alea> https://media.discordapp.net/attachments/802292827341193216/831204121222316132/disintegrate.gif |
23:54:45 | FromDiscord | <Alea> Pain |