<< 26-03-2022 >>

00:00:07FromDiscord<Elegantbeef> Hmm seems kate isnt sending a save lsp message
00:00:09PMunchIf you have a broken Nim installation then sure
00:00:17PMunch@Elegantbeef, well that's silly of it
00:01:57FromDiscord<Elegantbeef> Yea the only instance of the word (s \| S)ave is in the intialize request
00:02:43PMunchThe problem is that asking nimsuggest for diagonstics is kinda slow..
00:02:52PMunchThat's why it's only done on save
00:03:03FromDiscord<Elegantbeef> I mean i know that
00:03:06PMunchI guess a "if has been able for x seconds" test could be added as well
00:03:11FromDiscord<luteva> In reply to @Alea "I think I originally": as pmunch said: If you have a broken Nim installation then sure.↵I think many windows guys try it with a new/clean installation whenever "something is wrong". but i do not know.
00:03:38FromDiscord<Elegantbeef> It's a case of even with saves there is no diagnostic information being exchanged so something somewhere isnt happy
00:04:40FromDiscord<Elegantbeef> But go back to elden ring i'll toy around
00:05:13PMunchNo worries, I die so frequently that I'm typing while it reloads :P
00:05:19PMunchI've been playing the whole time
00:05:38PMunchBut do you get the save notification in NimLSP?
00:05:45FromDiscord<Elegantbeef> No
00:05:55PMunchWithout it it won't send diagnostics, no matter if the file is saved
00:06:28PMunchSo you either need to get Kate to send save notifications, or you need to implement something in NimLSP that sends diagnostics without it
00:21:03PMunchWell, that's enough gaming for tonight
00:21:16PMunchRemind me tomorrow about the LSP thing and I'll have a look at it
00:21:32*PMunch quit (Quit: leaving)
00:27:33FromDiscord<Elegantbeef> I wonder if it's just my kate is outdated
00:27:43FromDiscord<Elegantbeef> The source code seems to say i should get different information
00:39:38FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/957076327805091900/image.png
00:39:44FromDiscord<Elegantbeef> Pmunch it was ubuntu's fault!
00:39:48FromDiscord<Elegantbeef> This entire time 😛
00:40:17FromDiscord<Elegantbeef> Downloaded the nighly appimage and boom just worked
00:48:41FromDiscord<Bubblie> is it possible to ping people on IRC
00:48:48FromDiscord<Elegantbeef> Yea you say their name
00:58:10FromDiscord<Bubblie> FINALLY
00:58:13FromDiscord<Bubblie> I got futhark installed
00:58:15FromDiscord<Bubblie> FUCK YOU WINDOWS
00:58:19FromDiscord<Bubblie> holy shit
00:58:26FromDiscord<Elegantbeef> Congrats
00:58:33FromDiscord<Bubblie> thank you
00:59:15FromDiscord<Bubblie> PMunch, you should add this as a disclaimer for windows users to help, they should use this command specifically, also restarting your computer before this helps LMAO
00:59:26FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
00:59:48FromDiscord<Elegantbeef> You can PR it 😛
00:59:53FromDiscord<Bubblie> (edit)
00:59:55FromDiscord<Bubblie> oh right
01:00:03FromDiscord<Bubblie> let me just do that
01:09:07FromDiscord<Bubblie> okay
01:09:08FromDiscord<Bubblie> pr is done
01:17:57FromDiscord<Bubblie> how do I check what libraries I have installed
01:17:58FromDiscord<Bubblie> for nim
01:18:17FromDiscord<Elegantbeef> `nimble list --installed`
01:18:19FromDiscord<Bubblie> thanks
01:19:12FromDiscord<Bubblie> weird, vulkanim is installed but it is saying it cannot open the file when I go to import it
01:19:23FromDiscord<Elegantbeef> How are you building?
01:20:47FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3TtN
01:20:50FromDiscord<Elegantbeef> How are you importing?
01:20:59FromDiscord<Bubblie> (edit) "https://play.nim-lang.org/#ix=3TtN" => "https://play.nim-lang.org/#ix=3TtO"
01:21:03FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
01:21:16FromDiscord<Elegantbeef> `vulkanim/vulkan`
01:21:32FromDiscord<Bubblie> thanks!
01:21:38FromDiscord<Bubblie> that worked
01:21:43FromDiscord<Elegantbeef> Of course it did
01:22:01FromDiscord<Bubblie> bit confused as to why though, I thought I would just need to do vulkanim since vulkan is the only thing there
01:22:12FromDiscord<Elegantbeef> cause it's inside a vulkanim folder
01:22:13FromDiscord<Bubblie> unlike nimgl where it is nimgl/vulkan
01:22:13FromDiscord<Elegantbeef> Whyelse
01:22:19FromDiscord<Bubblie> In reply to @Elegantbeef "cause it's inside a": ah okay nvm
01:39:49FromDiscord<System64 ~ Flandre Scarlet> How can I make a nimble package please?
01:40:20FromDiscord<Elegantbeef> Submit your github repo to `nim-lang/packages`
01:40:37FromDiscord<Elegantbeef> If you mean how to actually make it compliant do `nimble init`
01:40:47FromDiscord<System64 ~ Flandre Scarlet> ah alright
01:41:17FromDiscord<System64 ~ Flandre Scarlet> In fact I want to Nimble that https://media.discordapp.net/attachments/371759389889003532/957091842279735376/unknown.png
01:41:18FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
01:41:55FromDiscord<Bubblie> sent a code paste, see https://paste.rs/dLJ
01:42:05FromDiscord<Bubblie> I tried adding an extra slash
01:42:16FromDiscord<Bubblie> but it isn't properly reading that
01:45:22FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "If you mean how": should I include the DLL with the nimble package?
01:45:28FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=
01:45:35FromDiscord<Bubblie> it might be related to linux paths and slash usage
01:45:44FromDiscord<Elegantbeef> No you shouldnt include a dll with the nimble package
01:45:46FromDiscord<Elegantbeef> Link to how to get it
01:46:08FromDiscord<System64 ~ Flandre Scarlet> Alright
01:48:39FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "No you shouldnt include": Okay so I think I created the package, now I guess I have to commit?
01:50:28FromDiscord<Elegantbeef> https://github.com/nim-lang/packages#adding-your-own-package
01:56:05FromDiscord<System64 ~ Flandre Scarlet> aaaah alright
02:01:31FromDiscord<System64 ~ Flandre Scarlet> is that a problem? https://media.discordapp.net/attachments/371759389889003532/957096930972926002/unknown.png
02:01:52FromDiscord<Elegantbeef> General windows issue
02:02:09FromDiscord<System64 ~ Flandre Scarlet> so it's bad?
02:02:19FromDiscord<Elegantbeef> It's not that ba afaik
02:02:30FromDiscord<Elegantbeef> bad\
02:02:46*yiggityswaps joined #nim
02:02:59FromDiscord<Elegantbeef> Modern unix and windows disagree on what ends a line so it causes tedium for VCS
02:05:10FromDiscord<System64 ~ Flandre Scarlet> https://github.com/system64MC/NimTilengine↵Okay is it good?
02:05:57*yoyojambo quit (Ping timeout: 252 seconds)
02:06:39FromDiscord<Patitotective> Can I somehow include some files directly into the shared library nim's compiler outputs?
02:06:49FromDiscord<Patitotective> Like resources
02:19:23FromDiscord<Sabena Sema> you can use `slurp`
02:19:26FromDiscord<Sabena Sema> and `gorge`
02:19:43FromDiscord<Sabena Sema> you can also use a linker script when you link
02:20:08FromDiscord<Sabena Sema> slurp and gorge might technically be better though, as theoretically they give the compiler access to the data for constant folding and the like
02:20:55FromDiscord<Sabena Sema> you can call them `staticRead` and `staticExec` if you don't like fun
02:23:32FromDiscord<Patitotective> 🙃
02:23:34FromDiscord<Patitotective> Thanks
02:27:18FromDiscord<Patitotective> But what do I do with the data I get? Like I need to `stbi.load(path, width, height, channels, stbi.Default)`↵There should be another procedure that accepts the file data or?
02:27:43nrds<Prestige99> Hey beef
02:27:48FromDiscord<Elegantbeef> Hello
02:28:16FromDiscord<Patitotective> In reply to @Patitotective "But what do I": Like to read the pixels from the "image data"
02:28:24nrds<Prestige99> Is your engine open source? Wanted to see how you're doing 3d
02:28:49FromDiscord<Elegantbeef> https://github.com/beef331/truss3d
02:29:05nrds<Prestige99> Tyty
02:29:30FromDiscord<System64 ~ Flandre Scarlet> https://github.com/system64MC/NimTilengine↵Okay it works!
02:30:59FromDiscord<Elegantbeef> I still need to do a lot for it, but that's pretty much it
02:31:42nrds<Prestige99> I've only ever tried 2D, my engine is coming along well but I was curious :P
02:32:53FromDiscord<Elegantbeef> Ah
02:34:56FromDiscord<Elegantbeef> It's a very hands off api, it's more like raylib than an engine
02:47:16*Guest2 joined #nim
02:49:01*Guest2 quit (Client Quit)
02:51:13FromDiscord<Bubblie> is there any projects with futhark I can look at
03:18:05*fowl quit (Quit: cya pals)
03:19:11FromDiscord<Sabena Sema> In reply to @Patitotective "Like to read the": you can just stick the image data in a variable of some description, whatever is nim's version of C const
03:19:19FromDiscord<Sabena Sema> let I suppose
03:19:38FromDiscord<Sabena Sema> I think that'll go in .rodata
03:20:14FromDiscord<Elegantbeef> `const myImageData = staticRead("myImage.png")`
03:23:43FromDiscord<Elegantbeef> You arent really going to be able to store the loaded PNG at compile time, so yea use that to static read the at runtime convert it to your desired file
03:24:24FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tu4
03:24:38FromDiscord<Elegantbeef> `loadFromData` is your runtime procedure that takes in the binary data and loads it into your desired format
03:25:02FromDiscord<Elegantbeef> If it does require using a path use memfiles and store the image there
03:27:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tu5
03:34:10FromDiscord<Patitotective> sent a code paste, see https://paste.rs/miI
03:35:15FromDiscord<Elegantbeef> I guess the template could just return the image, sometimes i amaze myself 😛
03:35:19FromDiscord<Elegantbeef> I mean i dont know what the issue is
03:38:25FromDiscord<Patitotective> aren't there other bin2png libraries?
03:39:01FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/I5f
03:39:42FromDiscord<Elegantbeef> Then you can do `let (myImage, width, height, channels) = loadStatically("myImage.png")`
03:41:09FromDiscord<Elegantbeef> If that doesnt work for you please explain why
03:42:43FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tu8
03:43:07FromDiscord<Elegantbeef> What stb library are you using?
03:43:09FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3Tu8" => "https://play.nim-lang.org/#ix=3Tu9"
03:43:24FromDiscord<Patitotective> `stb_image` https://github.com/define-private-public/stb_image-Nim
03:44:43FromDiscord<Elegantbeef> then just do `cast[seq[byte]](data)` since they wanted to be so bullheaded about it
03:47:54FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tua
03:48:27FromDiscord<Elegantbeef> change them from cint
03:48:28FromDiscord<Elegantbeef> to `int`
03:48:40FromDiscord<Elegantbeef> You also dont need to pass length
03:49:01FromDiscord<Patitotective> In reply to @Elegantbeef "You also dont need": wdym
03:49:10*yiggityswaps quit (Quit: Leaving)
03:49:18FromDiscord<Elegantbeef> `loadFromMemory(buffer: seq[byte]; x, y, channels_in_file: var int; desired_channels: int)`
03:49:22FromDiscord<Elegantbeef> Read the proc you're invoking
03:49:27FromDiscord<Elegantbeef> It doesnt take in length it gets it from the sequence
03:49:38*yoyojambo joined #nim
03:50:32FromDiscord<Patitotective> 🤩
03:50:34FromDiscord<Patitotective> thanks
03:50:35FromDiscord<Patitotective> 🙃
04:07:51*ltriant_ joined #nim
04:09:06FromDiscord<Patitotective> now the thing is that if i put that procedure in a `src/utils.nim` file and i call it from my main module the path won't be the same since, it would be `src/icon.png` and i want `icon.png`
04:09:12FromDiscord<Patitotective> is there a way to avoid that?
04:09:24*ltriant quit (Ping timeout: 240 seconds)
04:20:32*rockcavera quit (Remote host closed the connection)
04:44:25*slowButPresent quit (Quit: leaving)
06:02:55*yoyojambo quit (Read error: Connection reset by peer)
06:33:53*jmd_ quit (Ping timeout: 256 seconds)
06:38:25*ltriant_ quit (Ping timeout: 256 seconds)
07:19:41*ltriant joined #nim
08:53:47*pro joined #nim
08:56:06*dtomato quit (Quit: The Lounge - https://thelounge.chat)
08:56:54*dtomato joined #nim
08:57:38*dtomato quit (Client Quit)
08:58:23*dtomato joined #nim
09:15:57*pro quit (Ping timeout: 240 seconds)
09:33:26*PMunch joined #nim
10:00:31*wyrd quit (Remote host closed the connection)
10:00:50*wyrd joined #nim
10:27:43*ltriant quit (Ping timeout: 260 seconds)
10:33:59*pro joined #nim
10:50:34NimEventerNew thread by Luyimoon: Excuse me, how to loop and output each character of the Chinese string?, see https://forum.nim-lang.org/t/9047
11:03:39*Gustavo6046 joined #nim
11:04:58*Gustavo6046 quit (Remote host closed the connection)
11:05:16*Gustavo6046 joined #nim
11:10:20*ltriant joined #nim
11:19:42FromDiscord<Bung> The packed pragma can be applied to any object type. It ensures that the fields of an object are packed back-to-back in memory.↵what does this mean ? "packed back-to-back in memory"
11:21:03PMunchIt means that if you have a char, a char, and an int it will take 10 bytes on a x64 machine and not 16 bytes it would usually take with alignment
11:28:38FromDiscord<Bung> sorry ,not 6 bytes right ?
11:29:12FromDiscord<Bung> where 16 bytes coming from
11:29:16FromDiscord<demotomohiro> !eval echo sizeof(int)
11:29:18NimBot8
11:31:35FromDiscord<demotomohiro> Padding can be added to 2/4/8 bytes types in object type so that they are placed in multiple of 2/4/8 address.
11:32:10FromDiscord<demotomohiro> !eval echo sizeof ('a', 'b', 1'i64)
11:32:12NimBot16
11:36:38FromDiscord<Bung> why there are padding
11:37:04FromDiscord<Rika> It is more efficient for the processor
11:37:12FromDiscord<Rika> Processors read words
11:37:21FromDiscord<Rika> So a 64 bit processor reads 64 bits at a time
11:37:48FromDiscord<Rika> It would be annoying to use two reads for an integer because there were two bytes used before it
11:42:04supakeenYou get a free short!
11:44:40FromDiscord<demotomohiro> !eval echo sizeof (1'i64, 'a', 'b')
11:44:42NimBot16
11:44:48supakeenHonestly, a lot of this is also just based on previous simpler processor designs and simplifications.
11:46:17supakeenFor example I know that Intel unaligned reads are basically free unless they cross a cache line.
11:46:20FromDiscord<Bung> I think I need a example to understand how the type padding added and how the processors read
11:46:57supakeenYou're not dealing with padding here, Bung.
11:47:15supakeenYou're dealing with a fixed-width type, an i64 or a 64-bit integer, which is always 64-bits and thus 8 bytes.
11:47:20FromDiscord<auxym> out of curiosity... what's the failure mode of ARC in the presence of cycles? Does it simply fail to collect refs that are part of the cycle? Or will it attempt to collect stuff that's in use and segfault? Or cause an infinite loop / infinite copies / set my computer on fire?
11:47:24supakeenIf you have two of them you always have 16 bytes.
11:48:18supakeenNow if you have structs it's normal for those to be padded to a multiple of the largest type.
11:49:21FromDiscord<demotomohiro> echo sizeof (1'i64, 2'i8, 3'i64, 4'i8), ", ", sizeof (1'i64, 3'i64, 4'i8, 2'i8)↵Most of case, padding are added so that 4 byte types are placed on multiple of 4 address and so 8 byte types.
11:49:25supakeenBut again this is both compiler and architecture dependent if it needs to be done, and is not usually something one worries about.
11:49:29supakeenUnless you do really bad things.
11:49:30FromDiscord<demotomohiro> !eval echo sizeof (1'i64, 2'i8, 3'i64, 4'i8), ", ", sizeof (1'i64, 3'i64, 4'i8, 2'i8)
11:49:32NimBot32, 24
11:51:02supakeenReminds me of the old C best practice of reverse-sorting your structs by size for the least amound of waste 🙂
11:51:55FromDiscord<Rika> In reply to @auxym "out of curiosity... what's": Cycles do not get collected; if you make more you hit memory limits
11:52:18FromDiscord<Rika> If the program ends there will be memory that isn’t freed
11:52:41FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3TvQ
11:52:58FromDiscord<Rika> No crashing or freezing yes
11:53:10FromDiscord<auxym> right. so if I have cycles involving objects that have a lifetime equal to the lifetime of the program it shouldn't cause an issue
11:53:37FromDiscord<Rika> It would if your operating system is dumb and not freeing memory on end
11:53:50FromDiscord<Rika> So don’t try it on embedded I guess?
11:54:47FromDiscord<auxym> well, on embedded (bare metal micros), lifetime of the program = time that the system is powered on. everything is "freed" on a reset / power down 😉
11:55:48FromDiscord<Rika> Well sometimes it’s important to free on end anyway
11:55:51FromDiscord<auxym> thanks for the info on arc btw 👍
11:56:09FromDiscord<Rika> ORC could still work on embedded
11:56:18FromDiscord<Rika> You just lose determinism
11:56:24FromDiscord<Rika> Might be important for you
11:56:25FromDiscord<auxym> the cycle collector is run time overhead though, no?
11:56:26FromDiscord<auxym> yeah
11:57:24FromDiscord<auxym> i'm toying around with writing a scheduler fyi, which is a global that is always alive (obviously, sort of like an OS), but avoiding cycles is sorta hard
11:57:51FromDiscord<auxym> might have to resort to manual MM for some of the low level details
12:01:59FromDiscord<mratsim> In reply to @auxym "the cycle collector is": Only for types that may have cycles, and the collection is still inserted at deterministic location, it's the duration of collection that is non-deterministic<
12:02:04FromDiscord<mratsim> (edit) "non-deterministic<" => "non-deterministic."
12:02:38FromDiscord<auxym> In reply to @mratsim "Only for types that": interesting, ty. so can I see where's it's inserted with expandArc?
12:03:04FromDiscord<Bung> In reply to @demotomohiro "!eval echo sizeof (1'i64,": thanks , this good example, so thats 4 8 and 28 + 1 8
12:03:14FromDiscord<mratsim> In reply to @auxym "interesting, ty. so can": Probably, I didn't look much in Nim implementation, I refer to the original Bacon and Dingle paper
12:03:33FromDiscord<Bung> (edit) "28" => "2 8" | "1" => "1 "
12:04:16FromDiscord<mratsim> In reply to @auxym "i'm toying around with": where would you have cycles in a scheduler? Your tasks are a direct acyclic graphs
12:04:58FromDiscord<mratsim> actually a tree
12:05:13FromDiscord<mratsim> only one parent can spawn a task.
12:05:47FromDiscord<auxym> scheduler has a ref to tasks, but tasks have a ref to the scheduler so that they can make "syscalls" (yield, acquire lock, etc)
12:14:38NimEventerNew Nimble package! nimlangserver - The Nim language server implementation (based on nimsuggest), see https://github.com/nim-lang/langserver
13:18:31*Gustavo6046 quit (Ping timeout: 260 seconds)
13:32:40*wyrd quit (Remote host closed the connection)
13:32:55*wyrd joined #nim
13:41:07*rockcavera joined #nim
13:41:07*rockcavera quit (Changing host)
13:41:07*rockcavera joined #nim
14:30:27*mahlon quit (Ping timeout: 256 seconds)
14:49:51FromDiscord<Patitotective> Is there a compile-time version of the `getCurrentDir()` procedure? https://nim-lang.org/docs/os.html#getCurrentDir↵Like, get the current directory of the nim module and not the binary
14:54:36FromDiscord<Phil> You want the directory path that the project is in at compile time to use it at runtime?
14:54:48FromDiscord<Phil> (edit) "You want ... the" added "to hard-code"
14:54:48FromDiscord<Rika> https://nim-lang.org/docs/macros.html#getProjectPath
14:55:10FromDiscord<Patitotective> In reply to @Isofruit "You want to hard-code": i think lol
14:56:22FromDiscord<Patitotective> It's just that in my `main.nim` module I've got the `const` icon path and I want it to be an absolute path since I need to pass it to `src/utils.nim` to read it and get the pixels↵If it's not absolute it would look for it inside `src/`
14:56:46FromDiscord<spoon> isnt there a way to bake assets into a binary?
14:57:06FromDiscord<Phil> Hmm I solved that kind of things with a settings file I read in on startup rather than hard-code it into the binary, but I also deal with web-applications rather then actual user applications
14:57:25FromDiscord<Phil> (edit) "things" => "thing"
14:58:19FromDiscord<Patitotective> In reply to @Isofruit "Hmm I solved that": but you needed to have the actual file next to the binary i dont want that
14:58:26FromDiscord<Patitotective> (edit) "In reply to @Isofruit "Hmm I solved that": but you needed to have the actual file next to the binary ... i" added "(?)"
14:59:44FromDiscord<Phil> You mean the settings file? Yeah that file will need to be at some pre-defined, hard-coded location. But it's a single path rather than multiple paths and gives you a central place for all variable settings you may want to change
14:59:55FromDiscord<Patitotective> In reply to @spoon "isnt there a way": slurp? https://nim-lang.org/docs/system.html#slurp%2Cstring
15:00:49FromDiscord<Patitotective> In reply to @Isofruit "You mean the settings": i mean that in the settings file you have the icon path, so that icon path needs to be next to binary (?)
15:01:37FromDiscord<Phil> In reply to @Patitotective "i mean that in": You can change the icon path to whatever you want at whatever time you want after the binary is compiled. Meanwhile once the binary is compiled you're stuck with whatever is in the binary
15:01:44FromDiscord<Phil> (edit) "In reply to @Patitotective "i mean that in": You can change the icon path ... to" added "in the settings file"
15:01:58FromDiscord<Phil> The settings file is not part of your binary, it just gets read in by your binary when you use the binary
15:02:22FromDiscord<Patitotective> and what is that settings file? ini, toml, yaml, json?
15:04:09FromDiscord<Phil> I mean, you can pretty much use whatever you want. Depending on which dependencies you have, some might come with easier setup than others.↵Prologue for example by default uses a JSON file as settings file, thus using that is trivial.↵If you have no such framework that makes a semi-opinionated suggestion to you, you can use whatever file-format you find easy to parse/have a simple parser for
15:04:51FromDiscord<Patitotective> https://patitotective.github.io/niprefs lul
15:06:28FromDiscord<Phil> The way I use settings files (which I think is the normal way (?) ) is that pretty much everything you might want to swap up after compilation (typical config settings like where is what resource folder, flags of sorts to enable/disable certain behaviours etc., secret keys for cryptography) goes in there
15:07:00FromDiscord<Patitotective> Thanks 🙃
15:07:52FromDiscord<Phil> What are "preferences" in your eyes?
15:09:34FromDiscord<Patitotective> sent a code paste, see https://paste.rs/N8q
15:10:04FromDiscord<Phil> Nah, more like in the starting description of your docs you start going with how you store Preferences
15:10:10FromDiscord<Phil> But preferences in what sense? For what?
15:10:36FromDiscord<Phil> Do I store my food preferences in there?
15:10:53FromDiscord<Phil> What is the benefit of me having my favourite potato meal in there?
15:11:00FromDiscord<Bung> asyncdispatch register raise `Error: unhandled exception: The parameter is incorrect.` anyone know the reason ?
15:11:21FromDiscord<Bung> on windows
15:11:38FromDiscord<Patitotective> like the preferences the user can change in the preferences window: theme, lang. or for example if you're making a game the user stats
15:11:48FromDiscord<Patitotective> the keybindings
15:12:17FromDiscord<Phil> Ahh, user preferences in a game
15:12:27FromDiscord<Phil> So no place to store potato goodness, gotcha
15:12:37FromDiscord<Patitotective> mainly for gui stuff
15:12:42FromDiscord<Patitotective> In reply to @Isofruit "So no place to": lol hehe
15:14:04FromDiscord<Phil> In reply to @Bung "asyncdispatch register raise `Error:": I'm sadly not deep enough into async to even have a proper idea of what is meant by asyncdispatch, I'd imagine though that a code sample of a minimal example might be necessary for others with the knowledge (?)
15:15:38FromDiscord<Patitotective> In reply to @Isofruit "Hmm I solved that": are those applications public somewhere?
15:15:57FromDiscord<Phil> I only got one that is actually large enough for that, it's nimstoryfont
15:16:06FromDiscord<Phil> Which is still very much in development might I add
15:16:21FromDiscord<Phil> Though I can just give you a sample of the json
15:16:42FromDiscord<treeform> In reply to @Elegantbeef "slappy is treeforms abstraction": You are totally right, slappy uses uses the openAL, but it also ads wav and ogg parsing.
15:17:57FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3TwM
15:18:26FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3TwM" => "https://play.nim-lang.org/#ix=3TwN"
15:20:42FromDiscord<Patitotective> hmm, if you change your project folder, you would need to all the paths (?)
15:20:49FromDiscord<Patitotective> that's what i want to avoid
15:21:38FromDiscord<Phil> you mean I'll need to swap out basedir and mediadir? Yeah pretty much, but just in the settings file which I'll have a copy of on the server with different, adjusted, values
15:22:22FromDiscord<Phil> (edit) "you mean I'll need to swap out basedir and mediadir? Yeah pretty much, but just in the settings file which I'll have a copy of on the server ... with" added "that the code will be deployed to"
15:22:29*Gustavo6046 joined #nim
15:23:08FromDiscord<Phil> But the only path's I'll need to adjust are basedir and mediadir
15:23:09FromDiscord<Bung> In reply to @Isofruit "I'm sadly not deep": I have same problem like this https://github.com/PMunch/nimlsp/runs/5664209256?check_suite_focus=true it's just asyncFd pass to asyncdispatch's register proc
15:24:05PMunchWell that error is pretty horrible..
15:24:17FromDiscord<Phil> Pmunch to the rescue
15:24:24FromDiscord<Patitotective> In reply to @Isofruit "But the only path's": and if you're working with someone else he would have to change those paths too, so that config file couldn't be in the github since it's different to everyone?
15:24:43PMunchTo the rescue?
15:25:44FromDiscord<Bung> am trying to build a watchdog like lib, face same error , for me it's just a simple proc call , no idea what happen
15:26:22PMunchOh, that error is apparently from the Nim compiler command line processing
15:27:22PMunchThis is the only reference I found to that error in the sources: https://github.com/nim-lang/Nim/blob/devel/compiler/nim.nim#L121-L122
15:27:29FromDiscord<Phil> sent a code paste, see https://paste.rs/XeU
15:27:44*Gustavo6046 is now known as Gustavo6046\away
15:28:20FromDiscord<Patitotective> wouldn't just be easier to add the path of the main module to all paths in the settings?
15:28:31FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3TwQ" => "https://play.nim-lang.org/#ix=3TwP"
15:28:50FromDiscord<Phil> Might be sports messing with me, but how do you mean?
15:29:09FromDiscord<Phil> (edit) "Might be ... sports" added "leftover effects of"
15:30:07PMunchNo idea where Nim creates that error tbh
15:30:08FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3TwS
15:30:27FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3TwT
15:31:13FromDiscord<Bung> In reply to @PMunch "This is the only": uh, that's like else place produce this error and then get last os error take it ?
15:31:43FromDiscord<Phil> sent a code paste, see https://paste.rs/rfI
15:32:43FromDiscord<Patitotective> im going to try to do it relative because im making a template for imgui applications ¯\_(ツ)_/¯
15:32:45FromDiscord<Phil> The reason I store my media dir within the project folder locally is because it makes developing easier if I don't have to clean up elsewhere
15:32:45*pro quit (Quit: pro)
15:33:11FromDiscord<Patitotective> (btw really liked `dev` directory name, gonna copy that lol)
15:33:17FromDiscord<Patitotective> (edit) "(btw really liked ... `dev`" added "the"
15:33:50FromDiscord<Patitotective> In reply to @Patitotective "im going to try": so it would be annoying to have to change all the paths if you only want to see an example
15:33:56FromDiscord<Patitotective> (edit) "In reply to @Patitotective "im going to try": so it would be ... annoying" added "really"
15:36:55FromDiscord<Phil> sent a long message, see http://ix.io/3Tx1
15:37:31FromDiscord<Phil> (edit) "http://ix.io/3Tx1" => "http://ix.io/3Tx2"
15:37:52FromDiscord<Phil> How you set filepaths and the like, whether absolute compared to one or all relative, is just a detail on how to use that.
15:38:41FromDiscord<Phil> If the only variable thing in your application is filepath though and you don't need settings, then your original approach of just compiling them all relative to a specific folder is also valid. I just haven't encountered a lot of scenarios where that was the case yet, so I instinctively go for the runtime-settings-approach
15:39:50FromDiscord<Patitotective> i still need to see how i'm going to "build" an application↵like, appimage, snap or just a binary
15:40:11FromDiscord<Patitotective> and see if runtime settings work in that case
15:40:30FromDiscord<Phil> IIRC flatpak was winning the popularity contest, could also be a valid target
15:41:01FromDiscord<Phil> Well, popularity contest compared to the alternatives of snaps and appimages
15:42:03FromDiscord<Patitotective> yea, gonna check it too and maybe put all those alternatives in the template so you can choose which one to use or choose all
15:42:14FromDiscord<Patitotective> (edit) "alternatives" => "build methods"
15:42:20FromDiscord<Patitotective> (edit) "yea, gonna check it too and maybe put all those build methods in the template so you can choose which one to use or choose all ... " added "of them"
15:42:44FromDiscord<Phil> ~~Just do only a AUR package for that chaotic neutral alignment vibe~~
15:43:53FromDiscord<Patitotective> or a debian one 🙃
15:44:04FromDiscord<Phil> Heresyyyyyyy
15:45:38FromDiscord<Patitotective> In reply to @Isofruit "~~Just do only a": what about snap, appimage, flatpak, binary, aur and debian? so i can spend more time in this side project 💀
15:46:09FromDiscord<Phil> I mean
15:46:28FromDiscord<Phil> If you want to learn about build pipelines and set one up for all of these it might be a good learning experience?
16:01:17*gsalazar quit (Ping timeout: 240 seconds)
16:19:58FromDiscord<mlokis> Is a second-degree graph a graph with (n + 1) points and each point has two edges that create an obvious cycle?
16:26:43*jmdaemon joined #nim
16:26:53*xet7 quit (Remote host closed the connection)
16:36:18FromDiscord<Rika> what is a second degree graph? all nodes have degree 2?
16:36:58FromDiscord<Rika> n+1 is always 3 in that case, and yes theres always a cycle there of course
16:39:08*slowButPresent joined #nim
16:53:19*pro joined #nim
16:53:27*arkurious joined #nim
16:53:52*yoyojambo joined #nim
17:21:24FromDiscord<Bubblie> Hey PMunch, can I have some help regarding importing the headers? Something is not working
17:24:43PMunch@Bubblie, sure
17:27:11*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
17:27:29*jmdaemon joined #nim
17:27:43FromDiscord<Alea> anyone seen this error in choosenim? https://media.discordapp.net/attachments/371759389889003532/957330019754049576/unknown.png
17:28:21PMunch@Alea, haven't seen it personally since I don't use Windows. But that looks like a string interpolation issue
17:42:15FromDiscord<Alea> it's probably another error caused by having a space in my username :withered:
17:42:31FromDiscord<Patitotective> How do I open a hyperlink (example https://duckduckgo.com/) with nim?
17:42:55PMunch@Patitotective, define "open"
17:43:07FromDiscord<Patitotective> open in the browser
17:43:23FromDiscord<Patitotective> just like discord
17:44:18PMunchPlatform specific for sure
17:44:41FromDiscord<ajusa> https://nim-lang.org/docs/browsers.html ?
17:44:42PMunchOn Linux you could probably do `xdg-open "https://duckduckgo.com"`
17:44:54PMunchOh, or that apparently :P
17:45:03FromDiscord<ajusa> in the std library thankfully
17:45:13FromDiscord<ajusa> also PMunch did you have a chance to look at my PR?
17:45:15FromDiscord<Patitotective> In reply to @ajusa "https://nim-lang.org/docs/browsers.html ?": 🙃 thanks
17:45:40FromDiscord<ajusa> or a chance to update the docker/readme instructions?
17:45:54PMunchFor the playground? No I haven't had a chance to look at it
17:47:09FromDiscord<Alea> is there any way to force the choosenim subcommands to run in verbose mode?
17:47:22FromDiscord<Alea> maybe I'll see what string formatting fails exactly
17:58:02FromDiscord<Alea> Judging by the message printed right before the error, it builds the compiler and then makes an early return from the build function before building the tools which is where I would presume this error happens since it mentions nimble.exe ↵https://github.com/dom96/choosenim/blob/950d19e7f5bfe96e95a90781633a4d28029d6f59/src/choosenimpkg/builder.nim#L133
18:03:29FromDiscord<Alea> Ok I think the error might be coming from here? https://github.com/dom96/choosenim/blob/b959c84745ff4869d6d7ef0818b7147685b3f494/src/choosenimpkg/switcher.nim#L222
18:03:46FromDiscord<Alea> How could this formatting break?
18:18:50FromDiscord<Alea> Annoying 😮‍💨 ↵guess I'll have to go with manual install again
18:24:14PMunchIs this just a normal Windows build?
18:24:55FromDiscord<Alea> yeah
18:25:16FromDiscord<Alea> I'm 90% sure it's an error with formatting the filepath because of the space in my username
18:25:27FromDiscord<Alea> that same error has popped up several times across the nim tools
18:28:07FromDiscord<demotomohiro> Are you trying to build devel Nim with choosenim? What's error message did you got?
18:28:18PMunchYeah spaces are annoying when writing terminal applications
18:29:31FromDiscord<Alea> It got the step where it says `Compiler: Already Built` and then failed with https://media.discordapp.net/attachments/371759389889003532/957345568903012402/unknown.png
18:29:53FromDiscord<Alea> It also printed something about running nimble.exe -v
18:29:57FromDiscord<demotomohiro> You need to quote paths with '' or "" if it contains space.
18:35:35FromDiscord<demotomohiro> How did you run choosenim?
18:36:36FromDiscord<Alea> through the runme script, both regular and as admin
18:37:34PMunchI don't think it's where you thought it was @Alea
18:37:50PMunchThe error message seems like $1 is passed to exec or something like that
18:38:15FromDiscord<Alea> possible, jumping around on github was tough
18:38:43PMunchHave you done `--verbose` on the choosenim call?
18:39:40FromDiscord<Alea> yup, that just printed out a bunch of messages about the disabled analytics
18:39:50FromDiscord<Alea> nothing about the actual subscripts
18:40:34PMunch@ajusa, the build error is because I've forgotten to change Dockerfile_nopackages to reflect the _v1 change in Dockerfile
18:43:01PMunchYou can either apply those changes, or you can just build v1.4.8 instead :P
18:44:50FromDiscord<ajusa> wdym by v1.4.8? do I put that in the one file?
18:45:26PMunch`echo "v1.4.8" > curtag`
18:45:31PMunchThen run the Docker command
18:51:11FromDiscord<ajusa> gotcha, I will try that then with the nopackages file and see if I can get it working locally
18:52:20*Gustavo6046\away is now known as Gustavo6046
18:57:06PMunchI was able to build that one at least
19:04:26FromDiscord<Require Support> sent a code paste, see https://play.nim-lang.org/#ix=3TxM
19:04:55FromDiscord<ajusa> hm, tried that and I have the images building but the command to get the versions doesn't seem to work. Additionally, some of the other commands ran by this program require root and certain users?
19:06:04PMunchNot quite sure what you mean?
19:06:28PMunchIt is a bit hard-coded to the playground production environment I believe
19:06:33PMunchBut I have run it locally in the past
19:13:52FromDiscord<demotomohiro> In reply to @Require Support "so i have a": If you are just trying to use functions/procedures in .dll file: https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-import
19:18:33FromDiscord<demotomohiro> Nim has `dynlib` module that loads dll: https://nim-lang.org/docs/dynlib.html
19:28:33*PMunch quit (Quit: leaving)
19:28:36NimEventerNew thread by Mardiyah: Can't have correct Nim nested template. Please explain, see https://forum.nim-lang.org/t/9048
19:58:40*vicecea quit (Remote host closed the connection)
19:59:09*vicecea joined #nim
20:05:37FromDiscord<Bubblie> In reply to @PMunch "@Bubblie, sure": Sorry I didnt see this my phone died PMunch
20:06:12FromDiscord<Bubblie> Also for @tting you should use my tag as well so Bubblie#8978 with an @ instead so ill see it
20:06:39FromDiscord<Bubblie> Let me grab the code I wrote real quick
21:12:58*yiggityswaps joined #nim
21:14:31*yoyojambo quit (Ping timeout: 260 seconds)
21:28:39FromDiscord<Bubblie> Here is the code, sorry this took a while, I can send it on playground too
21:28:58FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=3Tym
21:29:36FromDiscord<Bubblie> Not sure if im doing this right
21:30:09FromDiscord<Bubblie> It specifically doesn’t work with this part
21:31:26FromDiscord<Bubblie> Im not sure if its because im using the way windows does paths
21:31:54FromDiscord<Bubblie> Also I made a pr for the windows install PMunch not sure if you saw
21:31:57*yiggityswaps quit (Ping timeout: 252 seconds)
21:32:32*yoyojambo joined #nim
21:43:35*wyrd quit (Ping timeout: 240 seconds)
21:45:34*wyrd joined #nim
22:10:20FromDiscord<Patitotective> how do i convert a cstring to a string?
22:10:35FromDiscord<Elegantbeef> `string(myCstring)` should work
22:11:40FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3TyD
22:16:51FromDiscord<Elegantbeef> `$myCstring`
22:17:35*pro quit (Ping timeout: 252 seconds)
22:17:39FromDiscord<Patitotective> thanks 🙃
22:24:39FromDiscord<hmmm> hi broskis I have a dumb algo question, basically I have a kind of dumb tree structure with parents each many children that can have more children. I have a couple of recursive procs that walk down the structure and harvest data and that was easy because I just put the results in a seq and be done with it. Now I need make a proc that copies the structure itself. I'm stumped because my recursive procs don't tack the different levels of nestin
22:25:00FromDiscord<Elegantbeef> `deepCopy`?
22:25:04FromDiscord<hmmm> wot
22:25:40FromDiscord<Elegantbeef> Deepcopy deeply copies an object
22:25:49FromDiscord<hmmm> ohrly?
22:25:54FromDiscord<hmmm> link to something
22:26:11FromDiscord<Elegantbeef> `myObj.deepCopy` doesnt really need a link now does it
22:26:13FromDiscord<hmmm> and what if I want to do it by hand
22:26:56FromDiscord<Elegantbeef> Iterate over the object duplicating the values from one to the other
22:27:39FromDiscord<hmmm> hmm
22:27:41FromDiscord<hmmm> that could work
22:30:00FromDiscord<Elegantbeef> I'd hope so, that's kinda how deep copy works
22:34:27FromDiscord<Patitotective> how can get the value behind `userData`? https://nimgl.dev/docs/imgui.html#ImGuiInputTextCallbackData
22:34:52FromDiscord<Elegantbeef> `cast[ptr MyType](myObj)` or similar
22:36:30FromDiscord<Elegantbeef> You either will need to allocate for that, use a variable you know will never go out of scope or use a reference
22:36:39FromDiscord<Elegantbeef> The latter requires doing `GcRef` and `GcUnref`
22:37:37FromDiscord<Patitotective> In reply to @Elegantbeef "You either will need": i'm passing to it a variable of a for loop, i think that it will never go out of scope (?)
22:38:06FromDiscord<Elegantbeef> It's likely it will
22:38:49FromDiscord<Patitotective> so, how do i use references lol↵if i was doing `name.unsafeAddr` now i do `ref name`?
22:38:51FromDiscord<Elegantbeef> for variables are stack allocated generally, so they do not outlive the procedure they're defined it
22:39:21FromDiscord<Elegantbeef> No
22:39:47FromDiscord<Elegantbeef> You need to allocate a reference and make sure it outlives the variable
22:39:50FromDiscord<Elegantbeef> It highly depends on what you're doing
22:39:53FromDiscord<Elegantbeef> outlives the procedure\
22:51:21*yiggityswaps joined #nim
22:51:27FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3TyL
22:51:47FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3TyL" => "https://paste.rs/T18"
22:52:40FromDiscord<Elegantbeef> That seems unsafe
22:52:41FromDiscord<Elegantbeef> make it a ref string and use `Gcref` and `GcUnref` and it'll be fine, or use `create`
22:52:47FromDiscord<Elegantbeef> `create` and `dealloc`
22:53:23FromDiscord<Elegantbeef> Here's an example of how using refs with `pointer`s work similar to this https://play.nim-lang.org/#ix=3TyO
22:54:27*yoyojambo quit (Ping timeout: 252 seconds)
22:58:40FromDiscord<Patitotective> like `GcRef[string](name)` instead of `name.unsafeAddr`?
22:58:53FromDiscord<Elegantbeef> No
22:59:04FromDiscord<Elegantbeef> `GCRef` does nothing but increment the GC ref counter
22:59:47FromDiscord<Elegantbeef> You need to do `var myString = new string; myString[] = myStringVal; GcRef(myString);` then `cast[pointer](myString)`
22:59:56FromDiscord<Elegantbeef> You cannot raise a non `ref` to ref
23:00:02FromDiscord<Elegantbeef> Actually this is dubm
23:00:04FromDiscord<Elegantbeef> Actually this is dumb
23:00:32FromDiscord<Elegantbeef> you can just do `GcRef(myStringVal)` and then `GcUnref(cast[string](data.userData))` inside the callback
23:01:15FromDiscord<Elegantbeef> I forgot you can do that with strings
23:02:56FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3TyR
23:06:20FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3TyT
23:06:43FromDiscord<Elegantbeef> The error is unrelated
23:06:55FromDiscord<Elegantbeef> `app` is a `var T` passed into your procedure
23:07:00FromDiscord<Elegantbeef> You cannot use it in a closure
23:07:35FromDiscord<Elegantbeef> Either make `app` a `ref object` or do `var app = app.addr` if you know it's safe to do as such
23:11:54FromDiscord<Patitotective> In reply to @Elegantbeef "Either make `app` a": i only need to make `type App = ref object`?
23:12:06FromDiscord<Patitotective> (edit) "In reply to @Elegantbeef "Either make `app` a": i only need to make `type App = ref object`? ... " added "cause it's not working if i only do that"
23:13:37FromDiscord<Patitotective> isn't easier to use closure scope? https://nim-lang.org/docs/system.html#closureScope.t,untyped
23:14:23FromDiscord<Elegantbeef> Your callback cannot be a closure anyway
23:14:35FromDiscord<Elegantbeef> It needs to be `cdecl`
23:14:48FromDiscord<Patitotective> ok
23:14:48FromDiscord<Elegantbeef> User data should be `app`
23:15:31FromDiscord<Elegantbeef> `buf` on the input of the callback has the cstring
23:16:00FromDiscord<Elegantbeef> You really need to learn low level programming with Nim to make this easier on yourself 😛
23:16:51FromDiscord<Elegantbeef> Someone needs to make a low level tutorial for the uninitiated
23:16:56FromDiscord<Patitotective> In reply to @Elegantbeef "`buf` on the input": yea but i dont need `buf`, i need the key that was used to create that `igInputText`
23:17:14FromDiscord<Patitotective> (edit) "dont" => "not only"
23:17:42FromDiscord<Elegantbeef> Imgui doesnt support this
23:18:05FromDiscord<Patitotective> In reply to @Elegantbeef "Imgui doesnt support this": doesn't support what?
23:18:13FromDiscord<Elegantbeef> You'd need to make a tuple or object to hold your `app` and `name`
23:18:25FromDiscord<Elegantbeef> Passing name and holding onto a reference to `app`
23:18:26FromDiscord<Patitotective> In reply to @Elegantbeef "You'd need to make": 🙃
23:18:46FromDiscord<Elegantbeef> I mean you're the one with the wacky design 😛
23:21:25FromDiscord<Patitotective> In reply to @Elegantbeef "I mean you're the": hehe, its just so i don't need to create the preferences widgets manually, they are automatically created from config file (which helps because it's a templat)
23:21:26FromDiscord<Patitotective> (edit) "templat)" => "template)"
23:21:35FromDiscord<Patitotective> (edit) "template)" => "template for an imgui app)"
23:25:28FromDiscord<Elegantbeef> Well the issue here is that you need to pass userdata which is a `ref (App, string)` so you then can reference it later
23:25:56FromDiscord<Elegantbeef> Imgui doesnt allow you to pass custom user data that is multiple objects so you need a single place that has both
23:26:16FromDiscord<Elegantbeef> So making `App` a reference and `GcRef`ing the string/app will make it work
23:27:24FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tz3
23:27:33FromDiscord<Elegantbeef> and unref each field
23:27:39FromDiscord<Patitotective> oh ok
23:28:26FromDiscord<Elegantbeef> You also could get around the gcref with memory memory allocations(which is basically what gcref/unref does)
23:29:49FromDiscord<Patitotective> In reply to @Elegantbeef "and unref each field": `GcUnref(cast[App](app))`? `GcUnref(cast[App](cast[UserData](data.userData)).app)`?
23:30:15FromDiscord<Elegantbeef> Dont need the `cast[App]`
23:34:01FromDiscord<Patitotective> sent a code paste, see https://paste.rs/GuH
23:34:22FromDiscord<Elegantbeef> You dont need `GCFullCollect`
23:35:15FromDiscord<Patitotective> this line `cast[pointer](userData)` complains `Error: expression cannot be cast to pointer`
23:35:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tz4
23:35:34FromDiscord<Elegantbeef> What's your `UserData` type?
23:35:41FromDiscord<Patitotective> `UserData = tuple[app: App, name: string]`
23:35:52FromDiscord<Elegantbeef> `ref`
23:35:58FromDiscord<Elegantbeef> It needs to be a ref
23:36:02FromDiscord<Elegantbeef> Like i said it needs to outlive the procedure
23:36:04FromDiscord<Patitotective> `UserData = ref tuple[app: App, name: string]`?
23:36:07FromDiscord<Elegantbeef> The only way to do that is with heap allocated memory
23:36:16FromDiscord<Elegantbeef> As such you need to use `ref`s
23:38:05FromDiscord<Patitotective> and how do i create a ref tuple? `let userData: ref UserData = (app, name)`?
23:38:25*mahlon joined #nim
23:39:09FromDiscord<Alea> sent a code paste, see https://play.nim-lang.org/#ix=3Tz5
23:39:09FromDiscord<Alea> Any clues why?
23:39:35FromDiscord<Elegantbeef> `new (App, string)`
23:39:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Tz6
23:39:59FromDiscord<Elegantbeef> Use an object if you want it to be cleaner
23:40:13FromDiscord<Elegantbeef> it'd just be `let userData = UserData(app: app, name: name)`
23:41:34NimEventerNew thread by Domogled: Two data bindings in vanilla nim for js app without virtual DOM, see https://forum.nim-lang.org/t/9049
23:43:01FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tz7
23:43:08FromDiscord<Elegantbeef> Yes
23:45:18FromDiscord<Elegantbeef> You can kinda think of `GCref` as "keep this alive" and `GCUnref` as "Ok i'm done with it"
23:46:06FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tz8
23:46:15FromDiscord<Patitotective> In reply to @Elegantbeef "You can kinda think": Someone needs to make a low level tutorial for the uninitiated
23:46:19FromDiscord<Elegantbeef> yes
23:46:26FromDiscord<Elegantbeef> Lol
23:47:27FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tz9
23:47:56FromDiscord<Elegantbeef> And line 58 is probably `app.x`?
23:48:32FromDiscord<Elegantbeef> How do you declare \`app?
23:50:10FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tza
23:50:35FromDiscord<Elegantbeef> `app.prefs`
23:50:40FromDiscord<Elegantbeef> where do you declare the `app` your pass in?
23:50:42FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Tzb
23:50:57FromDiscord<Elegantbeef> No
23:51:12FromDiscord<Patitotective> In reply to @Elegantbeef "where do you declare": in the `main` procedure (?)
23:52:06FromDiscord<Elegantbeef> Well it's a nil error so have fun finding what's causing it
23:52:22FromDiscord<Patitotective> In reply to @Patitotective "now a really verbose": then i pass `var app` to these procedures until `drawPrefsModal`
23:53:19FromDiscord<Patitotective> In reply to @Elegantbeef "Well it's a nil": maybe `app.prefs`, other times it have done the same↵maybe it's time to improve my error messages 🥲
23:55:12FromDiscord<Elegantbeef> I'm going to start on a pointers tutorial i guess