<< 01-12-2023 >>

00:00:02*marcus quit (Remote host closed the connection)
00:00:43*marcus joined #nim
00:11:23FromDiscord<takemichihanagaki3129> sent a code paste, see https://paste.rs/8Zj4b
00:13:09FromDiscord<stoneface86> `if e of Error:` I think
00:13:36FromDiscord<takemichihanagaki3129> In reply to @stoneface86 "`if e of Error:`": Thanks, I'll try it.
00:19:50FromDiscord<takemichihanagaki3129> In reply to @stoneface86 "`if e of Error:`": Worked, thanks a lot!
00:20:36FromDiscord<stoneface86> np!
00:25:06FromDiscord<Elegantbeef> @takemichihanagaki3129 you should do `except Error as e:...`
00:27:33NimEventerNew question by depperm: Why is nim expecting type Ordinal instead of Board, see https://stackoverflow.com/questions/77582410/why-is-nim-expecting-type-ordinal-instead-of-board
00:31:36FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "<@890300313729400832> you should do": Sure, thanks beef!
00:35:34FromDiscord<alireza0x0> hey everyone
00:36:35FromDiscord<alireza0x0> thanks for helps ❤️
00:38:38FromDiscord<alireza0x0> sent a code paste, see https://paste.rs/BLIzI
00:41:10FromDiscord<alireza0x0> (edit) "https://paste.rs/N0Naj" => "https://paste.rs/HEXuy"
00:41:34FromDiscord<alireza0x0> (edit) "https://paste.rs/qQKUD" => "https://paste.rs/E6wBQ"
00:58:17FromDiscord<alireza0x0> ah i got it know, thanks to ensureMove()
01:15:11*NimBot joined #nim
01:17:54*krux02 quit (Remote host closed the connection)
01:24:39*notbad quit (Remote host closed the connection)
01:25:09*notbad joined #nim
02:25:33*Guest78 joined #nim
02:38:06*Guest78 quit (Quit: Client closed)
02:57:55*edr quit (Quit: Leaving)
03:04:05NimEventerNew thread by angus: Local procs, generics, heapqueue, see https://forum.nim-lang.org/t/10712
04:35:06*MightyJoe quit (Quit: I'm out!)
04:46:07*azimut quit (Remote host closed the connection)
04:46:14*lucasta quit (Quit: Leaving)
04:46:38*azimut joined #nim
06:15:05*kenran joined #nim
06:49:35FromDiscord<nnsee> In reply to @alireza0x0 "anyone knows why this": maybe you meant `strv2 = move(strv)`?
07:07:12*advesperacit joined #nim
07:27:19*azimut quit (Ping timeout: 240 seconds)
07:57:22FromDiscord<voidwalker> what's the absolute minimal syntax to construct this ?
07:57:34*PMunch joined #nim
07:57:51FromDiscord<Elegantbeef> Make a proc constructor
07:59:23FromDiscord<voidwalker> sent a code paste, see https://paste.rs/bZQH5
08:01:38FromDiscord<Elegantbeef> Or use my `constructor`'s init syntax so it'd be `SystemInfo.init("3D0", "4d0", @["..."]`
08:01:51FromDiscord<Elegantbeef> https://github.com/beef331/constructor#struct-intialisers
08:03:22FromDiscord<voidwalker> what do you use to format long data to fit nim's const or table syntax ? Just used chatgpt, seems to do a decent job
08:03:38FromDiscord<Elegantbeef> I manually format code
08:03:54FromDiscord<voidwalker> what if you have 10.000 lines of data
08:04:00FromDiscord<Elegantbeef> I dont
08:04:10FromDiscord<Elegantbeef> I'd statically read it into a table
08:04:34FromDiscord<voidwalker> that makes sense
08:08:55FromDiscord<Elegantbeef> The more efficient thing to do would to be load it statically only if you cannot import a module which is generated just by doing `newLit(myTable)` in a macro
08:58:48FromDiscord<sOkam! 🫐> does nim docgen support `@sometag` javadoc like doc-comment tags?
09:12:14NimEventerNew thread by Ward: Is there a more elegant way to write destructors in Nim 2.0, see https://forum.nim-lang.org/t/10714
09:12:49FromDiscord<intellij_gamer> In reply to @heysokam "does nim docgen support": No, would be cool to get something like that implemented though
09:16:26PMunchWould be easy to add by post-processing the jsondoc output :)
09:20:40*redj quit (Ping timeout: 268 seconds)
09:22:09*redj joined #nim
09:34:19FromDiscord<matkuki.> Hi, is there a way to look at old `Nim manual` documentation?↵I would like to look at `1.16.14` and `1.16.16`.
09:36:29FromDiscord<System64 ~ Flandre Scarlet> In reply to @sys64 "And now we are": Does someone know how to fix this please?
09:42:53PMunchmatkuki., it's always possible to generate from the sources
09:42:59FromDiscord<intellij_gamer> In reply to @matkuki. "Hi, is there a": https://nim-lang.org/1.6.14/manual.html↵You can replace the 1.6.14 with any version, or just "docs" for stable
09:43:28PMunchI was just about to write that there was also a way to do it online but I couldn't remember the URL, thanks intellij_gamer!
09:43:42FromDiscord<Matic Kukovec> @intellij_gamer\: Excellent, thanks 👍👍👍
09:45:10FromDiscord<intellij_gamer> thank discord search =P↵I remembered seeing it recently but couldn't remember the URL pattern
09:45:37PMunchSystem64_~_Flandre_Scarlet, seems like you might have run into this: https://github.com/nim-lang/Nim/issues/13259
09:46:06PMunchintellij_gamer, we should probably have a link to those somewhere on the docs page :P
09:52:32FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "System64_~_Flandre_Scarlet, seems like you": ``put "gcc.options.always", ""`` Will it override options forever or only during this compilation
09:52:34FromDiscord<System64 ~ Flandre Scarlet> (edit) "compilation" => "compilation?"
09:56:24PMunchDepends on where you put it
09:56:32PMunchSame rules apply to that as any other Nim flag
09:56:36FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "Depends on where you": In a config.nims
09:56:56PMunchDepends on where the config.nims file is
09:57:06PMunchIf it is project local it only applies to that project
09:57:23FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "If it is project": Oh alright, and if it's in a library?
09:57:28PMunchYou can of course also have switches in your config so it only triggers for certain build constellations
09:57:41PMunchWell then it applies to everything which uses that library
09:57:49PMunchI think at least
09:57:52FromDiscord<System64 ~ Flandre Scarlet> Alright, thanks
10:02:57FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/1zL8V
10:10:50FromDiscord<System64 ~ Flandre Scarlet> it says it doesn't find limits.h↵Why does it need that and why it works fine on a normal project?
10:11:28PMunchlimits.h is a pretty common import
10:12:27PMunchYou probably need to tell it where your stdlib is
10:12:34PMunchThe C stdlib that is
10:14:45FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "The C stdlib that": Oh, probably the SGDK gcc doesn't have it↵But Nim doesn't have it either??
10:15:24PMunchlimits.h is a C thing, so Nim doesn't have it
10:15:55PMunchTo allow things like uint64 it uses limits.h to decide the sizes of various integer types
10:16:39FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "limits.h is a C": Nim embeds an gcc compiler so it must be around
10:17:20PMunchNo, Nim doesn't embed a C compiler
10:17:34PMunchNim just calls out to the C compiler on your system
10:17:43PMunchAnd your systems C compiler usually has limits.h
10:18:42FromDiscord<System64 ~ Flandre Scarlet> Oh↵But why does Nim installation suggest to download the C compiler?↵It's this one I'm talking about, the one Nim downloads
10:19:15PMunchThe Nim installation suggest you to download a C compiler because otherwise it wouldn't have a C compiler to call
10:19:38NimEventerNew thread by willi_kappler: Num_crunch: distributed computing, see https://forum.nim-lang.org/t/10715
10:19:51PMunchThe one Nim suggests you download definitely has limits.h
10:20:23PMunchBut you're using a custom SGDK version of GCC?
10:21:06FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "But you're using a": Yes, it supports m68000 cpu
10:21:26PMunchHmm, according to the README it just appears to use normal GCC
10:21:40PMunchIt just says that GCC is provided for convenience
10:21:57FromDiscord<System64 ~ Flandre Scarlet> But there is a nostdlib flag
10:22:15PMunchAh I see
10:22:23PMunchThen you probably need to write your own limits.h
10:22:30PMunchFortunately it's a pretty simple file
10:22:33PMunchhttps://www.tutorialspoint.com/c_standard_library/limits_h.htm
10:22:53PMunchIt's just a couple `#define` statements that sets those limit values for various integers
10:23:21FromDiscord<System64 ~ Flandre Scarlet> Can I steal a limits.h without my code being GPLed?
10:24:13PMunchDepends on where you "steal" it from
10:24:23PMunchIf you take it from somewhere without a GPL license then yes
10:24:46FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "Depends on where you": From an installed gcc environment
10:25:28PMunchWell you would have to make sure the values match what is actually going on on the Sega machine, so just taking the one from your system install probably won't work
10:27:45PMunchLooking at nimbase.h it seems you might just need CHAR_BIT
10:29:28FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "Looking at nimbase.h it": What is that? The size of a char?
10:30:46FromDiscord<fullvaluerider> import setutils is underlining the setutils in red. What do I do now?
10:31:14PMunchSystem64_~_Flandre_Scarlet, yeah I believe it's the amount of bits in a char
10:31:28FromDiscord<fullvaluerider> or how do I conver a string to a set of char to use in .strip
10:31:43PMunchfullvaluerider, does it compile?
10:31:55FromDiscord<fullvaluerider> no
10:32:07PMunchWith the error that it can't find setutils?
10:32:16PMunchTry `import std/setutils`
10:32:58FromDiscord<fullvaluerider> std/setutils works. what would be ther reason for needing std/
10:35:13FromDiscord<fullvaluerider> @pmunch Thanks for the tip
10:35:14PMunchAll new packages are added to `std` and all old packages work with `std` but doesn't require it for backwards compatability
10:35:27PMunchSo you're supposed to use `std` for all standard library imports
10:35:34PMunchNot sure how many people actually do though..
10:43:16*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
10:43:54*ehmry joined #nim
10:46:05*ehmry quit (Client Quit)
10:47:14FromDiscord<tauruuuuuus> I just got that `addPragma` is only good for routines, is there an equivalent for variable definitions?
11:04:33FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "System64_~_Flandre_Scarlet, yeah I believe": ``nimbase.h:258:20: fatal error: stddef.h: No such file or directory`` Now it complains about this aaah↵Like I have to override everything
11:29:33PMunchWhat can I say, you need some standard stuff for Nim to be able to run
11:29:44PMunchMight be a similar scenario though
11:32:32FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "What can I say,": I'll run into Header hell↵It will ask for another thing, then another thing, then mingw stuff and so on
11:37:44*ehmry joined #nim
11:42:43FromDiscord<System64 ~ Flandre Scarlet> C is a goofy programming language https://media.discordapp.net/attachments/371759389889003532/1180111735127031928/message.txt?ex=657c3bb3&is=6569c6b3&hm=226c100f4aeaac498a2809305dbb0831186b654fc1720ba2fb3999e194e69123&
11:42:53FromDiscord<nnsee> does your platform's toolchain not already have these?
11:43:19FromDiscord<System64 ~ Flandre Scarlet> In reply to @nnsee "does your platform's toolchain": I looked into SGDK folder, it doesn't have those headers
11:48:12PMunchThat is very strange
11:50:05FromDiscord<System64 ~ Flandre Scarlet> In reply to @PMunch "That is very strange": In fact, SGDK has its own gcc, but doesn't have an entire mingw
11:55:31FromDiscord<alireza0x0> In reply to @nnsee "maybe you meant `strv2": i have a ref object
11:55:45FromDiscord<alireza0x0> so thats why i called move this way, the other way will segfault
11:56:19FromDiscord<alireza0x0> when i see the generated c code, the eq_wasmoved_xxx is there but for some reason that did not reset my object state to zeros
12:01:26FromDiscord<nnsee> try #internals
12:02:47FromDiscord<System64 ~ Flandre Scarlet> https://forum.nim-lang.org/t/8183↵Seems another person tried and had trouble too
12:08:15NimEventerNew thread by miran: Advent of Nim 2023, see https://forum.nim-lang.org/t/10717
12:37:57FromDiscord<azzkikr> Alright I'm fairly a noob regarding nim. Suppose I want to unmarshal some arbitrary configuration file format into an `object`. How would one do that? Are macros the only option? Maybe somebody has some pointers or hints?
12:38:18PMunchDepends on when you want to do it
12:38:33PMunchMacros are compile-time, so it will read your config during compilation
12:38:49FromDiscord<azzkikr> Runtime, preferably
12:38:54PMunchIf you want the user to be able to change the config without recompiling then you need a normal proc
12:38:58PMunchRight, so a normal proc
12:39:16PMunchAnd you say arbitrary format, so you'll probably need a parser of some sort
12:39:36PMunchI highly recommend npeg: https://github.com/zevv/npeg
12:40:01FromDiscord<nnsee> In reply to @azzkikr "Alright I'm fairly a": if the format is already defined and it's a fairly common format, there is probably a library that can parse it
12:40:10FromDiscord<nnsee> if not, you'll just have to write a parser :)
12:40:34PMunchYou can see an example (quite a large one) of parsing a configuration format and command line arguments with npeg in my notifishower tool: https://github.com/PMunch/notifishower/blob/master/src/options.nim
12:40:43FromDiscord<azzkikr> Well let's say the definition is known before hand (so a full `type Blah = object` with all fields known beforehand)
12:41:35PMunchazzkikr, sounds like NPeg is a perfect fit
12:41:55PMunchYou define an object, then write a parser with peg rules that put things into the fields of your object
13:08:55*notbad quit (Ping timeout: 240 seconds)
13:23:31*rockcavera joined #nim
13:31:39*azimut joined #nim
13:36:02FromDiscord<bsljth> <@&371760044473319454>(s), can we have a separate channel for just discussing data structures and algorithms, if you agree it is necessary?
13:37:59PMunchYou can just discuss that here
13:40:26FromDiscord<alireza0x0> can someone share some docs about multi threading in nim
13:41:02FromDiscord<alireza0x0> i really feel we need more docs about this, i so that make me less afraid of coding multithreaded
13:41:15PMunchAgreed
13:41:26FromDiscord<alireza0x0> by the word docs, i mean some tutorials with examples not just manuals
13:42:03PMunchThere really aren't much in the way of docs for arc multithreading
13:42:28FromDiscord<alireza0x0> true
13:46:21PMunchHave you looked at Malbolgia?
13:51:43FromDiscord<alireza0x0> yea i had a quick look, also in nim task-pools and native thread type
13:52:28FromDiscord<alireza0x0> currently i have a basic knowledge about using guards for accessing a gloabl, but i really confused about isolate[T] and how should i play with it and move it around through channels
13:56:40*tiorock joined #nim
13:56:40*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
13:56:40*tiorock is now known as rockcavera
13:57:05*rockcavera quit (Remote host closed the connection)
14:29:16FromDiscord<yetiwizard> sent a code paste, see https://paste.rs/mMA6i
14:30:25FromDiscord<nervecenter> In reply to @yetiwizard "is it possible to": No, but you can do it at compile time. Replace `if` with `when` and the compiler will generate two code paths.
14:31:19FromDiscord<nervecenter> Or...wait, you're using a container type. If you turn it into an object variant then you can do runtime switching
14:31:29FromDiscord<nervecenter> Otherwise, it's compile time
14:32:10FromDiscord<jviega> I mean, you can always add a manual field for distinguishing types at runtime
14:32:13FromDiscord<yetiwizard> hmm, also for calling execute I have to cast an instance of X or Y into ref Base. Does it still work then?
14:32:46FromDiscord<yetiwizard> In reply to @jviega "I mean, you can": that's what I was thinking as an alternative. In that case, can I somehow do it without having to make an extra enum of every type?
14:32:54FromDiscord<jviega> It's impossible to fully resolve types statically in the face of inheritance
14:33:32FromDiscord<yetiwizard> In C# i guess it works cause of reflection
14:33:37FromDiscord<nervecenter> I'll just add that inheritance is generalyl discouraged and Nim offers a number of different ways to do things
14:33:40FromDiscord<odexine> You can do what your code writes but there are some issues to fix and I can’t write code right now
14:33:42FromDiscord<nervecenter> (edit) "generalyl" => "generally"
14:34:46FromDiscord<jviega> No, it's a theoretic result around inclusion polymorphism and it's very clear you need to add runtime type checking. It's pretty easy to come up with examples, like arrays of a base type with an arbitrary number of elements of different derived types.
14:35:10FromDiscord<odexine> ? Did I misunderstand something
14:35:37FromDiscord<odexine> You can check for the type if it uses inheritance, doesn’t the of operator do that?
14:35:39FromDiscord<jviega> I can assure you no language could add inheritance yet avoid runtime checking
14:35:47FromDiscord<odexine> Inherited objects contain RTTI
14:35:54FromDiscord<odexine> Yes it is runtime checking
14:40:48*rockcavera joined #nim
14:56:59*edr joined #nim
15:00:36FromDiscord<bostonboston> In reply to @yetiwizard "is it possible to": `If c.owner of x: ...` I think
15:06:03FromDiscord<odexine> i believe thats what youre looking to do?
15:07:19FromDiscord<yetiwizard> 😮 this actually works. Thanks a bunch! :D
15:07:57FromDiscord<odexine> sent a code paste, see https://paste.rs/UxbIn
15:09:56FromDiscord<yetiwizard> In reply to @odexine "You can check for": I just realized what you wrote xD sry I guess I skipped the `or` part
15:10:01FromDiscord<yetiwizard> thanks!
15:15:57FromDiscord<jviega> "owner" is a really odd name for that operation
15:28:37*PMunch quit (Quit: Leaving)
15:52:18FromDiscord<TuxTheArchUser> Owlkettle is so complicated...
15:52:23FromDiscord<TuxTheArchUser> I wish it had better docs...
15:52:30FromDiscord<TuxTheArchUser> Or I had someone who can help me with it...
15:58:33FromDiscord<saint.___.> In reply to @TuxTheArchUser "Or I had someone": I think @Phil can help you!
15:58:47FromDiscord<Phil> Wha? My name ? I was summoned?
15:58:59FromDiscord<TuxTheArchUser> In reply to @isofruit "Wha? My name ?": Yup
15:59:04FromDiscord<TuxTheArchUser> In reply to @saint.___. "I think <@180601887916163073> can": Oki!
15:59:19FromDiscord<Phil> What part of the docs is not understandable first off?
15:59:42FromDiscord<TuxTheArchUser> Is it me or docs barely exist? I can't find more than examples and migration guides or something like that
15:59:57FromDiscord<Phil> did you not find the nimibook?
16:00:00FromDiscord<TuxTheArchUser> Yeah-
16:01:24FromDiscord<Phil> Like: https://can-lehmann.github.io/owlkettle/docs/installation.html↵This provides insight into basically everything that owlkettle has. From a users perspective, you care about defining your own viewables, that's pretty much it
16:01:58FromDiscord<TuxTheArchUser> Ohh, thank you!
16:02:06FromDiscord<Phil> Wait, was that link not findable?
16:02:14FromDiscord<TuxTheArchUser> Yeah-
16:02:25FromDiscord<Phil> Well I guess the starting page is https://can-lehmann.github.io/owlkettle/README.html↵Either way
16:02:31FromDiscord<TuxTheArchUser> I found Owlkettle on Github, but didn't see that
16:02:53FromDiscord<Phil> Ahh check, in that case I'll put a note that the nimibook docs aren't easy enough to find and should have a more prominent link
16:03:12FromDiscord<TuxTheArchUser> Alsoo, what does ListBox looks like?
16:03:15FromDiscord<Phil> Note that this is basically a webpage built from a lot of the markdown files etc., this is basically an "aggregate" page
16:03:29FromDiscord<TuxTheArchUser> In reply to @isofruit "Note that this is": Yeah, I know
16:05:21FromDiscord<TuxTheArchUser> And how to properly make a grid? Basically I want to dedicate 1/4 of screen for a list and left space for text area (or whatever is it properly called) and text input? Examples are a bit... confusing
16:06:00FromDiscord<TuxTheArchUser> Reference page looks more readable
16:06:08FromDiscord<TuxTheArchUser> Alsoo, widget examples can't even be compiled
16:06:25FromDiscord<Phil> They can, I assume you're on windows?
16:06:34FromDiscord<TuxTheArchUser> Arch
16:06:39FromDiscord<TuxTheArchUser> But I'll crosscompile it
16:06:48FromDiscord<TuxTheArchUser> Because not only I will use it
16:07:14FromDiscord<Phil> sent a long message, see https://paste.rs/dxZkD
16:07:29FromDiscord<Phil> In that case you should not have issues there. The error you get as "can't even be compiled" doesn't tell me anything as I also am on arch and I compile these daily basically when contributing
16:07:44FromDiscord<Phil> (edit) "The" => "What's the" | "get as" => "get? As"
16:08:05FromDiscord<TuxTheArchUser> In reply to @TuxTheArchUser "Alsoo, widget examples can't": For example I can't compile Grid example (or I'm compiling it wrongly) https://media.discordapp.net/attachments/371759389889003532/1180178513001717860/image.png?ex=657c79e4&is=656a04e4&hm=91e5ea692e48aace0a6405d6c82bafa2a0e846d3c16fd00c95387133f0df8140&
16:08:28FromDiscord<Phil> Have you installed the head version?
16:08:42FromDiscord<TuxTheArchUser> I just typed ``nimble install owlkettle``
16:10:24*kenran quit (Remote host closed the connection)
16:10:27FromDiscord<Phil> I can't say what happened before my time contributing there, best I can say is that a fair amount of stuff requires being up-to-date.↵Owlkettle 3.0 is coming soon-ish (afaik it's basically feature freeze for now until it can all be reviewed before pumping the new version out) and that comes with a host of new stuff.↵↵So `nimble install owlkettle@#head` as per the installation instructions
16:10:34FromDiscord<TuxTheArchUser> I'll try to install the head version I guess- https://media.discordapp.net/attachments/371759389889003532/1180179140146634772/image.png?ex=657c7a79&is=656a0579&hm=b5920127712164076d9d3fe8720e03577c2ea20fe95351f025ed83ffbcb77e89&
16:10:50FromDiscord<TuxTheArchUser> Seriously... https://media.discordapp.net/attachments/371759389889003532/1180179205011558550/image.png?ex=657c7a89&is=656a0589&hm=002873a978f185985c8046ecb867622c52ab33fb310f42fb99e0c0a1b6ea84f9&
16:11:10FromDiscord<TuxTheArchUser> I hate Adwaita more than anything in the world...
16:12:14FromDiscord<Phil> It's not necessary for grid itself, but basically most of the "dummy" stuff inside the examples is written with adwaita widgets
16:12:25FromDiscord<TuxTheArchUser> God...
16:12:33FromDiscord<TuxTheArchUser> Wait...
16:12:38FromDiscord<Phil> Like ActionRow, PreferencesRow etc.
16:12:41FromDiscord<TuxTheArchUser> Do those widgets work only with Adwaita...
16:12:50FromDiscord<Phil> Adwaita is the library that provides them.
16:12:52FromDiscord<TuxTheArchUser> I mean those reference...
16:12:54FromDiscord<TuxTheArchUser> God...
16:12:56FromDiscord<Phil> These do not exist without Adwaita
16:12:58FromDiscord<TuxTheArchUser> Why is everything so hard...
16:13:17FromDiscord<TuxTheArchUser> Installing Adwaita will make me blind, I swear to god, I had enough Adwaita...
16:13:56FromDiscord<TuxTheArchUser> Opening any apps after installing Adwaita makes them feel like flashbang...
16:14:22FromDiscord<Phil> I'll can't claim to understand since I'm cruising on gnome with everything dark mode
16:14:26FromDiscord<Phil> (edit) "I'll" => "I"
16:14:46FromDiscord<TuxTheArchUser> Adwaita is unthemeable.
16:15:19FromDiscord<TuxTheArchUser> I tried GNOME for a week... had to get rid of almost everything because Adwaita broke everything...
16:15:23FromDiscord<Phil> It is theemable in the sense you can change colors. Not in the sense that you can change shapes 🤷‍♂️
16:15:48FromDiscord<TuxTheArchUser> Window buttons...
16:15:57FromDiscord<TuxTheArchUser> Who made them... I hate that person...
16:16:12FromDiscord<TuxTheArchUser> They're so ugly when they're placed on left side...
16:16:30FromDiscord<TuxTheArchUser> And you can't change them...
16:16:36FromDiscord<Phil> I would like to question wanting to use GTK if you don't like what the toolkit provides.↵↵On an unrelated sidenote, you can determine yourself where what stuff is placed in your application.
16:17:01FromDiscord<TuxTheArchUser> Owlkettle is complicated
16:17:09FromDiscord<Phil> I disagree
16:17:25FromDiscord<TuxTheArchUser> And the only GUI library that I used (not with Nim) is SDL1.2...
16:17:46FromDiscord<Phil> I mean, you don't seem to want to use GTK, then why use it?
16:17:58FromDiscord<TuxTheArchUser> SDL1.2 is so old and I can't imagine Nim supporting it...
16:18:08FromDiscord<TuxTheArchUser> In reply to @isofruit "I mean, you don't": What other choices do I have?
16:19:01FromDiscord<Phil> Look for QT libs, I recall playing around with both the one for QML and the one for wrapping C++ widgets.↵How extendable they are is anyone's guess, not sure if any of them had someone like me that just started carpet bombing the project with docs
16:19:25FromDiscord<TuxTheArchUser> Qt libs... I'm not sure if good Qt5 libs exist for Nim...
16:19:31FromDiscord<TuxTheArchUser> And Qt6 is basically too new...
16:19:37FromDiscord<Phil> nimble search qt
16:19:38FromDiscord<Phil> Got nimqml
16:19:56FromDiscord<Phil> and I don't remember using the other ones
16:20:19FromDiscord<TuxTheArchUser> Wait- just remembered how confusing QML was...
16:20:54FromDiscord<null_pointer0> With iterators in num can I compose them for example map an iterator of chars?
16:20:57FromDiscord<TuxTheArchUser> Most GUI libs are a bit... confusing... that's why I always used SDL1.2, but SDL1.2 is too old...
16:21:11FromDiscord<Phil> I mean I'm out at this point, my claim to fame is contributing to owlkettle so I'm going back to relaxing
16:21:18FromDiscord<Phil> (edit) "I mean I'm out at this point, my claim to fame is contributing to owlkettle ... so" added "not QT stuff"
16:21:28FromDiscord<TuxTheArchUser> Okay...
16:21:55FromDiscord<TuxTheArchUser> OH https://media.discordapp.net/attachments/371759389889003532/1180181994508918904/image.png?ex=657c7d22&is=656a0822&hm=ef0dfb03a245f8e6f9f8109bd4c54ffae95922558185259e1aa812ba1b080565&
16:22:35FromDiscord<TuxTheArchUser> Where is everything.. https://media.discordapp.net/attachments/371759389889003532/1180182163648430191/image.png?ex=657c7d4a&is=656a084a&hm=3db84d9d7c3972d4b66ced3a88455dd77b52142e7ea649e5707d7ecb4330c926&
16:22:36FromDiscord<TuxTheArchUser> (edit) "everything.." => "everything..."
16:22:58FromDiscord<odexine> no docs
16:23:05FromDiscord<TuxTheArchUser> Why...
16:23:18FromDiscord<odexine> because no one wants to write them
16:23:26FromDiscord<TuxTheArchUser> Why are people so lazy...
16:23:32FromDiscord<TuxTheArchUser> What if the library is incomplete...
16:23:45FromDiscord<Phil> I mean, I don't see you making a PR to add them 😛
16:24:09FromDiscord<Phil> I tend to agree that docs are important, which is why I contribute them, but I'm also aware of how much effort it is to write them in the first place.
16:24:17FromDiscord<TuxTheArchUser> In reply to @isofruit "I mean, I don't": Yeah because I'm dumb...
16:24:35FromDiscord<TuxTheArchUser> In reply to @isofruit "I tend to agree": Without docs it's hard to understand Nim libs sometimes...
16:24:45FromDiscord<TuxTheArchUser> I'm migrating from C...
16:24:52FromDiscord<TuxTheArchUser> Got tired of pointers and stuff...
16:25:02FromDiscord<Phil> I think you can get the barebones of docs etc. with the nim doc command
16:25:12FromDiscord<TuxTheArchUser> Ohh
16:25:35FromDiscord<Phil> That will turn the source code and its doc comments into a webpage for search through docs etc.
16:25:50FromDiscord<Phil> Generates an "index" file that lists all available symbols etc.
16:25:52FromDiscord<TuxTheArchUser> There's no doc comments...
16:25:54FromDiscord<TuxTheArchUser> Oh
16:26:16FromDiscord<Phil> Basically modules get turned into pages listing their procs, iterators etc. automatically
16:26:29FromDiscord<TuxTheArchUser> I see
16:26:32FromDiscord<TuxTheArchUser> That sounds cool
16:27:03FromDiscord<Phil> It's one of the fundamental reasons I try to bully people into writing doc comments on their public-API
16:27:16FromDiscord<Phil> And adding a github workflow to their projects
16:27:18FromDiscord<TuxTheArchUser> HTML... https://media.discordapp.net/attachments/371759389889003532/1180183353064951859/image.png?ex=657c7e66&is=656a0966&hm=c3486d753abea76593d475c827b9425dbfc16504c5a6e04c7c5bdf835dcec123&
16:27:22FromDiscord<Phil> (edit) "And adding a github workflow to their projects ... " added "that executes that stuff"
16:27:29FromDiscord<TuxTheArchUser> Hope it's not a mess
16:27:33FromDiscord<TuxTheArchUser> Gonna try to open it with Neovim
16:27:39FromDiscord<Phil> sure HTML, that's the ... what?
16:27:41FromDiscord<Phil> Why not browser?
16:27:54FromDiscord<Phil> Like that's what its for, IIRC it has JS elements for searching the index and everything
16:28:08FromDiscord<TuxTheArchUser> JS...
16:28:11FromDiscord<Phil> (edit) "elements" => "bits"
16:28:14FromDiscord<TuxTheArchUser> NetSurf doesn't implement full JS...
16:28:41FromDiscord<TuxTheArchUser> JS in NetSurf is actually experimental feature...
16:28:51FromDiscord<saint.___.> Is there no simple parseInt anymore?
16:29:18FromDiscord<saint.___.> Oh there are two parseints
16:29:19*azimut quit (Ping timeout: 240 seconds)
16:29:21FromDiscord<saint.___.> Man thats confusing
16:29:32FromDiscord<saint.___.> One in strutils and one in parseutils
16:30:00FromDiscord<Phil> You can also generate JSON or LaTeX if you prefer, see https://nim-lang.org/docs/docgen.html
16:30:29FromDiscord<TuxTheArchUser> Ohh
16:30:30FromDiscord<TuxTheArchUser> Thank you
16:31:26FromDiscord<TuxTheArchUser> What... https://media.discordapp.net/attachments/371759389889003532/1180184391260057762/image.png?ex=657c7f5d&is=656a0a5d&hm=995f4a3b36a88622e7a6961218bbb741673ec698780b77cb826234a9cb89263b&
16:32:26FromDiscord<TuxTheArchUser> Ohh https://media.discordapp.net/attachments/371759389889003532/1180184641190244372/image.png?ex=657c7f99&is=656a0a99&hm=97f9a039a40496a0b7a30608720c1083ab08978fb3ab4a34cf2a9f60a0ce302b&
16:32:53FromDiscord<TuxTheArchUser> If only I had a proper parser for it... https://media.discordapp.net/attachments/371759389889003532/1180184754826514473/image.png?ex=657c7fb4&is=656a0ab4&hm=a001c319cf37442551f9b111cd84e6e3f9f8d724f1d073a99a082af130cb16a2&
16:33:52FromDiscord<TuxTheArchUser> My Neovim is dying from that file...
16:34:32FromDiscord<Phil> I mean it is large, the JSON is intended for others to build upon and e.g. write their own visualization of
16:34:58FromDiscord<Phil> Basically not for human consumption, that's what the HTML output is for
16:35:26FromDiscord<TuxTheArchUser> HTML with JS isn't made for humans.
16:35:41FromDiscord<TuxTheArchUser> It's made for rich people with SSD and 16GB+ RAM.
16:36:00FromDiscord<TuxTheArchUser> I use ancient 5400RPM HDD.
16:36:53FromDiscord<TuxTheArchUser> My HDD is suffering from running browsers like Librewolf... NetSurf, W3M and Lynx are the only choices for me...
16:37:19FromDiscord<Phil> 🤷‍♂️ All I can say is the choices are there. You can try the Latex output but them's the breaks.
16:37:46FromDiscord<TuxTheArchUser> Okay-
16:40:02FromDiscord<TuxTheArchUser> Apparently the JS is broken, CSS too.
16:40:28FromDiscord<Phil> Given that it works on multiple different machines I'd claim that's more an issue with the CSS/JS engine implementation
16:41:39FromDiscord<Phil> But yeah I give up, nim doesn't have a ton of resources so there just aren't many doc-formats beyond the ones requiring somewhat modern hardware (I mean, I started nim on a Thinkpad T440, that was like 8 years old at the time).
16:41:47*azimut joined #nim
16:41:54FromDiscord<TuxTheArchUser> My HDD is more than 15 year old.
16:41:56FromDiscord<Phil> (edit) "time)." => "time).↵If none of that is applicable I can't say what to do."
16:42:03FromDiscord<TuxTheArchUser> Oh
16:42:04FromDiscord<TuxTheArchUser> Wait
16:42:07FromDiscord<TuxTheArchUser> Actually more than 20.
16:42:13FromDiscord<TuxTheArchUser> It's from Feb 2001.
16:42:20FromDiscord<Phil> I'd note that your HDD is then likely due for hardware failure and thus a security risk for your data.
16:42:39FromDiscord<TuxTheArchUser> I don't have any money to buy good HDD right now...
16:43:53FromDiscord<TuxTheArchUser> Where can I get dochack.js?
16:44:08FromDiscord<TuxTheArchUser> Web server logs say that it can't find that file
16:44:40FromDiscord<Phil> I mean, shrugging is all I can do at this point. Your PC is powerful enough to run discord which is essentially a browser, so imo it shouldn't be that much of a struggle, but I can't help with the kind of hardware constraints you're proposing
16:44:50FromDiscord<TuxTheArchUser> Actually...
16:44:54FromDiscord<TuxTheArchUser> There's 1 thing...
16:45:03FromDiscord<TuxTheArchUser> I know that I violated ToS, but...
16:45:12FromDiscord<TuxTheArchUser> I use unofficial ncurses client...
16:45:42FromDiscord<Phil> Triple shrugging at that point. There's an amount of non-standard that you just can't support without the necessary resources at some point
16:45:56FromDiscord<TuxTheArchUser> Yeah...
16:46:43FromDiscord<Phil> Like the solution to your problem would be having the nim docs in a local App rather than a web-based format - which was chosen because bang for buck its the most efficient in terms of effort spent - people reached.
16:47:23FromDiscord<Phil> Which could be an interesting owlkettle Project for sure, making something like DevHelp for GTK that eats in the JSON from nim doc and makes it searchable/presentable
16:47:34FromDiscord<TuxTheArchUser> I see.
16:47:39FromDiscord<kots> Iirc you get dochack if you build the docs with --project. Anyway, you probably won't get much out of the sdl wrapper's Nim docs, just use the actual SDL C docs
16:47:42FromDiscord<Phil> But given that that doesn't exist at the moment.... well yeah
16:48:03FromDiscord<TuxTheArchUser> In reply to @k0ts "Iirc you get dochack": I don't really know how different is it from normal SDL lib...
16:48:35FromDiscord<Phil> If that's the thing stopping you, you can just call the C-procs from nim, assuming you use it as a dynamic lib
16:49:27FromDiscord<Phil> Write yourself a single "bindings" module where you type out the procs you want with the accurate types, should be possible to copy paste from one of the SDL libs for a baseline
16:49:39FromDiscord<TuxTheArchUser> That sounds somewhat cursed...
16:49:41FromDiscord<Phil> Can use futhark or other auto-binding-generating tools as well
16:51:20FromDiscord<Phil> with GtkWidget and GApplication being distinct pointer and GApplicationFlags being an enum
16:52:02FromDiscord<sOkam! 🫐> In reply to @TuxTheArchUser "That sounds somewhat cursed...": not cursed. nim is technically c with a pretty face, some safety and other handy fe
16:52:03FromDiscord<Phil> In owlkettle we write most of those by hand, though PMunch with genui generated that code entirely
16:52:14FromDiscord<TuxTheArchUser> I see...
16:52:15FromDiscord<sOkam! 🫐> (edit) "fe" => "features"
16:52:50FromDiscord<Phil> In reply to @heysokam "not cursed. nim is": I guess that is only somewhat true (?), given that you can also go directly to a binary via llvm
16:53:01FromDiscord<Phil> or rather nlvm
16:53:08FromDiscord<Phil> sent a code paste, see https://paste.rs/Mw7Ot
16:53:23FromDiscord<Phil> Which I know works because I tried out its repl mode and god damn are llvm libs gargantuan
16:53:42FromDiscord<Phil> I still don't understand how all those static libs balloon the entire thing to over 20 GB
16:59:17FromDiscord<sOkam! 🫐> In reply to @isofruit "I guess that is": yes, of course. and all of the backends. it's a simplified truth for easier explanation
17:01:06FromDiscord<sOkam! 🫐> truer would be that nim has some of the best ffi integration with C, but that requires the person to understand ffi and the ecosystem of other langs to some capacity
17:02:08FromDiscord<Phil> Actually, is the C interaction affected if you use a path towards a binary that doesn't go through C?
17:02:26FromDiscord<Phil> I feel like it shouldn't
17:02:29FromDiscord<Phil> But also I know nothing
17:07:13FromDiscord<saint.___.> How do I get a seq or array of values of a table?
17:07:25FromDiscord<saint.___.> Is there a way to convert an iterator to an array/seq?
17:08:09FromDiscord<sOkam! 🫐> In reply to @saint.___. "Is there a way": toSeq if I recall correctly
17:10:09FromDiscord<sOkam! 🫐> In reply to @isofruit "Actually, is the C": how can you not go through C with the c backend? 🤔 don't think I understood the question
17:10:40FromDiscord<saint.___.> Doesn't work @sOkam! 🫐
17:10:42FromDiscord<Phil> Nah I meant using C code from nim code but compiling e.g. with nlvm directly to binary
17:11:00FromDiscord<Phil> I guess it should work since you're not calling C-code, you're calling into a dynlib like an .so file
17:22:24*systemdsucks quit (Quit: leaving)
17:23:17*systemdsucks joined #nim
17:41:34FromDiscord<saint.___.> Ugh i'm switching to PYTHON
17:46:53FromDiscord<nnsee> cringe
17:48:20FromDiscord<arathanis> there is a place for both 🙏
17:49:45FromDiscord<Phil> In reply to @saint.___. "How do I get": Basically you want to only have the values of a table? How performance critical is this task?
17:49:54FromDiscord<Phil> ~~Because my naive implementations are anything but fast~~
17:50:05FromDiscord<Phil> ~~But anything else takes effort~~
17:51:04FromDiscord<Phil> wait, there's a values iterator
17:51:55FromDiscord<Phil> In reply to @saint.___. "How do I get": Wait so is your setup `seq[Table[x, y]]` or is it `Table[x, seq[y]]`?
17:52:51FromDiscord<saint.___.> neither
17:52:57FromDiscord<saint.___.> its Table[x,y]
17:53:05FromDiscord<saint.___.> I just want a seq of y or x
17:53:19FromDiscord<saint.___.> This is a really common thing in other languages
17:53:27FromDiscord<saint.___.> It gives u a list of all the keys or all the values
17:53:46FromDiscord<saint.___.> ohh
17:53:55FromDiscord<saint.___.> I need to import sequtils
17:55:22FromDiscord<saint.___.> I started writing a lil python and then realized I hate the syntax
17:55:27FromDiscord<saint.___.> The chaining of functions
17:56:04FromDiscord<saint.___.> I'm not sure if it's a barrier to entry type thing but you have to remember a lot of std libs to import
17:56:28FromDiscord<Phil> Screw you Arathanis for being 500ms faster!
17:56:29FromDiscord<saint.___.> Ya I got it thank you frens
17:56:38FromDiscord<saint.___.> I was missing sequtils
17:56:44FromDiscord<saint.___.> Thats why I thought it wasn't working
17:57:30FromDiscord<arathanis> In reply to @isofruit "Screw you Arathanis for": 😃
17:58:25FromDiscord<arathanis> sent a code paste, see https://paste.rs/IQcgI
17:58:30FromDiscord<Phil> sent a code paste, see https://paste.rs/yYw9p
18:01:20FromDiscord<arathanis> (edit) "https://paste.rs/Ge6LL" => "https://paste.rs/9wk4H"
18:01:26FromDiscord<arathanis> (edit) "https://paste.rs/MhLoz" => "https://paste.rs/D84tq"
18:07:25FromDiscord<saint.___.> Can we get vi mode for inim
18:07:42FromDiscord<glomdom.> the repl?
18:07:47FromDiscord<saint.___.> Ya
18:08:01*m5zs7k quit (Ping timeout: 255 seconds)
18:08:08FromDiscord<saint.___.> It's not reading inputrc I guess
18:08:14FromDiscord<saint.___.> There's vi mode for loads of stuff
18:08:18FromDiscord<saint.___.> like sqlite even
18:08:20FromDiscord<arathanis> probably not... its not maintained anymore
18:08:20FromDiscord<glomdom.> i think you can just ripoff some vi mode from another repl
18:08:33FromDiscord<saint.___.> How thoguh
18:08:34FromDiscord<glomdom.> it isnt? it got updated like a month ago
18:08:44FromDiscord<arathanis> In reply to @glomdom. "it isnt? it got": maybe im looking at the wrong repo, I see not updates for 3 years
18:08:48FromDiscord<glomdom.> https://github.com/inim-repl/INim
18:08:52FromDiscord<arathanis> (edit) "not" => "no"
18:08:53FromDiscord<saint.___.> Is there something better than INim
18:09:04FromDiscord<glomdom.> ur own repl
18:09:05FromDiscord<arathanis> oh i guess they updated tests
18:09:06FromDiscord<arathanis> you are right
18:09:07FromDiscord<glomdom.> :TrollFace:
18:09:08FromDiscord<arathanis> nvm
18:09:12FromDiscord<saint.___.> (edit) "INim" => "INim?"
18:09:26FromDiscord<arathanis> In reply to @saint.___. "Is there something better": inim under the hood probably works simpler than you think lol
18:09:33FromDiscord<glomdom.> yea i dont think theres another repl other than inim
18:09:56*m5zs7k joined #nim
18:10:12FromDiscord<arathanis> its got some nice features wrapping it but ultimately its just keeping a file with everything you type and compiling and running it every time you send new line(s)
18:10:45FromDiscord<saint.___.> Ooh https://github.com/metakirby5/codi.vim
18:10:47FromDiscord<saint.___.> Apparently there is this
18:10:52FromDiscord<saint.___.> And someone implemented it for nim
18:11:09FromDiscord<glomdom.> well theres yo fix
18:11:29FromDiscord<saint.___.> Yay
18:16:02FromDiscord<nnsee> In reply to @saint.___. "Can we get vi": rlwrap has a vi mode
18:16:07FromDiscord<nnsee> might need the `-a` flag though
18:17:34FromDiscord<bostonboston> nlvim has a repl
18:18:26FromDiscord<bostonboston> (edit) "nlvim" => "nlvm"
18:20:02FromDiscord<nnsee> just tested, vi mode works fine with inim with the `-a` flag
18:20:07FromDiscord<nnsee> with rlwrap that is
18:27:53FromDiscord<saint.___.> Ooh thanks
18:27:58FromDiscord<saint.___.> I'll check that out
18:32:19*targz77 joined #nim
18:43:00FromDiscord<pmunch> Any interest in an AoC stream?
18:50:02*notbad joined #nim
18:50:28FromDiscord<nnsee> In reply to @pmunch "Any interest in an": yes
18:55:35FromDiscord<pmunch> Great, I'll fire it up
19:12:41*PMunch joined #nim
19:13:23FromDiscord<pmunch> In reply to @nnsee "yes": Stream is up! https://www.youtube.com/watch?v=DM0TgDOGTpo and https://www.twitch.tv/pmunche
19:14:15FromDiscord<nnsee> did i miss it? is it over?
19:14:29FromDiscord<nnsee> oh wait, that's last year's video
19:14:43PMunchhttps://www.youtube.com/watch?v=ubjWmgdl1Ug
19:14:51PMunchSorry, restream was giving me a bad link..
20:02:09FromDiscord<srabb> nim
20:04:08FromDiscord<nnsee> indeed, i believe so
20:33:32advesperacitis there documentation on how to do object composition?
20:34:59advesperacitor some up to date examples
20:35:43advesperacitI've found this which looks like what I want to do, but it's 3 years old and doesn't work https://gist.github.com/PhilipWitte/31b32858e23604bd925e
20:35:59FromDiscord<System64 ~ Flandre Scarlet> I hope his wheel will stop on Nim hehe https://media.discordapp.net/attachments/371759389889003532/1180245932969840660/image.png?ex=657cb8ae&is=656a43ae&hm=4f7826614cb29792d00593b81373e1b4428fa551cf63902b08078470aa4343c8&
20:36:48FromDiscord<Elegantbeef> It's also not even an implementration advesperacit
20:37:00FromDiscord<Elegantbeef> implementation even
20:39:55advesperacitah that explains that then
20:51:36FromDiscord<anuke> What are the consequences of 'ignoring' the warnings of gc-safety of global variable access by using `{.cast(gcsafe).}` in an async handler function?
20:52:11PMunchYour teeth will rot and fall out
20:52:17FromDiscord<anuke> horrifying
20:52:23PMunchMhm, not worth it
20:52:44PMunchThe real answer is that it really depends
20:53:06PMunchIf you're doing something which is actually safe, then you'll be fine, otherwise stuff might blow up
20:53:35PMunchHowever it being async I don't think there's much bad stuff that can happen
20:54:47FromDiscord<anuke> My context: I'm using telebot (Telegram bot library, <https://github.com/ba0f3/telebot.nim#usage>), and it's annoying to avoid global variables.↵↵The bot will auto-restart, so it's not that big a deal if it crashes sometimes. I'm just wondering why I didn't have this issue before 2.0.
20:56:07FromDiscord<saint.___.> There was some change in 2.0 that made it mandatory
20:56:25FromDiscord<saint.___.> Idk why but I know some things did break like the discord nim library
20:56:30FromDiscord<saint.___.> And I think some http servers
20:59:13FromDiscord<michaelb.eth> In reply to @anuke "What are the consequences": are you doing something multi-threaded?
20:59:27FromDiscord<anuke> No, see context above
20:59:38FromDiscord<anuke> I am using telebot, which is probably (?) not multithreaded
20:59:58FromDiscord<michaelb.eth> I did, but wasn't sure if you were mixing async and multi-threaded
21:00:06FromDiscord<michaelb.eth> In reply to @anuke "I am using telebot,": good point/question
21:00:37PMunchNot actually sure why async has to be marked GC-safe
21:00:49FromDiscord<anuke> The bot I have isn't much more complex than the example, I just have a few ref objects as global variables that are manipulated in the command handler
21:01:34PMunchIt's not multi-threaded, it's not doing anything too funky internally, so it should be all good
21:01:50FromDiscord<michaelb.eth> In reply to @PMunch "Not actually sure why": probably a kind-of-sloppy way to address the worlds of trouble/bugs people get into with concurrency in a single-threaded + event loop scenario
21:02:18PMunchI think async was originally meant to support multi-threading and that's why
21:02:25PMunchThat's what I've heard anyways
21:02:36FromDiscord<michaelb.eth> sure, makes sense
21:11:13PMunchMight be a total fabrication though :P
22:13:10NimEventerNew thread by tissatussa: Thread process can not change text buffer, see https://forum.nim-lang.org/t/10719
22:29:39*targz77 quit (Quit: Leaving)
22:31:43*disso-peach quit (Quit: Leaving)
22:32:52*PMunch quit (Quit: leaving)
23:25:08*targz77 joined #nim
23:42:36*systemonia joined #nim
23:47:20*advesperacit quit ()
23:54:42systemoniaWhere does nimble store the author's name? I wrote "Adam Sandler" as a joke and I can't figure out how to change that default.