00:00:02 | * | marcus quit (Remote host closed the connection) |
00:00:43 | * | marcus joined #nim |
00:11:23 | FromDiscord | <takemichihanagaki3129> sent a code paste, see https://paste.rs/8Zj4b |
00:13:09 | FromDiscord | <stoneface86> `if e of Error:` I think |
00:13:36 | FromDiscord | <takemichihanagaki3129> In reply to @stoneface86 "`if e of Error:`": Thanks, I'll try it. |
00:19:50 | FromDiscord | <takemichihanagaki3129> In reply to @stoneface86 "`if e of Error:`": Worked, thanks a lot! |
00:20:36 | FromDiscord | <stoneface86> np! |
00:25:06 | FromDiscord | <Elegantbeef> @takemichihanagaki3129 you should do `except Error as e:...` |
00:27:33 | NimEventer | New 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:36 | FromDiscord | <takemichihanagaki3129> In reply to @Elegantbeef "<@890300313729400832> you should do": Sure, thanks beef! |
00:35:34 | FromDiscord | <alireza0x0> hey everyone |
00:36:35 | FromDiscord | <alireza0x0> thanks for helps ❤️ |
00:38:38 | FromDiscord | <alireza0x0> sent a code paste, see https://paste.rs/BLIzI |
00:41:10 | FromDiscord | <alireza0x0> (edit) "https://paste.rs/N0Naj" => "https://paste.rs/HEXuy" |
00:41:34 | FromDiscord | <alireza0x0> (edit) "https://paste.rs/qQKUD" => "https://paste.rs/E6wBQ" |
00:58:17 | FromDiscord | <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:05 | NimEventer | New 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:35 | FromDiscord | <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:22 | FromDiscord | <voidwalker> what's the absolute minimal syntax to construct this ? |
07:57:34 | * | PMunch joined #nim |
07:57:51 | FromDiscord | <Elegantbeef> Make a proc constructor |
07:59:23 | FromDiscord | <voidwalker> sent a code paste, see https://paste.rs/bZQH5 |
08:01:38 | FromDiscord | <Elegantbeef> Or use my `constructor`'s init syntax so it'd be `SystemInfo.init("3D0", "4d0", @["..."]` |
08:01:51 | FromDiscord | <Elegantbeef> https://github.com/beef331/constructor#struct-intialisers |
08:03:22 | FromDiscord | <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:38 | FromDiscord | <Elegantbeef> I manually format code |
08:03:54 | FromDiscord | <voidwalker> what if you have 10.000 lines of data |
08:04:00 | FromDiscord | <Elegantbeef> I dont |
08:04:10 | FromDiscord | <Elegantbeef> I'd statically read it into a table |
08:04:34 | FromDiscord | <voidwalker> that makes sense |
08:08:55 | FromDiscord | <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:48 | FromDiscord | <sOkam! 🫐> does nim docgen support `@sometag` javadoc like doc-comment tags? |
09:12:14 | NimEventer | New 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:49 | FromDiscord | <intellij_gamer> In reply to @heysokam "does nim docgen support": No, would be cool to get something like that implemented though |
09:16:26 | PMunch | Would 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:19 | FromDiscord | <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:29 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @sys64 "And now we are": Does someone know how to fix this please? |
09:42:53 | PMunch | matkuki., it's always possible to generate from the sources |
09:42:59 | FromDiscord | <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:28 | PMunch | I 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:42 | FromDiscord | <Matic Kukovec> @intellij_gamer\: Excellent, thanks 👍👍👍 |
09:45:10 | FromDiscord | <intellij_gamer> thank discord search =P↵I remembered seeing it recently but couldn't remember the URL pattern |
09:45:37 | PMunch | System64_~_Flandre_Scarlet, seems like you might have run into this: https://github.com/nim-lang/Nim/issues/13259 |
09:46:06 | PMunch | intellij_gamer, we should probably have a link to those somewhere on the docs page :P |
09:52:32 | FromDiscord | <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:34 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "compilation" => "compilation?" |
09:56:24 | PMunch | Depends on where you put it |
09:56:32 | PMunch | Same rules apply to that as any other Nim flag |
09:56:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "Depends on where you": In a config.nims |
09:56:56 | PMunch | Depends on where the config.nims file is |
09:57:06 | PMunch | If it is project local it only applies to that project |
09:57:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "If it is project": Oh alright, and if it's in a library? |
09:57:28 | PMunch | You can of course also have switches in your config so it only triggers for certain build constellations |
09:57:41 | PMunch | Well then it applies to everything which uses that library |
09:57:49 | PMunch | I think at least |
09:57:52 | FromDiscord | <System64 ~ Flandre Scarlet> Alright, thanks |
10:02:57 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://paste.rs/1zL8V |
10:10:50 | FromDiscord | <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:28 | PMunch | limits.h is a pretty common import |
10:12:27 | PMunch | You probably need to tell it where your stdlib is |
10:12:34 | PMunch | The C stdlib that is |
10:14:45 | FromDiscord | <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:24 | PMunch | limits.h is a C thing, so Nim doesn't have it |
10:15:55 | PMunch | To allow things like uint64 it uses limits.h to decide the sizes of various integer types |
10:16:39 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "limits.h is a C": Nim embeds an gcc compiler so it must be around |
10:17:20 | PMunch | No, Nim doesn't embed a C compiler |
10:17:34 | PMunch | Nim just calls out to the C compiler on your system |
10:17:43 | PMunch | And your systems C compiler usually has limits.h |
10:18:42 | FromDiscord | <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:15 | PMunch | The Nim installation suggest you to download a C compiler because otherwise it wouldn't have a C compiler to call |
10:19:38 | NimEventer | New thread by willi_kappler: Num_crunch: distributed computing, see https://forum.nim-lang.org/t/10715 |
10:19:51 | PMunch | The one Nim suggests you download definitely has limits.h |
10:20:23 | PMunch | But you're using a custom SGDK version of GCC? |
10:21:06 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "But you're using a": Yes, it supports m68000 cpu |
10:21:26 | PMunch | Hmm, according to the README it just appears to use normal GCC |
10:21:40 | PMunch | It just says that GCC is provided for convenience |
10:21:57 | FromDiscord | <System64 ~ Flandre Scarlet> But there is a nostdlib flag |
10:22:15 | PMunch | Ah I see |
10:22:23 | PMunch | Then you probably need to write your own limits.h |
10:22:30 | PMunch | Fortunately it's a pretty simple file |
10:22:33 | PMunch | https://www.tutorialspoint.com/c_standard_library/limits_h.htm |
10:22:53 | PMunch | It's just a couple `#define` statements that sets those limit values for various integers |
10:23:21 | FromDiscord | <System64 ~ Flandre Scarlet> Can I steal a limits.h without my code being GPLed? |
10:24:13 | PMunch | Depends on where you "steal" it from |
10:24:23 | PMunch | If you take it from somewhere without a GPL license then yes |
10:24:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "Depends on where you": From an installed gcc environment |
10:25:28 | PMunch | Well 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:45 | PMunch | Looking at nimbase.h it seems you might just need CHAR_BIT |
10:29:28 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "Looking at nimbase.h it": What is that? The size of a char? |
10:30:46 | FromDiscord | <fullvaluerider> import setutils is underlining the setutils in red. What do I do now? |
10:31:14 | PMunch | System64_~_Flandre_Scarlet, yeah I believe it's the amount of bits in a char |
10:31:28 | FromDiscord | <fullvaluerider> or how do I conver a string to a set of char to use in .strip |
10:31:43 | PMunch | fullvaluerider, does it compile? |
10:31:55 | FromDiscord | <fullvaluerider> no |
10:32:07 | PMunch | With the error that it can't find setutils? |
10:32:16 | PMunch | Try `import std/setutils` |
10:32:58 | FromDiscord | <fullvaluerider> std/setutils works. what would be ther reason for needing std/ |
10:35:13 | FromDiscord | <fullvaluerider> @pmunch Thanks for the tip |
10:35:14 | PMunch | All new packages are added to `std` and all old packages work with `std` but doesn't require it for backwards compatability |
10:35:27 | PMunch | So you're supposed to use `std` for all standard library imports |
10:35:34 | PMunch | Not 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:14 | FromDiscord | <tauruuuuuus> I just got that `addPragma` is only good for routines, is there an equivalent for variable definitions? |
11:04:33 | FromDiscord | <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:33 | PMunch | What can I say, you need some standard stuff for Nim to be able to run |
11:29:44 | PMunch | Might be a similar scenario though |
11:32:32 | FromDiscord | <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:43 | FromDiscord | <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:53 | FromDiscord | <nnsee> does your platform's toolchain not already have these? |
11:43:19 | FromDiscord | <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:12 | PMunch | That is very strange |
11:50:05 | FromDiscord | <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:31 | FromDiscord | <alireza0x0> In reply to @nnsee "maybe you meant `strv2": i have a ref object |
11:55:45 | FromDiscord | <alireza0x0> so thats why i called move this way, the other way will segfault |
11:56:19 | FromDiscord | <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:26 | FromDiscord | <nnsee> try #internals |
12:02:47 | FromDiscord | <System64 ~ Flandre Scarlet> https://forum.nim-lang.org/t/8183↵Seems another person tried and had trouble too |
12:08:15 | NimEventer | New thread by miran: Advent of Nim 2023, see https://forum.nim-lang.org/t/10717 |
12:37:57 | FromDiscord | <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:18 | PMunch | Depends on when you want to do it |
12:38:33 | PMunch | Macros are compile-time, so it will read your config during compilation |
12:38:49 | FromDiscord | <azzkikr> Runtime, preferably |
12:38:54 | PMunch | If you want the user to be able to change the config without recompiling then you need a normal proc |
12:38:58 | PMunch | Right, so a normal proc |
12:39:16 | PMunch | And you say arbitrary format, so you'll probably need a parser of some sort |
12:39:36 | PMunch | I highly recommend npeg: https://github.com/zevv/npeg |
12:40:01 | FromDiscord | <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:10 | FromDiscord | <nnsee> if not, you'll just have to write a parser :) |
12:40:34 | PMunch | You 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:43 | FromDiscord | <azzkikr> Well let's say the definition is known before hand (so a full `type Blah = object` with all fields known beforehand) |
12:41:35 | PMunch | azzkikr, sounds like NPeg is a perfect fit |
12:41:55 | PMunch | You 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:02 | FromDiscord | <bsljth> <@&371760044473319454>(s), can we have a separate channel for just discussing data structures and algorithms, if you agree it is necessary? |
13:37:59 | PMunch | You can just discuss that here |
13:40:26 | FromDiscord | <alireza0x0> can someone share some docs about multi threading in nim |
13:41:02 | FromDiscord | <alireza0x0> i really feel we need more docs about this, i so that make me less afraid of coding multithreaded |
13:41:15 | PMunch | Agreed |
13:41:26 | FromDiscord | <alireza0x0> by the word docs, i mean some tutorials with examples not just manuals |
13:42:03 | PMunch | There really aren't much in the way of docs for arc multithreading |
13:42:28 | FromDiscord | <alireza0x0> true |
13:46:21 | PMunch | Have you looked at Malbolgia? |
13:51:43 | FromDiscord | <alireza0x0> yea i had a quick look, also in nim task-pools and native thread type |
13:52:28 | FromDiscord | <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:16 | FromDiscord | <yetiwizard> sent a code paste, see https://paste.rs/mMA6i |
14:30:25 | FromDiscord | <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:19 | FromDiscord | <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:29 | FromDiscord | <nervecenter> Otherwise, it's compile time |
14:32:10 | FromDiscord | <jviega> I mean, you can always add a manual field for distinguishing types at runtime |
14:32:13 | FromDiscord | <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:46 | FromDiscord | <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:54 | FromDiscord | <jviega> It's impossible to fully resolve types statically in the face of inheritance |
14:33:32 | FromDiscord | <yetiwizard> In C# i guess it works cause of reflection |
14:33:37 | FromDiscord | <nervecenter> I'll just add that inheritance is generalyl discouraged and Nim offers a number of different ways to do things |
14:33:40 | FromDiscord | <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:42 | FromDiscord | <nervecenter> (edit) "generalyl" => "generally" |
14:34:46 | FromDiscord | <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:10 | FromDiscord | <odexine> ? Did I misunderstand something |
14:35:37 | FromDiscord | <odexine> You can check for the type if it uses inheritance, doesn’t the of operator do that? |
14:35:39 | FromDiscord | <jviega> I can assure you no language could add inheritance yet avoid runtime checking |
14:35:47 | FromDiscord | <odexine> Inherited objects contain RTTI |
14:35:54 | FromDiscord | <odexine> Yes it is runtime checking |
14:40:48 | * | rockcavera joined #nim |
14:56:59 | * | edr joined #nim |
15:00:36 | FromDiscord | <bostonboston> In reply to @yetiwizard "is it possible to": `If c.owner of x: ...` I think |
15:06:03 | FromDiscord | <odexine> i believe thats what youre looking to do? |
15:07:19 | FromDiscord | <yetiwizard> 😮 this actually works. Thanks a bunch! :D |
15:07:57 | FromDiscord | <odexine> sent a code paste, see https://paste.rs/UxbIn |
15:09:56 | FromDiscord | <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:01 | FromDiscord | <yetiwizard> thanks! |
15:15:57 | FromDiscord | <jviega> "owner" is a really odd name for that operation |
15:28:37 | * | PMunch quit (Quit: Leaving) |
15:52:18 | FromDiscord | <TuxTheArchUser> Owlkettle is so complicated... |
15:52:23 | FromDiscord | <TuxTheArchUser> I wish it had better docs... |
15:52:30 | FromDiscord | <TuxTheArchUser> Or I had someone who can help me with it... |
15:58:33 | FromDiscord | <saint.___.> In reply to @TuxTheArchUser "Or I had someone": I think @Phil can help you! |
15:58:47 | FromDiscord | <Phil> Wha? My name ? I was summoned? |
15:58:59 | FromDiscord | <TuxTheArchUser> In reply to @isofruit "Wha? My name ?": Yup |
15:59:04 | FromDiscord | <TuxTheArchUser> In reply to @saint.___. "I think <@180601887916163073> can": Oki! |
15:59:19 | FromDiscord | <Phil> What part of the docs is not understandable first off? |
15:59:42 | FromDiscord | <TuxTheArchUser> Is it me or docs barely exist? I can't find more than examples and migration guides or something like that |
15:59:57 | FromDiscord | <Phil> did you not find the nimibook? |
16:00:00 | FromDiscord | <TuxTheArchUser> Yeah- |
16:01:24 | FromDiscord | <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:58 | FromDiscord | <TuxTheArchUser> Ohh, thank you! |
16:02:06 | FromDiscord | <Phil> Wait, was that link not findable? |
16:02:14 | FromDiscord | <TuxTheArchUser> Yeah- |
16:02:25 | FromDiscord | <Phil> Well I guess the starting page is https://can-lehmann.github.io/owlkettle/README.html↵Either way |
16:02:31 | FromDiscord | <TuxTheArchUser> I found Owlkettle on Github, but didn't see that |
16:02:53 | FromDiscord | <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:12 | FromDiscord | <TuxTheArchUser> Alsoo, what does ListBox looks like? |
16:03:15 | FromDiscord | <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:29 | FromDiscord | <TuxTheArchUser> In reply to @isofruit "Note that this is": Yeah, I know |
16:05:21 | FromDiscord | <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:00 | FromDiscord | <TuxTheArchUser> Reference page looks more readable |
16:06:08 | FromDiscord | <TuxTheArchUser> Alsoo, widget examples can't even be compiled |
16:06:25 | FromDiscord | <Phil> They can, I assume you're on windows? |
16:06:34 | FromDiscord | <TuxTheArchUser> Arch |
16:06:39 | FromDiscord | <TuxTheArchUser> But I'll crosscompile it |
16:06:48 | FromDiscord | <TuxTheArchUser> Because not only I will use it |
16:07:14 | FromDiscord | <Phil> sent a long message, see https://paste.rs/dxZkD |
16:07:29 | FromDiscord | <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:44 | FromDiscord | <Phil> (edit) "The" => "What's the" | "get as" => "get? As" |
16:08:05 | FromDiscord | <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:28 | FromDiscord | <Phil> Have you installed the head version? |
16:08:42 | FromDiscord | <TuxTheArchUser> I just typed ``nimble install owlkettle`` |
16:10:24 | * | kenran quit (Remote host closed the connection) |
16:10:27 | FromDiscord | <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:34 | FromDiscord | <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:50 | FromDiscord | <TuxTheArchUser> Seriously... https://media.discordapp.net/attachments/371759389889003532/1180179205011558550/image.png?ex=657c7a89&is=656a0589&hm=002873a978f185985c8046ecb867622c52ab33fb310f42fb99e0c0a1b6ea84f9& |
16:11:10 | FromDiscord | <TuxTheArchUser> I hate Adwaita more than anything in the world... |
16:12:14 | FromDiscord | <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:25 | FromDiscord | <TuxTheArchUser> God... |
16:12:33 | FromDiscord | <TuxTheArchUser> Wait... |
16:12:38 | FromDiscord | <Phil> Like ActionRow, PreferencesRow etc. |
16:12:41 | FromDiscord | <TuxTheArchUser> Do those widgets work only with Adwaita... |
16:12:50 | FromDiscord | <Phil> Adwaita is the library that provides them. |
16:12:52 | FromDiscord | <TuxTheArchUser> I mean those reference... |
16:12:54 | FromDiscord | <TuxTheArchUser> God... |
16:12:56 | FromDiscord | <Phil> These do not exist without Adwaita |
16:12:58 | FromDiscord | <TuxTheArchUser> Why is everything so hard... |
16:13:17 | FromDiscord | <TuxTheArchUser> Installing Adwaita will make me blind, I swear to god, I had enough Adwaita... |
16:13:56 | FromDiscord | <TuxTheArchUser> Opening any apps after installing Adwaita makes them feel like flashbang... |
16:14:22 | FromDiscord | <Phil> I'll can't claim to understand since I'm cruising on gnome with everything dark mode |
16:14:26 | FromDiscord | <Phil> (edit) "I'll" => "I" |
16:14:46 | FromDiscord | <TuxTheArchUser> Adwaita is unthemeable. |
16:15:19 | FromDiscord | <TuxTheArchUser> I tried GNOME for a week... had to get rid of almost everything because Adwaita broke everything... |
16:15:23 | FromDiscord | <Phil> It is theemable in the sense you can change colors. Not in the sense that you can change shapes 🤷♂️ |
16:15:48 | FromDiscord | <TuxTheArchUser> Window buttons... |
16:15:57 | FromDiscord | <TuxTheArchUser> Who made them... I hate that person... |
16:16:12 | FromDiscord | <TuxTheArchUser> They're so ugly when they're placed on left side... |
16:16:30 | FromDiscord | <TuxTheArchUser> And you can't change them... |
16:16:36 | FromDiscord | <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:01 | FromDiscord | <TuxTheArchUser> Owlkettle is complicated |
16:17:09 | FromDiscord | <Phil> I disagree |
16:17:25 | FromDiscord | <TuxTheArchUser> And the only GUI library that I used (not with Nim) is SDL1.2... |
16:17:46 | FromDiscord | <Phil> I mean, you don't seem to want to use GTK, then why use it? |
16:17:58 | FromDiscord | <TuxTheArchUser> SDL1.2 is so old and I can't imagine Nim supporting it... |
16:18:08 | FromDiscord | <TuxTheArchUser> In reply to @isofruit "I mean, you don't": What other choices do I have? |
16:19:01 | FromDiscord | <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:25 | FromDiscord | <TuxTheArchUser> Qt libs... I'm not sure if good Qt5 libs exist for Nim... |
16:19:31 | FromDiscord | <TuxTheArchUser> And Qt6 is basically too new... |
16:19:37 | FromDiscord | <Phil> nimble search qt |
16:19:38 | FromDiscord | <Phil> Got nimqml |
16:19:56 | FromDiscord | <Phil> and I don't remember using the other ones |
16:20:19 | FromDiscord | <TuxTheArchUser> Wait- just remembered how confusing QML was... |
16:20:54 | FromDiscord | <null_pointer0> With iterators in num can I compose them for example map an iterator of chars? |
16:20:57 | FromDiscord | <TuxTheArchUser> Most GUI libs are a bit... confusing... that's why I always used SDL1.2, but SDL1.2 is too old... |
16:21:11 | FromDiscord | <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:18 | FromDiscord | <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:28 | FromDiscord | <TuxTheArchUser> Okay... |
16:21:55 | FromDiscord | <TuxTheArchUser> OH https://media.discordapp.net/attachments/371759389889003532/1180181994508918904/image.png?ex=657c7d22&is=656a0822&hm=ef0dfb03a245f8e6f9f8109bd4c54ffae95922558185259e1aa812ba1b080565& |
16:22:35 | FromDiscord | <TuxTheArchUser> Where is everything.. https://media.discordapp.net/attachments/371759389889003532/1180182163648430191/image.png?ex=657c7d4a&is=656a084a&hm=3db84d9d7c3972d4b66ced3a88455dd77b52142e7ea649e5707d7ecb4330c926& |
16:22:36 | FromDiscord | <TuxTheArchUser> (edit) "everything.." => "everything..." |
16:22:58 | FromDiscord | <odexine> no docs |
16:23:05 | FromDiscord | <TuxTheArchUser> Why... |
16:23:18 | FromDiscord | <odexine> because no one wants to write them |
16:23:26 | FromDiscord | <TuxTheArchUser> Why are people so lazy... |
16:23:32 | FromDiscord | <TuxTheArchUser> What if the library is incomplete... |
16:23:45 | FromDiscord | <Phil> I mean, I don't see you making a PR to add them 😛 |
16:24:09 | FromDiscord | <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:17 | FromDiscord | <TuxTheArchUser> In reply to @isofruit "I mean, I don't": Yeah because I'm dumb... |
16:24:35 | FromDiscord | <TuxTheArchUser> In reply to @isofruit "I tend to agree": Without docs it's hard to understand Nim libs sometimes... |
16:24:45 | FromDiscord | <TuxTheArchUser> I'm migrating from C... |
16:24:52 | FromDiscord | <TuxTheArchUser> Got tired of pointers and stuff... |
16:25:02 | FromDiscord | <Phil> I think you can get the barebones of docs etc. with the nim doc command |
16:25:12 | FromDiscord | <TuxTheArchUser> Ohh |
16:25:35 | FromDiscord | <Phil> That will turn the source code and its doc comments into a webpage for search through docs etc. |
16:25:50 | FromDiscord | <Phil> Generates an "index" file that lists all available symbols etc. |
16:25:52 | FromDiscord | <TuxTheArchUser> There's no doc comments... |
16:25:54 | FromDiscord | <TuxTheArchUser> Oh |
16:26:16 | FromDiscord | <Phil> Basically modules get turned into pages listing their procs, iterators etc. automatically |
16:26:29 | FromDiscord | <TuxTheArchUser> I see |
16:26:32 | FromDiscord | <TuxTheArchUser> That sounds cool |
16:27:03 | FromDiscord | <Phil> It's one of the fundamental reasons I try to bully people into writing doc comments on their public-API |
16:27:16 | FromDiscord | <Phil> And adding a github workflow to their projects |
16:27:18 | FromDiscord | <TuxTheArchUser> HTML... https://media.discordapp.net/attachments/371759389889003532/1180183353064951859/image.png?ex=657c7e66&is=656a0966&hm=c3486d753abea76593d475c827b9425dbfc16504c5a6e04c7c5bdf835dcec123& |
16:27:22 | FromDiscord | <Phil> (edit) "And adding a github workflow to their projects ... " added "that executes that stuff" |
16:27:29 | FromDiscord | <TuxTheArchUser> Hope it's not a mess |
16:27:33 | FromDiscord | <TuxTheArchUser> Gonna try to open it with Neovim |
16:27:39 | FromDiscord | <Phil> sure HTML, that's the ... what? |
16:27:41 | FromDiscord | <Phil> Why not browser? |
16:27:54 | FromDiscord | <Phil> Like that's what its for, IIRC it has JS elements for searching the index and everything |
16:28:08 | FromDiscord | <TuxTheArchUser> JS... |
16:28:11 | FromDiscord | <Phil> (edit) "elements" => "bits" |
16:28:14 | FromDiscord | <TuxTheArchUser> NetSurf doesn't implement full JS... |
16:28:41 | FromDiscord | <TuxTheArchUser> JS in NetSurf is actually experimental feature... |
16:28:51 | FromDiscord | <saint.___.> Is there no simple parseInt anymore? |
16:29:18 | FromDiscord | <saint.___.> Oh there are two parseints |
16:29:19 | * | azimut quit (Ping timeout: 240 seconds) |
16:29:21 | FromDiscord | <saint.___.> Man thats confusing |
16:29:32 | FromDiscord | <saint.___.> One in strutils and one in parseutils |
16:30:00 | FromDiscord | <Phil> You can also generate JSON or LaTeX if you prefer, see https://nim-lang.org/docs/docgen.html |
16:30:29 | FromDiscord | <TuxTheArchUser> Ohh |
16:30:30 | FromDiscord | <TuxTheArchUser> Thank you |
16:31:26 | FromDiscord | <TuxTheArchUser> What... https://media.discordapp.net/attachments/371759389889003532/1180184391260057762/image.png?ex=657c7f5d&is=656a0a5d&hm=995f4a3b36a88622e7a6961218bbb741673ec698780b77cb826234a9cb89263b& |
16:32:26 | FromDiscord | <TuxTheArchUser> Ohh https://media.discordapp.net/attachments/371759389889003532/1180184641190244372/image.png?ex=657c7f99&is=656a0a99&hm=97f9a039a40496a0b7a30608720c1083ab08978fb3ab4a34cf2a9f60a0ce302b& |
16:32:53 | FromDiscord | <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:52 | FromDiscord | <TuxTheArchUser> My Neovim is dying from that file... |
16:34:32 | FromDiscord | <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:58 | FromDiscord | <Phil> Basically not for human consumption, that's what the HTML output is for |
16:35:26 | FromDiscord | <TuxTheArchUser> HTML with JS isn't made for humans. |
16:35:41 | FromDiscord | <TuxTheArchUser> It's made for rich people with SSD and 16GB+ RAM. |
16:36:00 | FromDiscord | <TuxTheArchUser> I use ancient 5400RPM HDD. |
16:36:53 | FromDiscord | <TuxTheArchUser> My HDD is suffering from running browsers like Librewolf... NetSurf, W3M and Lynx are the only choices for me... |
16:37:19 | FromDiscord | <Phil> 🤷♂️ All I can say is the choices are there. You can try the Latex output but them's the breaks. |
16:37:46 | FromDiscord | <TuxTheArchUser> Okay- |
16:40:02 | FromDiscord | <TuxTheArchUser> Apparently the JS is broken, CSS too. |
16:40:28 | FromDiscord | <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:39 | FromDiscord | <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:54 | FromDiscord | <TuxTheArchUser> My HDD is more than 15 year old. |
16:41:56 | FromDiscord | <Phil> (edit) "time)." => "time).↵If none of that is applicable I can't say what to do." |
16:42:03 | FromDiscord | <TuxTheArchUser> Oh |
16:42:04 | FromDiscord | <TuxTheArchUser> Wait |
16:42:07 | FromDiscord | <TuxTheArchUser> Actually more than 20. |
16:42:13 | FromDiscord | <TuxTheArchUser> It's from Feb 2001. |
16:42:20 | FromDiscord | <Phil> I'd note that your HDD is then likely due for hardware failure and thus a security risk for your data. |
16:42:39 | FromDiscord | <TuxTheArchUser> I don't have any money to buy good HDD right now... |
16:43:53 | FromDiscord | <TuxTheArchUser> Where can I get dochack.js? |
16:44:08 | FromDiscord | <TuxTheArchUser> Web server logs say that it can't find that file |
16:44:40 | FromDiscord | <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:50 | FromDiscord | <TuxTheArchUser> Actually... |
16:44:54 | FromDiscord | <TuxTheArchUser> There's 1 thing... |
16:45:03 | FromDiscord | <TuxTheArchUser> I know that I violated ToS, but... |
16:45:12 | FromDiscord | <TuxTheArchUser> I use unofficial ncurses client... |
16:45:42 | FromDiscord | <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:56 | FromDiscord | <TuxTheArchUser> Yeah... |
16:46:43 | FromDiscord | <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:23 | FromDiscord | <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:34 | FromDiscord | <TuxTheArchUser> I see. |
16:47:39 | FromDiscord | <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:42 | FromDiscord | <Phil> But given that that doesn't exist at the moment.... well yeah |
16:48:03 | FromDiscord | <TuxTheArchUser> In reply to @k0ts "Iirc you get dochack": I don't really know how different is it from normal SDL lib... |
16:48:35 | FromDiscord | <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:27 | FromDiscord | <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:39 | FromDiscord | <TuxTheArchUser> That sounds somewhat cursed... |
16:49:41 | FromDiscord | <Phil> Can use futhark or other auto-binding-generating tools as well |
16:51:20 | FromDiscord | <Phil> with GtkWidget and GApplication being distinct pointer and GApplicationFlags being an enum |
16:52:02 | FromDiscord | <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:03 | FromDiscord | <Phil> In owlkettle we write most of those by hand, though PMunch with genui generated that code entirely |
16:52:14 | FromDiscord | <TuxTheArchUser> I see... |
16:52:15 | FromDiscord | <sOkam! 🫐> (edit) "fe" => "features" |
16:52:50 | FromDiscord | <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:01 | FromDiscord | <Phil> or rather nlvm |
16:53:08 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/Mw7Ot |
16:53:23 | FromDiscord | <Phil> Which I know works because I tried out its repl mode and god damn are llvm libs gargantuan |
16:53:42 | FromDiscord | <Phil> I still don't understand how all those static libs balloon the entire thing to over 20 GB |
16:59:17 | FromDiscord | <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:06 | FromDiscord | <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:08 | FromDiscord | <Phil> Actually, is the C interaction affected if you use a path towards a binary that doesn't go through C? |
17:02:26 | FromDiscord | <Phil> I feel like it shouldn't |
17:02:29 | FromDiscord | <Phil> But also I know nothing |
17:07:13 | FromDiscord | <saint.___.> How do I get a seq or array of values of a table? |
17:07:25 | FromDiscord | <saint.___.> Is there a way to convert an iterator to an array/seq? |
17:08:09 | FromDiscord | <sOkam! 🫐> In reply to @saint.___. "Is there a way": toSeq if I recall correctly |
17:10:09 | FromDiscord | <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:40 | FromDiscord | <saint.___.> Doesn't work @sOkam! 🫐 |
17:10:42 | FromDiscord | <Phil> Nah I meant using C code from nim code but compiling e.g. with nlvm directly to binary |
17:11:00 | FromDiscord | <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:34 | FromDiscord | <saint.___.> Ugh i'm switching to PYTHON |
17:46:53 | FromDiscord | <nnsee> cringe |
17:48:20 | FromDiscord | <arathanis> there is a place for both 🙏 |
17:49:45 | FromDiscord | <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:54 | FromDiscord | <Phil> ~~Because my naive implementations are anything but fast~~ |
17:50:05 | FromDiscord | <Phil> ~~But anything else takes effort~~ |
17:51:04 | FromDiscord | <Phil> wait, there's a values iterator |
17:51:55 | FromDiscord | <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:51 | FromDiscord | <saint.___.> neither |
17:52:57 | FromDiscord | <saint.___.> its Table[x,y] |
17:53:05 | FromDiscord | <saint.___.> I just want a seq of y or x |
17:53:19 | FromDiscord | <saint.___.> This is a really common thing in other languages |
17:53:27 | FromDiscord | <saint.___.> It gives u a list of all the keys or all the values |
17:53:46 | FromDiscord | <saint.___.> ohh |
17:53:55 | FromDiscord | <saint.___.> I need to import sequtils |
17:55:22 | FromDiscord | <saint.___.> I started writing a lil python and then realized I hate the syntax |
17:55:27 | FromDiscord | <saint.___.> The chaining of functions |
17:56:04 | FromDiscord | <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:28 | FromDiscord | <Phil> Screw you Arathanis for being 500ms faster! |
17:56:29 | FromDiscord | <saint.___.> Ya I got it thank you frens |
17:56:38 | FromDiscord | <saint.___.> I was missing sequtils |
17:56:44 | FromDiscord | <saint.___.> Thats why I thought it wasn't working |
17:57:30 | FromDiscord | <arathanis> In reply to @isofruit "Screw you Arathanis for": 😃 |
17:58:25 | FromDiscord | <arathanis> sent a code paste, see https://paste.rs/IQcgI |
17:58:30 | FromDiscord | <Phil> sent a code paste, see https://paste.rs/yYw9p |
18:01:20 | FromDiscord | <arathanis> (edit) "https://paste.rs/Ge6LL" => "https://paste.rs/9wk4H" |
18:01:26 | FromDiscord | <arathanis> (edit) "https://paste.rs/MhLoz" => "https://paste.rs/D84tq" |
18:07:25 | FromDiscord | <saint.___.> Can we get vi mode for inim |
18:07:42 | FromDiscord | <glomdom.> the repl? |
18:07:47 | FromDiscord | <saint.___.> Ya |
18:08:01 | * | m5zs7k quit (Ping timeout: 255 seconds) |
18:08:08 | FromDiscord | <saint.___.> It's not reading inputrc I guess |
18:08:14 | FromDiscord | <saint.___.> There's vi mode for loads of stuff |
18:08:18 | FromDiscord | <saint.___.> like sqlite even |
18:08:20 | FromDiscord | <arathanis> probably not... its not maintained anymore |
18:08:20 | FromDiscord | <glomdom.> i think you can just ripoff some vi mode from another repl |
18:08:33 | FromDiscord | <saint.___.> How thoguh |
18:08:34 | FromDiscord | <glomdom.> it isnt? it got updated like a month ago |
18:08:44 | FromDiscord | <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:48 | FromDiscord | <glomdom.> https://github.com/inim-repl/INim |
18:08:52 | FromDiscord | <arathanis> (edit) "not" => "no" |
18:08:53 | FromDiscord | <saint.___.> Is there something better than INim |
18:09:04 | FromDiscord | <glomdom.> ur own repl |
18:09:05 | FromDiscord | <arathanis> oh i guess they updated tests |
18:09:06 | FromDiscord | <arathanis> you are right |
18:09:07 | FromDiscord | <glomdom.> :TrollFace: |
18:09:08 | FromDiscord | <arathanis> nvm |
18:09:12 | FromDiscord | <saint.___.> (edit) "INim" => "INim?" |
18:09:26 | FromDiscord | <arathanis> In reply to @saint.___. "Is there something better": inim under the hood probably works simpler than you think lol |
18:09:33 | FromDiscord | <glomdom.> yea i dont think theres another repl other than inim |
18:09:56 | * | m5zs7k joined #nim |
18:10:12 | FromDiscord | <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:45 | FromDiscord | <saint.___.> Ooh https://github.com/metakirby5/codi.vim |
18:10:47 | FromDiscord | <saint.___.> Apparently there is this |
18:10:52 | FromDiscord | <saint.___.> And someone implemented it for nim |
18:11:09 | FromDiscord | <glomdom.> well theres yo fix |
18:11:29 | FromDiscord | <saint.___.> Yay |
18:16:02 | FromDiscord | <nnsee> In reply to @saint.___. "Can we get vi": rlwrap has a vi mode |
18:16:07 | FromDiscord | <nnsee> might need the `-a` flag though |
18:17:34 | FromDiscord | <bostonboston> nlvim has a repl |
18:18:26 | FromDiscord | <bostonboston> (edit) "nlvim" => "nlvm" |
18:20:02 | FromDiscord | <nnsee> just tested, vi mode works fine with inim with the `-a` flag |
18:20:07 | FromDiscord | <nnsee> with rlwrap that is |
18:27:53 | FromDiscord | <saint.___.> Ooh thanks |
18:27:58 | FromDiscord | <saint.___.> I'll check that out |
18:32:19 | * | targz77 joined #nim |
18:43:00 | FromDiscord | <pmunch> Any interest in an AoC stream? |
18:50:02 | * | notbad joined #nim |
18:50:28 | FromDiscord | <nnsee> In reply to @pmunch "Any interest in an": yes |
18:55:35 | FromDiscord | <pmunch> Great, I'll fire it up |
19:12:41 | * | PMunch joined #nim |
19:13:23 | FromDiscord | <pmunch> In reply to @nnsee "yes": Stream is up! https://www.youtube.com/watch?v=DM0TgDOGTpo and https://www.twitch.tv/pmunche |
19:14:15 | FromDiscord | <nnsee> did i miss it? is it over? |
19:14:29 | FromDiscord | <nnsee> oh wait, that's last year's video |
19:14:43 | PMunch | https://www.youtube.com/watch?v=ubjWmgdl1Ug |
19:14:51 | PMunch | Sorry, restream was giving me a bad link.. |
20:02:09 | FromDiscord | <srabb> nim |
20:04:08 | FromDiscord | <nnsee> indeed, i believe so |
20:33:32 | advesperacit | is there documentation on how to do object composition? |
20:34:59 | advesperacit | or some up to date examples |
20:35:43 | advesperacit | I'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:59 | FromDiscord | <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:48 | FromDiscord | <Elegantbeef> It's also not even an implementration advesperacit |
20:37:00 | FromDiscord | <Elegantbeef> implementation even |
20:39:55 | advesperacit | ah that explains that then |
20:51:36 | FromDiscord | <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:11 | PMunch | Your teeth will rot and fall out |
20:52:17 | FromDiscord | <anuke> horrifying |
20:52:23 | PMunch | Mhm, not worth it |
20:52:44 | PMunch | The real answer is that it really depends |
20:53:06 | PMunch | If you're doing something which is actually safe, then you'll be fine, otherwise stuff might blow up |
20:53:35 | PMunch | However it being async I don't think there's much bad stuff that can happen |
20:54:47 | FromDiscord | <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:07 | FromDiscord | <saint.___.> There was some change in 2.0 that made it mandatory |
20:56:25 | FromDiscord | <saint.___.> Idk why but I know some things did break like the discord nim library |
20:56:30 | FromDiscord | <saint.___.> And I think some http servers |
20:59:13 | FromDiscord | <michaelb.eth> In reply to @anuke "What are the consequences": are you doing something multi-threaded? |
20:59:27 | FromDiscord | <anuke> No, see context above |
20:59:38 | FromDiscord | <anuke> I am using telebot, which is probably (?) not multithreaded |
20:59:58 | FromDiscord | <michaelb.eth> I did, but wasn't sure if you were mixing async and multi-threaded |
21:00:06 | FromDiscord | <michaelb.eth> In reply to @anuke "I am using telebot,": good point/question |
21:00:37 | PMunch | Not actually sure why async has to be marked GC-safe |
21:00:49 | FromDiscord | <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:34 | PMunch | It's not multi-threaded, it's not doing anything too funky internally, so it should be all good |
21:01:50 | FromDiscord | <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:18 | PMunch | I think async was originally meant to support multi-threading and that's why |
21:02:25 | PMunch | That's what I've heard anyways |
21:02:36 | FromDiscord | <michaelb.eth> sure, makes sense |
21:11:13 | PMunch | Might be a total fabrication though :P |
22:13:10 | NimEventer | New 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:42 | systemonia | Where 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. |