<< 07-06-2022 >>

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