00:17:47 | * | Mister_Magister quit (Quit: bye) |
00:30:39 | FromDiscord | <zumi.dxy> In reply to @tixonochek "i definetely have a": yeah... so there's a protip for any new programming language: get mainstream or FAANG recognition before red-teamers do lol |
01:25:27 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
01:25:52 | * | SchweinDeBurg joined #nim |
02:19:38 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
02:43:02 | * | une left #nim (#nim) |
03:06:40 | * | lucasta quit (Quit: Leaving) |
04:01:44 | * | SchweinDeBurg joined #nim |
04:27:21 | * | pmp-p quit (Ping timeout: 252 seconds) |
04:29:56 | * | pmp-p joined #nim |
05:07:51 | NimEventer | New thread by dwhall256: A template to declare an enum, see https://forum.nim-lang.org/t/11331 |
05:42:54 | FromDiscord | <.bobbbob> uh, is it normal for the compiler to take 3 gigs of ram when doing a sort of complex regular expression with nim-regex? |
05:44:32 | * | pmp-p quit (Ping timeout: 260 seconds) |
05:45:09 | FromDiscord | <.bobbbob> and to take 20 minutes with no end in sight? |
05:46:51 | FromDiscord | <.bobbbob> that is it compiles fine with debug flag but release flag takes forever, guess I need to rework the logic |
05:48:10 | * | pmp-p joined #nim |
06:59:29 | FromDiscord | <odexine> In reply to @albassort "i wanna just throw": and what happens when they fail? |
07:09:30 | * | junaid_ joined #nim |
07:17:09 | Amun-Ra | .bobbbob: I experienced something similar with pegs |
07:33:41 | NimEventer | New thread by Araq: NVIDIA uses Nim!, see https://forum.nim-lang.org/t/11332 |
07:37:19 | FromDiscord | <odexine> "bait used to be believable" |
07:38:09 | FromDiscord | <Elegantbeef> It's better than his last year attempt at humour |
07:39:21 | FromDiscord | <odexine> i dont remember what last years was |
07:41:04 | FromDiscord | <Elegantbeef> It was as funny as a funeral |
07:41:24 | FromDiscord | <Elegantbeef> https://forum.nim-lang.org/t/10058#66293 |
07:43:22 | FromDiscord | <odexine> oh this |
07:43:40 | FromDiscord | <odexine> hella repressed memory i guess |
08:00:59 | * | entikan quit (Quit: bye!) |
08:07:59 | * | Amun-Ra looks at the date |
08:36:34 | * | ntat joined #nim |
08:45:47 | * | ntat quit (Quit: Leaving) |
09:12:21 | * | pmp-p quit (Ping timeout: 268 seconds) |
09:19:57 | * | ntat joined #nim |
09:46:58 | * | pmp-p joined #nim |
10:47:39 | * | krux02 joined #nim |
11:11:24 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=tVvFYsOOVURt |
11:13:05 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#pasty=HhYZLwAghMrX" => "https://play.nim-lang.org/#pasty=hJGsPrBpGahC" |
11:13:20 | FromDiscord | <solitudesf> fmt works on static strings |
11:13:23 | FromDiscord | <odexine> Format strings must be compile |
11:13:23 | FromDiscord | <odexine> Fuck |
11:13:24 | FromDiscord | <solitudesf> known at compiletime |
11:13:37 | FromDiscord | <solitudesf> In reply to @odexine "Fuck": get obliterated |
11:13:57 | FromDiscord | <sOkam! 🫐> so I cannot read it from a file unless its compiletime? 😔 |
11:14:02 | FromDiscord | <odexine> Yes |
11:14:10 | FromDiscord | <sOkam! 🫐> that sucks 😦 |
11:14:23 | FromDiscord | <odexine> fmt parses and works on the string on CT |
11:14:34 | FromDiscord | <sOkam! 🫐> ic |
11:14:42 | FromDiscord | <sOkam! 🫐> I assume `&` does the same? |
11:14:50 | FromDiscord | <odexine> You’re gonna need another thing to do it on runtime |
11:14:52 | FromDiscord | <odexine> In reply to @heysokam "I assume `&` does": ? |
11:14:54 | FromDiscord | <odexine> Oh |
11:14:55 | FromDiscord | <odexine> Yes |
11:15:30 | FromDiscord | <sOkam! 🫐> wait, does `std/strutils %` work at runtime? that could solve it |
11:15:53 | FromDiscord | <solitudesf> it does, since you explicitly pass it the data needed |
11:16:18 | FromDiscord | <sOkam! 🫐> zenks |
11:32:51 | FromDiscord | <ebahi> sent a code paste, see https://play.nim-lang.org/#pasty=gauGmEEfseJR |
11:36:07 | FromDiscord | <ebahi> i tried making a type called mfaMethod and adding it as an argument but i felt like it added more complexity |
11:36:52 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=jWYrXvJwgxGd |
11:37:08 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#pasty=yPQUyLjOmzCU" => "https://play.nim-lang.org/#pasty=waTbVzVIKPoc" |
11:37:20 | FromDiscord | <ebahi> ill try it |
11:37:49 | FromDiscord | <sOkam! 🫐> you can make assign it a value into the argument, to make it a default argument, incase you only choose the style ocassionally |
11:37:59 | FromDiscord | <sOkam! 🫐> (edit) removed "make" | removed "it" |
11:42:51 | * | Mister_Magister joined #nim |
12:05:54 | FromDiscord | <norax.2> how do i handle like ctrl +c |
12:05:56 | FromDiscord | <norax.2> on nim |
12:06:07 | FromDiscord | <norax.2> whitout putting a whole try arround my code |
12:06:23 | FromDiscord | <norax.2> (edit) "whitout putting a ... whole" added " try around my" | removed "try arround my" |
12:09:49 | FromDiscord | <norax.2> In reply to @ebahi "hello, im having a": but the real thing is |
12:09:54 | FromDiscord | <norax.2> why are you making a log in |
12:10:05 | FromDiscord | <norax.2> when literally you can use a simple url whit the bot token |
12:10:12 | FromDiscord | <norax.2> thats for a user bot |
12:14:20 | FromDiscord | <odexine> Or a third party client |
12:18:33 | FromDiscord | <norax.2> In reply to @odexine "Or a third party": yeah i dont mind(at all) but i whant to just warning that the thing breaks discord tos |
12:18:50 | FromDiscord | <odexine> Okay |
12:18:51 | FromDiscord | <norax.2> i also did one |
12:19:03 | FromDiscord | <norax.2> but yeah they will prb ban the account that uses the client |
12:19:19 | FromDiscord | <norax.2> so use an alt |
12:35:30 | FromDiscord | <whisperecean> I am using parseopt and I'd like to have something like this --file (or -f) and then /tmp/file.txt and not -f="/tmp/file.txt" |
12:35:33 | FromDiscord | <whisperecean> How to achieve this? |
12:35:47 | FromDiscord | <ebahi> In reply to @norax.2 "but the real thing": its a simple project i made as a wrapper for discord's private user api |
12:55:30 | FromDiscord | <nnsee> In reply to @whisperecean "How to achieve this?": https://nim-lang.org/docs/parseopt.html#nimshortnoval-and-nimlongnoval |
12:57:06 | FromDiscord | <nnsee> alternatively, use something like cligen. imo just much nicer to work with |
13:05:52 | * | Mister_Magister quit (Excess Flood) |
13:07:07 | * | Mister_Magister joined #nim |
13:10:48 | FromDiscord | <odexine> me not wondering what a noval was, thinking its some sort of strange oval |
13:21:03 | FromDiscord | <nnsee> i like my novals long |
13:50:14 | * | def- quit (Quit: -) |
13:50:32 | * | def- joined #nim |
13:55:31 | FromDiscord | <whisperecean> In reply to @nnsee "alternatively, use something like": I have noticed...this is really terrible to work with |
13:57:08 | FromDiscord | <nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=IUjLqkkElagO |
13:58:59 | FromDiscord | <odexine> it depends on how you want to model it |
13:59:11 | FromDiscord | <odexine> some people dont want that (i personally dont) |
14:04:18 | FromDiscord | <whisperecean> But I dont get the doc. I want -f file.txt but I cant find that option |
14:04:27 | NimEventer | New thread by Charles: How to use dynamic dispatch with inheritance without converting to the appropriate subtype by hand?, see https://forum.nim-lang.org/t/11335 |
14:06:56 | FromDiscord | <whisperecean> Or should I just specify longNoVal for f,file? |
14:07:25 | FromDiscord | <nnsee> In reply to @whisperecean "Or should I just": hm, it looks like you maybe can't do that with short opts |
14:08:21 | FromDiscord | <nnsee> In reply to @whisperecean "Or should I just": no, you'd want the opposite |
14:08:38 | FromDiscord | <nnsee> `f` and `file` are both _expected_ to have a value |
14:09:16 | FromDiscord | <whisperecean> So what should I use? |
14:11:22 | FromDiscord | <whisperecean> I rarely see utils which work like this ... -option="test" --file="/tmp/file.txt" |
14:11:45 | FromDiscord | <nnsee> https://play.nim-lang.org/#pasty=RdTpZfMTshtD it looks like the short option does not like spaces. with no space, it works as expected |
14:15:34 | FromDiscord | <nomad0529> sent a code paste, see https://play.nim-lang.org/#pasty=TaxVHBbMtouz |
14:16:10 | FromDiscord | <whisperecean> @nnsee So there are 2 options to do this? |
14:17:27 | FromDiscord | <_nenc> In reply to @whisperecean "So what should I": I think maybe parseopts can't do that↵Nim has it's custom in cli options `--a:v -b:v` |
14:18:24 | FromDiscord | <whisperecean> I see. Ill try cligen then |
14:19:53 | FromDiscord | <_nenc> i am afraid maybe cligen also can't do that \:( |
14:20:31 | FromDiscord | <whisperecean> wait what? |
14:20:35 | FromDiscord | <whisperecean> this is basic functionality.... |
14:21:40 | FromDiscord | <solitudesf> it can. you can even use cligen/parseopt3 to have drop-in alternative to stdlib parseopt that works like you expect. |
14:22:40 | FromDiscord | <whisperecean> I just have a simple -a int -f file.txt |
14:22:47 | FromDiscord | <whisperecean> (edit) "I just ... have" added "want to" |
14:23:01 | FromDiscord | <solitudesf> okay |
14:23:08 | FromDiscord | <whisperecean> That's all |
14:23:12 | FromDiscord | <solitudesf> good |
14:23:22 | FromDiscord | <_nenc> I am not very familiar with cli libs in Nim, but I don't know any lib that majorly works like that. |
14:23:45 | FromDiscord | <whisperecean> So what do I do to achieve this result? |
14:23:57 | FromDiscord | <solitudesf> In reply to @whisperecean "So what do I": use the hecking cligen? |
14:24:06 | FromDiscord | <solitudesf> the guy is feeding you misinfo |
14:24:29 | FromDiscord | <_nenc> you can implement it \:D↵or cligen/parseopt3, idk that but I hope it supports that |
14:25:14 | FromDiscord | <_nenc> yeah, I checked it, I think it works like what you want |
14:25:43 | FromDiscord | <_nenc> sent a code paste, see https://play.nim-lang.org/#pasty=JCZPEZrrTMnN |
14:33:50 | FromDiscord | <treeform> In reply to @chronos.vitaqua "Should I just use": If you don't have to use JWT, don't. It's better to just use our own random token that you compare with the database. I find JWT just stupid. |
14:34:30 | FromDiscord | <treeform> Also guzba/jwttea is a pure nim lib that does not require openssl. |
14:34:31 | FromDiscord | <whisperecean> But from the dispatch proc fun how do I assign my variables? |
14:34:41 | FromDiscord | <treeform> (edit) "guzba/jwttea" => "guzba/jwtea" |
14:35:01 | FromDiscord | <Robyn [She/Her]> In reply to @treeform "If you don't have": Fair enough, what's the stupid thing about JWT? The vulnerabilities it exposed? |
14:35:25 | FromDiscord | <treeform> no vulnerabilities, its just complexity overkill for most projects. |
14:36:57 | FromDiscord | <Robyn [She/Her]> Fair enough |
14:37:08 | FromDiscord | <treeform> I always want to avoid complexity, I can't avoid using JWT because google requires it. |
14:37:30 | FromDiscord | <treeform> A random auth token is way simpler |
14:38:28 | FromDiscord | <treeform> then JWT (which requires openSSL and eliptic key cryptography) and double rounds to take your long live token into a short lived token etc... |
14:38:56 | FromDiscord | <treeform> I wasted days dealing with that, don't make your users waste their time! |
14:39:16 | FromDiscord | <treeform> use random auth token |
14:39:42 | FromDiscord | <Robyn [She/Her]> Fair enough, my token format should be secure enough either way since it only stores minimal data |
14:39:53 | FromDiscord | <Robyn [She/Her]> And none of it is private data really |
14:40:15 | FromDiscord | <Robyn [She/Her]> Just an encrypted string of `{user id}.{token id}.{timestamp}` |
14:42:47 | FromDiscord | <treeform> why not just "token id" |
14:42:50 | FromDiscord | <treeform> then you look it up in the db? |
14:44:28 | FromDiscord | <Robyn [She/Her]> That's a good point actually |
14:44:35 | FromDiscord | <Robyn [She/Her]> Originally it was gonna be unencrypted |
14:45:36 | FromDiscord | <odexine> depends on you, "looking up a db" could be too much complexity compared to jwt. but in most cases it is not |
14:45:39 | FromDiscord | <Robyn [She/Her]> Actually, unencrypted would probably be easier to do and it's not like it'd cause any issues |
14:45:57 | FromDiscord | <odexine> i dont think theres a reason to encrypt random gen tokens |
14:46:03 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "depends on you, "looking": Looking it up is easy and painless so not a problem |
14:46:14 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "i dont think theres": Yeah I'm realising that now |
14:48:11 | FromDiscord | <treeform> less complexity is my goal when I build stuff |
14:48:28 | FromDiscord | <treeform> you shoud be running all your trafic though https so everything is always encrypted |
14:48:50 | FromDiscord | <Robyn [She/Her]> In reply to @treeform "you shoud be running": Also true yeah |
14:49:13 | FromDiscord | <treeform> (https is very easy to do with services like cloud flare or let's encrypt plugin for nginx) |
14:50:56 | FromDiscord | <Robyn [She/Her]> Yeah I'm planning on using Cloudflare so no problems here |
14:53:24 | FromDiscord | <odexine> ~~caddy~~ |
14:54:07 | FromDiscord | <Robyn [She/Her]> Also probably Caddy, yeah- |
14:55:42 | FromDiscord | <whisperecean> In reply to @whisperecean "But from the dispatch": Any hints? |
14:56:33 | * | pmp-p quit (Ping timeout: 252 seconds) |
14:57:39 | * | pmp-p joined #nim |
14:58:49 | FromDiscord | <vindaar> Can you clarify? When you have some argument `file` of the proc you dispatch via cligen, the `file` argument will contain the data you pass via `-f FOO` or `--file FOO`↵(@whisperecean) |
15:00:07 | FromDiscord | <whisperecean> That argument will contain the data but based on that argument I want to call a different proc or rather pass that data to that proc |
15:00:26 | Amun-Ra | nim arg parser does not support posix style -f foo / --file foo |
15:01:49 | FromDiscord | <vindaar> then inside of the proc you simply call another proc with the `file` passed on? I'm confused↵(@whisperecean) |
15:02:06 | FromDiscord | <whisperecean> Like inside of the fun proc? |
15:02:09 | FromDiscord | <whisperecean> I dont get it |
15:03:21 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#pasty=rGDimBHJpkIg |
15:03:49 | Amun-Ra | ah, cligen |
15:07:32 | FromDiscord | <whisperecean> sent a code paste, see https://play.nim-lang.org/#pasty=VwezYPIAKWyR |
15:08:32 | FromDiscord | <vindaar> feel free to ping me if you have further questions about cligen |
15:09:07 | FromDiscord | <whisperecean> Just one more thing. How do I make parameters optional and how do I just print version after that? |
15:10:07 | FromDiscord | <whisperecean> Ah I think I got it |
15:17:00 | FromDiscord | <whisperecean> Can I overwrite the usage as well? |
15:26:11 | NimEventer | New thread by ninovanhooff: Am iterating over this sequence correctly?, see https://forum.nim-lang.org/t/11336 |
15:31:01 | * | pmp-p quit (Ping timeout: 272 seconds) |
15:42:33 | FromDiscord | <vindaar> optional\: just give the argument a default value.↵overwrite the usage\: what do you mean? |
15:46:41 | FromDiscord | <whisperecean> This is by default generated: Usage:↵ fun [REQUIRED,optional-params] |
15:52:18 | FromDiscord | <vindaar> You want to customize the autogenerated help? You can pass a `help` argument, see here for example\: https://github.com/c-blake/cligen/blob/master/examples/dups.nim#L164-L180 |
15:52:47 | * | pmp-p joined #nim |
15:55:03 | FromDiscord | <anuke> How do I get the defined value for a symbol passed to the compiler `-d:foo:value` in a source file? |
15:55:15 | FromDiscord | <whisperecean> In reply to @vindaar "You want to customize": I think that help argument does not modify that usage info |
15:58:02 | FromDiscord | <vindaar> So what exactly do you want to change? The word 'usage'? |
15:58:10 | FromDiscord | <norax.2> In reply to @whisperecean "I think that help": try macro lib? |
15:58:16 | FromDiscord | <norax.2> ops |
15:58:17 | FromDiscord | <norax.2> wrong reply |
15:58:40 | FromDiscord | <norax.2> In reply to @anuke "How do I get": try macro lib |
16:00:47 | FromDiscord | <nomad0529> how do i get a string from a FlowVar[system.string]? |
16:01:10 | FromDiscord | <whisperecean> In reply to @vindaar "So what exactly do": Correct. That whole helper usage string |
16:07:29 | FromDiscord | <vindaar> See the wiki for the config file\: https://github.com/c-blake/cligen/wiki/Example-Config-File and at the bottom the `useHdr` line etc |
16:08:11 | FromDiscord | <norax.2> sent a code paste, see https://play.nim-lang.org/#pasty=trYeIuZNGJVc |
16:08:25 | FromDiscord | <norax.2> tried it |
16:08:26 | FromDiscord | <norax.2> works |
16:09:43 | FromDiscord | <whisperecean> In reply to @vindaar "See the wiki for": I see. Does that mean it can only be overwritten through that config file? |
16:12:07 | FromDiscord | <anuke> sent a code paste, see https://play.nim-lang.org/#pasty=kWhPlzameNKK |
16:13:00 | FromDiscord | <norax.2> but |
16:13:04 | FromDiscord | <norax.2> use = and not : |
16:13:07 | FromDiscord | <norax.2> else is buggy |
16:13:17 | FromDiscord | <norax.2> (edit) |
16:15:06 | FromDiscord | <whisperecean> sepChars = "=" # Do not use Araq's weird : convention |
16:15:09 | FromDiscord | <whisperecean> lol love this |
16:15:12 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#pasty=TLLQNuNGGncy |
16:15:22 | FromDiscord | <norax.2> In reply to @norax.2 "or else is buggy": also |
16:15:35 | FromDiscord | <norax.2> it doesnt work like you set it to a value and it spits the value |
16:15:39 | FromDiscord | <norax.2> jsut says true or false |
16:15:48 | FromDiscord | <norax.2> that need to be handled in the script too |
16:16:00 | FromDiscord | <norax.2> (edit) "that need to be handled in the script too ... " added "if you need the settage" |
16:17:30 | NimEventer | New thread by Nlits: How to properly make a static type-checking macro?, see https://forum.nim-lang.org/t/11337 |
16:21:56 | FromDiscord | <whisperecean> In reply to @vindaar "It depends on your": Thanks that works. Did you know this already or you had to check it in the code? |
16:28:30 | FromDiscord | <solitudesf> In reply to @anuke "How do I get": `const foo {.strdefine.} = ""` |
16:29:03 | FromDiscord | <solitudesf> nvm, you already found it |
16:30:11 | * | xet7 quit (Remote host closed the connection) |
16:31:11 | FromDiscord | <vindaar> roughly I knew, but I had to check to not tell you rubbish↵(@whisperecean) |
16:38:24 | * | xet7 joined #nim |
16:48:13 | FromDiscord | <Robyn [She/Her]> I'm trying to provide an abstraction layer over types of storage providers but I want to avoid using generic types everywhere, but it's also the only way I can correctly use the right procs for the storage provider implementation... :/ |
16:48:32 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=uNvXipMEdQkJ |
16:49:13 | FromDiscord | <Robyn [She/Her]> I don't know if `methods` are suitable here? Iirc generics with methods were deprecated |
16:50:08 | FromDiscord | <Robyn [She/Her]> Generics are also the reason why I can't store the procedures in the obejct itself |
16:50:14 | FromDiscord | <Robyn [She/Her]> (edit) "`methods`" => "`method`s" |
16:50:33 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=INYBTOvPUPJj |
16:50:37 | FromDiscord | <Robyn [She/Her]> Example procedure there |
16:51:20 | FromDiscord | <Phil> Honestly I'd rather name what you call StorageProvider "Repository", but that's besides the fact I guess |
16:51:43 | FromDiscord | <Phil> In your case I don't see the benefit of using methods tbh. Why not use normal procs and generics? |
16:52:33 | FromDiscord | <Phil> Ah, I assume you want to be able to store Providers in a hashmap or seq and pass them around to do things with them |
16:52:47 | FromDiscord | <Phil> In that case you can still use methods and write yourself generic helper procs that they call. |
16:52:51 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "In your case I": `MineHandle` would need to store the type everywhere, no? |
16:53:18 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "Honestly I'd rather name": Oh? Why `Repository`? Seems like a better name but what's the reasoning? |
16:54:09 | FromDiscord | <Phil> In reply to @chronos.vitaqua "`MineHandle` would need to": `MineHandle` can only have one behaviour in one instance. If you want different instances of `MineHandle` to have different storage behaviour you'll need to give `MineHandle` fields to store e.g. an `extract` proc |
16:54:18 | FromDiscord | <Phil> (edit) "instance." => "instance in either scenario." |
16:54:48 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Oh? Why `Repository`? Seems": Repository is just the default name for database abstractions that I'm aware of. |
16:54:57 | FromDiscord | <Phil> Used by e.g. "Spring" |
16:55:00 | FromDiscord | <Phil> (edit) ""Spring"" => "Spring" |
16:55:59 | FromDiscord | <Robyn [She/Her]> I don't think I understand? I was planning of making it so `mineHandle.extract(1, myVarObj)` call `extractImpl(mineHandle.provider, 1, myVarObj)` |
16:56:03 | FromDiscord | <Phil> Or rather I think java's general DB abstraction just calls them all repository, not even Spring specific |
16:56:30 | FromDiscord | <Robyn [She/Her]> Just wondering if there's a way to make it so the associated type info isn't important |
16:57:30 | FromDiscord | <Phil> In reply to @chronos.vitaqua "I don't think I": Now I don't understand what you're going for, what calls what? |
16:58:17 | FromDiscord | <Phil> Ohhh wait, sorry, now I see |
16:58:34 | FromDiscord | <Phil> You just don't want to be bothered about having to specify the ProviderType all the time |
16:58:38 | FromDiscord | <Robyn [She/Her]> Glad I didn't have to form a cohesive sentence xD |
16:58:43 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "You just don't want": Yep! |
16:58:56 | FromDiscord | <Phil> I misread your code while glancing over it as MineHandle being a custom type of provider |
16:59:02 | FromDiscord | <Phil> Thus the hickup, well let's see |
16:59:06 | FromDiscord | <Robyn [She/Her]> Aaah okay! |
16:59:14 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
16:59:19 | FromDiscord | <Robyn [She/Her]> `MineHandle` is basically a reference to a table |
16:59:37 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LuSXvHDFnkrl |
16:59:39 | FromDiscord | <Phil> Okay fair, if that's how you want to roll with it then methods are the only thing you can do. Use methods that call generic procs then I guess |
17:01:50 | FromDiscord | <Robyn [She/Her]> Makes sense, oh well, thanks Phil! |
17:02:03 | FromDiscord | <Phil> Personally I'd still go with generics. But methods with what you want seem to be the correct way to go about it. |
17:02:41 | FromDiscord | <Robyn [She/Her]> I'll probably use generics then, seems like a better situation and I don't need to think about overhead from dynamic dispatch (even if it wouldn't be much either way) |
17:04:43 | FromDiscord | <Phil> I tend to just not go OO the majority of the time.↵The mental model of an object that defines its own thing for encapsulation rarely sits too well with me. I prefer using modules for that. |
17:05:32 | FromDiscord | <Phil> But that also is a very easy way of building yourself a ball of mud. Then again, that's mostly a concern when there's multiple devs in the project or if you yourself are undisciplined |
17:06:30 | FromDiscord | <Robyn [She/Her]> Fair |
17:27:22 | FromDiscord | <mratsim> In reply to @isofruit "But that also is": If the language doesn't support OO, like Go, Rust or C, there is no concern. |
17:34:08 | * | Guest5853 joined #nim |
17:34:19 | * | ntat quit (Remote host closed the connection) |
17:34:21 | * | Guest5853 is now known as ExclamationPoint |
17:35:28 | ExclamationPoint | what's nim's use-case? is it supposed to replace something or connect something? why would someone replace c++ with it? or use it alongside c++, for example? |
17:41:54 | * | junaid_ quit (Remote host closed the connection) |
17:42:35 | FromDiscord | <Robyn [She/Her]> In reply to @ExclamationPoint "what's nim's use-case? is": Imo it's just much cleaner, I've never used C++ tbh, but Nim lets you use libraries from C++ if you use the C++ backend which is always a plus |
17:43:29 | FromDiscord | <Phil> In reply to @mratsim "If the language doesn't": I mean yeah but I also don't know how those structure their projects |
17:43:45 | FromDiscord | <Phil> And C gave rise to C++ because people felt a need for it in the sense that C seemingly didn't provide decent enough structuring capabilities |
17:44:36 | FromDiscord | <odexine> In reply to @isofruit "I mean yeah but": PSST |
17:44:58 | FromDiscord | <Phil> Post super stress torture? |
17:45:23 | FromDiscord | <Phil> Practically stupidly simple teachings? |
17:45:43 | FromDiscord | <Phil> Pirating simple software terribly? |
17:46:06 | FromDiscord | <Phil> Cmon rika, reply, I'm starting to slowly run out of stupid versions of this acronym |
17:46:31 | FromDiscord | <Robyn [She/Her]> Peanut Shaped Silly Tincan |
17:47:26 | FromDiscord | <Phil> Basically, nim was my first primarily OO language |
17:47:49 | FromDiscord | <Phil> And I never used it in a work setting with multiple devs, only in small scale projects |
17:48:30 | FromDiscord | <Phil> So I'm not 100% how well you can constrain structure to prevent other devs from fucking up.↵You have the advantage over me there @mratsim as afaik you did work in a nim team before |
17:48:35 | FromDiscord | <Phil> or right now? not sure |
17:50:12 | NimEventer | New thread by Nlits: How to remove the N_LIB_PRIVATE from exported c code., see https://forum.nim-lang.org/t/11338 |
17:53:44 | ExclamationPoint | Robyn, if it's a replacement for C++, what's cleaner about the language? it looks like Pascal to me. is it the indent scope vs braces? does the time spent learning a new language eventually pay off in some measurable way? |
17:55:26 | ExclamationPoint | Phil, if C++ came about because C was not well structured, what was the motivation behind Nim? |
17:56:12 | FromDiscord | <Phil> In reply to @ExclamationPoint "<@180601887916163073>, if C++ came": Be an actually easily graspable language with an actual type system as opposed to whatever silly joke C has |
17:56:47 | FromDiscord | <Phil> Like, I respect C for its capabilities and to a degree I'm at this point capable of reading C code |
17:57:02 | FromDiscord | <Phil> But that also means I was exposed to how they name and structure APIs and that just makes me want to go bald |
17:57:10 | FromDiscord | <Phil> To avoid the pain of pulling my hair out. |
17:57:39 | FromDiscord | <Phil> "Just pass a pointer, what's behind the pointer? Who knows, not me!" |
17:57:41 | FromDiscord | <odexine> In reply to @isofruit "Cmon rika, reply, I'm": More like “psst use a language without OOP wink wink wink wink” |
17:58:16 | * | krux02_ joined #nim |
17:59:01 | FromDiscord | <Phil> I started with nim in webdev and found it pretty easy to write code that was easily understandable and despite having no knowledge of metaprogramming and compile-time programming I started dealing with both in my very first nim project basically.↵↵Nim has a way of making various programming paradigms accessible that most other languages just don't. |
17:59:18 | FromDiscord | <Phil> Except for OO. If you want to see the pinacles of OOP then nim won't lead you there |
18:00:29 | * | krux02 quit (Ping timeout: 240 seconds) |
18:00:42 | FromDiscord | <Robyn [She/Her]> In reply to @ExclamationPoint "Robyn, if it's a": I came from Python originally, compared to when I tried to use C++ (and Java), it feels less verbose in general, the lack of classes is comfortable after I got used to it, and even the relatively low-level code with pointers written in Nim still looks readable imo |
18:00:43 | FromDiscord | <Phil> Nim as a language provides a lot of tools that allow you to dive into things but you're not forced to use any of them.↵At this point I've appreciated a lot of the features enough to contribute myself. |
18:01:13 | FromDiscord | <Phil> Likehell, there's a GTK wrapper with an actually declarative DSL to write Widget trees with event listeners etc. included (owlkettle) |
18:02:19 | FromDiscord | <Phil> The only other wrapper I'm aware of that is capable of that is relm4 |
18:08:19 | FromDiscord | <Robyn [She/Her]> Hey Phil, you know more SQL than me, is it possible to check whether a table was created or if it already exists? |
18:08:32 | ExclamationPoint | Phil, pointers have types for a reason. nothing forces you to point to memory of that type, but that's because memory management is optional. if you use managed memory constructs in C/C++, you would always point to memory of that type. this is kind of important when you have a systems programming language, so i'm not sure what Nim does to make this work, but it wouldn't be easy to do systems programming without it. |
18:08:52 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Hey Phil, you know": This will blow your mind, check for SQL syntax "IF EXISTS" or the like 😛 |
18:09:01 | FromDiscord | <Robyn [She/Her]> In reply to @ExclamationPoint "<@180601887916163073>, pointers have types": A lot of libs seem to do `void` which is something I've seen |
18:09:30 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "This will blow your": I know I can do `CREATE TABLE IF NOT EXISTS`, but I want to see if a table already existed or if it was created :P |
18:09:35 | FromDiscord | <Phil> In reply to @ExclamationPoint "<@180601887916163073>, pointers have types": It is possible to pass pointers in nim, it's just not the "default way" that you do things |
18:10:16 | FromDiscord | <Phil> Like how rust has unsafe, nim typically guides you towards using value-types, then ref types and only as a last resort actual pointers |
18:10:21 | ExclamationPoint | Phil, that's like blaming the language for the way it's used. if I used arrays of characters instead of strings, it would be my fault, no? |
18:11:57 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/JzwDxrmbzOhf |
18:11:59 | ExclamationPoint | Phil, C++ also has value and reference passing, and actively discourages pointers. even dynamic memory allocation is poor form. it's available, but no one promotes that kind of programming |
18:13:50 | ExclamationPoint | sizeof() def returns the allocated size of an array in bytes in C. |
18:13:56 | FromDiscord | <Phil> I'm likely not a good person to give an unbiased view on this one.↵To me, nim as a language just got more "out of my way" than other languages I've used so far (which is only marginally more than half a dozen tbf).↵A lot of "opt-in" features that are useful everywhere and allows you to unlock concepts when you want to deal with them. |
18:14:18 | FromDiscord | <Phil> (edit) "them." => "them, not up-front." |
18:14:45 | FromDiscord | <Phil> The topic comes up regularly enough even on the subreddit, I'll look for a link to the last 1-2 times I wrote a reply to it |
18:15:11 | Amun-Ra | Robyn: hmm, do "select 1 from table" and check for error? |
18:15:23 | ExclamationPoint | sorry, I didn't join to debate which is better, but it seems that there are a lot of misconceptions about the way C and C++ work, and I don't see a big motivation for creating another language when using the existing ones correctly make things simpler. thanks for the answers tho |
18:17:30 | ExclamationPoint | Robyn, what you want is to check the schema for a table/view/procedure/whatever you're checking. this doesn't exist in formalized SQL but can be done different ways depending on which RDBS you're using. search for 'how to check if table exists in X' where X is mysql or mssql or oracle or sqlite or whatever |
18:20:22 | FromDiscord | <Phil> https://www.reddit.com/r/nim/comments/167qzdl/why_to_learn_nim/jyu23vl/↵https://www.reddit.com/r/nim/comments/17j3833/for_all_the_nim_devs_here_whats_a_killer_feature↵↵Those are 2 topics that deal with the question that likely give you a better idea than I can during dinner prep 😛 |
18:22:15 | FromDiscord | <Phil> In reply to @ExclamationPoint "<@180601887916163073>, C++ also has": I was honestly only mentioning C++ once in the beginning due to the entire OOP topic with Robyn earlier, everything after mostly relates to C (which I have passing experience with due to having to write bindings to it for a wrapper) and java |
18:22:49 | nisstyre | you can basically write C in Nim if you want, and I have done that a bunch of times because you sometimes have to wrap C libraries |
18:23:11 | nisstyre | zero cost iterators are useful to wrap C libraries because you can hide all the nasty pointer arithmetic in it, then free your resources if you have to at the end |
18:23:31 | nisstyre | too bad more C libraries don't let you pass in a custom allocator though |
18:24:22 | FromDiscord | <Phil> As for why not just use C++ - You'd need to ask somebody that uses both to get decent arguments.↵I've read mostly that due to feature bloat it's a very footgun language due to the dozen different standards you may encounter in a given codebase. The many different C++ variants are what made me go to other languages for learning first. |
18:24:48 | FromDiscord | <Phil> Its OOP focus also didn't particularly peak my interest when I already dealt with OOP focused languages before |
18:25:19 | FromDiscord | <Phil> (edit) "Its OOP focus also didn't particularly peak my interest when I already dealt with OOP focused languages before ... " added "and didn't find the paradigm too enticing, nor to lead to particularly flexible code." |
18:26:29 | nisstyre | you should watch https://www.youtube.com/watch?v=rX0ItVEVjHc |
18:35:50 | FromDiscord | <tapeda> In reply to @ExclamationPoint "sorry, I didn't join": In an interview the creator of nim mentions his original motivation was seeing a a gap in the language landscape that was a systems programming language that combined the best parts of Ada(really cool), python(really useable), and lisp(really extensible) I hope that helps get past the more superficial parts about other languages sharing similar features, and nim might be older than yo |
18:36:41 | FromDiscord | <Robyn [She/Her]> In reply to @Amun-Ra "Robyn: hmm, do "select": How about if there's no entries? :p |
18:38:59 | Amun-Ra | Robyn: you still have "1" |
18:41:11 | Amun-Ra | and no entries - no error |
18:42:48 | FromDiscord | <Robyn [She/Her]> Oh okay then, thanks! |
18:48:44 | * | xutaxkamay_ joined #nim |
18:49:01 | * | xutaxkamay quit (Read error: Connection reset by peer) |
18:49:36 | * | xutaxkamay_ is now known as xutaxkamay |
18:51:15 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/DCFmutIJlOOw |
18:54:10 | * | xutaxkamay quit (Read error: Connection reset by peer) |
18:54:15 | FromDiscord | <Phil> I agree with the statement though that trying to model data in objects with specific interactions adds unnecessary constrains and complexity that ultimately make your life harder |
18:54:22 | * | xutaxkamay_ joined #nim |
18:55:05 | * | xutaxkamay_ is now known as xutaxkamay |
18:55:22 | nisstyre | Phil: you can safely assume your user will be using your web app on either a modern phone, or relatively modern desktop or laptop PC usually |
18:55:37 | nisstyre | when I did webdev stuff, there was a range of user agents that we bothered to support |
18:55:44 | FromDiscord | <Phil> That's fair, but that's a software platform |
18:55:54 | FromDiscord | <Phil> That being the browser |
18:56:11 | nisstyre | Ok yeah, you assume a version of the browser that assumes a hardware platform, so it's transitive |
18:57:10 | nisstyre | If you removed all the workarounds in some web apps to support older platforms I bet they'd be faster |
18:57:12 | FromDiscord | <Phil> Do browsers assume specific hardware platforms?↵Even then, that's only Frontend webdev, backend webdev also runs on hardware but there you can only assume "I have a CPU with multiple threads" |
18:57:25 | nisstyre | They do yes |
18:57:44 | nisstyre | for backend, I'm sure you can make some assumptions? Like you're not gonna suddenly be running on ARM or MIPS when you didn't expect it |
18:57:47 | FromDiscord | <Phil> I mean, beyond just "X86-64 level 0" |
18:58:02 | FromDiscord | <Phil> Or whatever the level range was called that went from 1-4 |
18:58:07 | FromDiscord | <Phil> (edit) "0"" => "1"" |
18:58:14 | nisstyre | ah ok, well I'd say that's a problem with modern web backend development. "We must slice this up to run on tiny serverless workers" |
18:58:32 | nisstyre | you can do the lowest common denominator though |
18:59:20 | FromDiscord | <Phil> I feel like I can agree with you there, but also that doesn't feel like it applies the constrains like the statement "Your platform is the hardware, not software" to me implies that there are |
18:59:31 | nisstyre | he also makes the point about people assuming things are done one at a time, which I see a lot in that type of code |
19:01:09 | ExclamationPoint | Phil, thanks for the links! |
19:01:23 | nisstyre | how come nobody has done any sort of frontend framework that exploits multiple cores for rendering stuff |
19:01:28 | nisstyre | or have I missed that |
19:01:44 | FromDiscord | <Phil> In reply to @nisstyre "how come nobody has": I mean, can you? The browser is who renders things, not you, you just provide the HTML representation |
19:01:49 | nisstyre | DOM isn't threadsafe which makes it harder |
19:02:11 | nisstyre | I was thinking about all these libraries that do their own shadow DOM and then sync them up |
19:02:15 | ExclamationPoint | tapeda, I'm so old when I started using the internet it only came in black and white text |
19:02:31 | nisstyre | but yeah you're really limited by the browser engine |
19:02:48 | FromDiscord | <Phil> You can still multithread in the browser, but that really only pays off when you do a lot of computation in the browser |
19:02:55 | FromDiscord | <Phil> And the vast majority of websites just don't |
19:03:01 | FromDiscord | <Phil> So nobody bothers |
19:03:50 | nisstyre | old graphics rendering systems used to work by you setting up a scene and then you send it to the renderer and it renders it |
19:03:59 | nisstyre | that's pretty much how the web works |
19:04:41 | FromDiscord | <Phil> Which is a shame because with the reactive programming tooling out there it's really easy to just integrate a thread into a system that does a whole lot of message passing and to do an action you just pass a message with a specific type to a webworker from a global message queue and it messages the result back into the global message queue which other places in your codebase then react to that specific message type |
19:05:31 | FromDiscord | <Phil> Which is a setup you'll already have in place in a lot of places that write Single-page-applications, so integrating is easy - just never necessary and thus never useful =/ |
19:05:41 | FromDiscord | <.bobbbob> In reply to @.bobbbob "uh, is it normal": I reworked the code to use std/re instead of nim-regex and it compiles normally and is immensely faster so am I doing something wrong, is there a bug or what? Should I make a bug report? |
19:07:10 | FromDiscord | <Phil> In reply to @nisstyre "how come nobody has": Sidenote, even then, everything I've seen around for frontend has always been frontend rendering being single threaded |
19:08:07 | FromDiscord | <Phil> You might pass of backend-computation to another thread (actor-model or the like), but the logic of how things look and should be rendered I've always encountered as conceptually being single threaded. |
19:08:39 | nisstyre | part of the problem too is the bloated event system because it has to trigger so many JavaScript events |
19:08:49 | nisstyre | and anything can then block the entire thing |
19:09:35 | nisstyre | so you're just supposed to not be stupid and run expensive computations |
19:10:35 | FromDiscord | <Phil> But even outside of that, GTK I've seen the same |
19:10:56 | FromDiscord | <Phil> Single frontend thread, for backend computation use their API to spawn one-off threads or use their queue if you want multithreading ala actor-model |
19:11:41 | nisstyre | yes GTK is trash too, can't do anything safely with multiple threads. I've tried it before. |
19:11:48 | FromDiscord | <Phil> That's my only three points of reference:↵- colleagues talking about iOS mobile dev using mostly single frontend thread and however many backend-threads as needed, likely just one↵- GTK↵- Web |
19:11:49 | nisstyre | you have to do expensive polling with queues and stuff |
19:11:56 | FromDiscord | <Phil> (edit) "reference:↵-" => "reference tbh:↵-" |
19:11:59 | FromDiscord | <tixonochek> Hey, why there isnt a ukrainian language-specific channel? I mean, there are a lot of languages there. |
19:13:00 | nisstyre | Phil: https://en.wikipedia.org/wiki/PHIGS this is basically how web rendering works, at least if you're just doing basic HTML stuff |
19:13:36 | nisstyre | which makes sense since the WWW came about in the late 80s right |
19:13:43 | nisstyre | so they were probably inspired by that |
19:14:25 | nisstyre | So we're all using a system that was obsolete by the mid 90s in how it's architected... |
19:15:11 | FromDiscord | <Phil> In reply to @nisstyre "you have to do": Coooouuuuuldn't you use stuff like epoll to let the thread sleep and wake it up via a posix signal to avoid unnecessary polling? |
19:15:23 | nisstyre | I didn't try, but yeah maybe |
19:15:38 | FromDiscord | <Phil> Note I only barely know what I'm talking about here, I roughly have an understanding of how asyncdispatch work, I just started implementing an actor-model-like multithreading runtime |
19:15:47 | FromDiscord | <Phil> Which uses chronos and a mechanism like that |
19:16:18 | nisstyre | https://github.com/weskerfoot/Schemekit/blob/b6a3ab3b82c835ae8582708fc0a9a93f8b37c7ac/browser.c#L21 |
19:16:25 | nisstyre | it was this function that was causing me problems |
19:16:37 | nisstyre | I'm sure there's a less dumb way of using it though |
19:17:42 | NimEventer | New thread by ggibson: Help with channels and threads, see https://forum.nim-lang.org/t/11339 |
19:17:49 | nisstyre | ok there is a blocking version, I don't remember why but it wouldn't have worked for some reason |
19:18:53 | nisstyre | probably because I wanted the same thread to be responsive to other stuff |
19:20:09 | FromDiscord | <Phil> Good to see that good ol print debugging is alive and well in C as well 😄 |
19:20:37 | nisstyre | of course |
19:21:36 | FromDiscord | <Robyn [She/Her]> In reply to @tixonochek "Hey, why there isnt": I don't know anything about Ukrainian or other languages, but this looks similar to the script Ukrainian uses? https://discord.com/channels/371759389889003530/771116956484894770 |
19:22:32 | FromDiscord | <Robyn [She/Her]> https://discord.com/channels/371759389889003530/725426142454087761 this one too |
19:22:45 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "I don't know anything": that's bulgarian |
19:22:49 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "https://discord.com/channels/371759389889003530/725": that's russian |
19:22:51 | FromDiscord | <tixonochek> What do you mean by the script |
19:22:53 | FromDiscord | <Robyn [She/Her]> Ooh |
19:22:54 | FromDiscord | <tixonochek> In reply to @nnsee "that's bulgarian": Exactly |
19:23:05 | FromDiscord | <Robyn [She/Her]> In reply to @tixonochek "What do you mean": Script as in the alphabet it uses |
19:23:12 | FromDiscord | <Robyn [She/Her]> Latin languages share the same script |
19:23:14 | FromDiscord | <nnsee> it's cyrillic |
19:23:17 | FromDiscord | <tixonochek> In reply to @chronos.vitaqua "Script as in the": Like the letters? |
19:23:21 | FromDiscord | <Robyn [She/Her]> Yeah |
19:23:22 | FromDiscord | <Phil> We just don't have languages for everything. Given the activity in those channels is basically 0 I'm tempted to keep ignoring those. |
19:23:27 | FromDiscord | <Phil> (edit) "languages" => "language channels" |
19:23:51 | FromDiscord | <tixonochek> I mean to be fair this server is flooded with unnecessary channels from what I can see |
19:23:59 | FromDiscord | <Phil> All they have managed to do so far is make my life harder when a discord spambot manages to post in all channels simultaneously |
19:24:09 | FromDiscord | <nnsee> there's definitely too many imo |
19:24:12 | FromDiscord | <Robyn [She/Her]> The Russian channel seems to have activity at least, I know griff is Ukrainian |
19:24:57 | FromDiscord | <tixonochek> In reply to @nnsee "there's definitely too many": I know servers a lot bigger than this one, but the channels there are organized and there are a lot fewer than here |
19:25:29 | FromDiscord | <tixonochek> I was just asking about the language channel because if we have stuff like bulgarian, why not |
19:25:55 | FromDiscord | <nnsee> well, i used to mod the python discord, and it was huge, and a considerable amount of effort went into planning and organizing the channels in a way that made sense |
19:26:34 | FromDiscord | <tixonochek> In reply to @nnsee "well, i used to": An that rises the question of why there is a gaming channel. |
19:26:37 | FromDiscord | <nnsee> we had three different help channels for a while and people were encouraged to grab a vacant one and ask for help there, but that system immediately stopped working once we listed the server on the public guilds thing |
19:26:41 | FromDiscord | <tixonochek> (edit) "An" => "And" |
19:27:01 | FromDiscord | <nnsee> i stopped being a mod pretty soon after |
19:27:59 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "we had three different": Oh? How did it stop working? |
19:28:05 | nisstyre | Phil: this looks promising https://gitlab.gnome.org/GNOME/libdex |
19:28:19 | FromDiscord | <nnsee> there were far too many people for a free for all system |
19:28:25 | FromDiscord | <nnsee> this was also way before threads were a thing |
19:28:56 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "there were far too": Fair |
19:29:02 | FromDiscord | <nnsee> people generally just used the first help channel regardless of whether it was inactive or not, and the second and third ones were used far far less |
19:29:17 | FromDiscord | <nnsee> then, once an extremely large amount of people started pouring in, it just turned into mayhem |
19:29:33 | FromDiscord | <nnsee> it was hard to keep track of questions that had been asked but not received an answer, etc |
19:29:34 | FromDiscord | <Phil> In reply to @nisstyre "<@180601887916163073>: this looks promising": So async in C? I'd mostly shrug. Like sure, but I don't wish to write C 😅 |
19:29:44 | FromDiscord | <nnsee> we experimented with various bot-based systems |
19:29:54 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "it was hard to": Fair enough, do you think forum channels helped at all or? |
19:30:22 | nisstyre | Phil: yep, futures in C, and yeah if you can just do it in Nim then it's irrelevant |
19:30:33 | FromDiscord | <nnsee> i don't really remember. i remember that people didn't really use those channels at all compared to the help channels |
19:31:52 | FromDiscord | <Phil> You can, there's 2 async runtimes. neither fully work without cycles so you have to use nim's default memory management strategy (orc) or the old default (refc) which can collect cycles, but they work well enough and didn't produce memory leaks nor data races for me so far when experimenting with them in my runtime |
19:32:27 | FromDiscord | <tixonochek> In reply to @nnsee "i don't really remember.": On the php discord as a help channel they have only 1 forum channel. And I hate it, because its kind of weird to create a whole "thread" for some extremely simple question. And you need to wait a few days to get an answer anyway. |
19:32:49 | FromDiscord | <Phil> (which is unfinished and I'll only manage to get back to once work gives me more breathing room to not have it in my head as much) |
19:33:02 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "You can, there's 2": How about: Cps :> |
19:33:27 | FromDiscord | <Phil> Playing around with that was the next step after |
19:33:34 | FromDiscord | <Robyn [She/Her]> I'm looking into cps but just trying to get a mvp before actually integrating it into my project |
19:33:37 | FromDiscord | <Phil> But this product launch just takes too much out of me as lead dev |
19:33:42 | FromDiscord | <Robyn [She/Her]> In reply to @tixonochek "On the php discord": That's fair oof |
19:33:48 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "But this product launch": Understandable |
19:34:11 | FromDiscord | <Phil> "lead dev" with fat quotation marks since it's mostly 3 frontend devs that I'm guiding |
19:34:16 | FromDiscord | <Phil> Myself included |
19:34:22 | nisstyre | Phil: actor model style concurrency would be nice to have in Nim. More complex though. For parallelism I've tried using Weave and it's pretty good so far. |
19:34:57 | FromDiscord | <Phil> In reply to @nisstyre "<@180601887916163073>: actor model style": Is it? In my head it was always super simple because I just see it as a webserver that coincidentally runs on my machine that I have a websocket-like connection to |
19:35:28 | nisstyre | the complexity is in managing queues, backpressure, etc, and exceptions of course |
19:35:31 | FromDiscord | <Phil> Or at least that's the style of concurrency that I was writing a lib for |
19:35:41 | nisstyre | if your actors can raise exceptions you have to somehow handle that |
19:35:44 | FromDiscord | <Phil> Ahhhhhh okay yeah that's brutal as hell |
19:36:51 | FromDiscord | <Phil> As in, managing queues, raising exceptions has not been that big a problem for me yet |
19:36:56 | FromDiscord | <Phil> (edit) "raising" => "dealing with" |
19:38:14 | nisstyre | yeah if an actor's mailbox just fills up with stuff you have to somehow deal with that |
19:38:29 | nisstyre | it's supposed to guarantee that messages get sent, but I guess not necessarily received |
19:42:59 | FromDiscord | <Phil> I think for MVP I'm more going the route of allowing deadlocks |
19:43:06 | FromDiscord | <Phil> Can't finish sending if the mailbox is full |
19:43:42 | FromDiscord | <Phil> Because everything else potentially has performance implications |
19:44:07 | FromDiscord | <Phil> (As in, my mind is going persisting the messages) |
19:44:53 | FromDiscord | <Phil> Or re-allocating channels which are static-size as provided by the lib I use |
19:45:52 | nisstyre | you should probably arena allocate them |
19:48:04 | FromDiscord | <Phil> Eh, problems for later.↵The lib is supposed to first provide sth because right now we have nothing that allows this kind of mental model of just multithreading with message passing |
19:48:23 | FromDiscord | <Phil> Right now it's all just allocating the channels on startup and after that fixed size. |
19:48:43 | nisstyre | that's probably the best way tbh |
19:49:47 | FromDiscord | <Phil> Got to have sth to be able to iterate on it.↵And getting that to work without any tsan/asan/valgrind errors is already a challenge and a half |
19:51:35 | * | pmp-p quit (Quit: No Ping reply in 180 seconds.) |
19:52:58 | * | pmp-p joined #nim |
20:14:38 | FromDiscord | <nitely_> @.bobbbob report the nim-regex issue pls |
20:15:13 | FromDiscord | <requiresupport> question about macros, do they take effect even for the modules im importing, or nim's stdlib? |
20:20:06 | FromDiscord | <Phil> Kind of? If the stuff you're importing calls macros, those will get resolved and thus affect your compile time |
20:25:06 | FromDiscord | <Elegantbeef> If a macro is uses it's used |
20:26:04 | FromDiscord | <Elegantbeef> Deep philosophical takes with beef |
20:32:05 | FromDiscord | <michaelb.eth> sent a long message, see https://pasty.ee/QLstmjRKFYZL |
20:33:44 | FromDiscord | <Elegantbeef> > There I was, this self-taught programmer that had thought I was "hot shit"↵I have the exact opposite problem 😄 |
20:34:13 | FromDiscord | <michaelb.eth> In reply to @Elegantbeef "> There I was,": You are the living mountain |
20:34:22 | FromDiscord | <michaelb.eth> you have become the climb |
20:39:58 | FromDiscord | <Phil> I still think I'm hot shit |
20:40:08 | FromDiscord | <Elegantbeef> You got one of those words right |
20:40:09 | FromDiscord | <Phil> Not because I don't think that I've climbed the mountain |
20:40:18 | FromDiscord | <Phil> (edit) removed "don't" |
20:40:23 | FromDiscord | <Phil> But more because I see my colleagues |
20:40:48 | FromDiscord | <Phil> Or rather I've seen multiple colleagues. And if that's my baseline I'm hot shit. |
20:41:31 | FromDiscord | <Phil> Still means I'm basically entirely outclassed by people actually having a grasp on low-level stuff like mratsim, jtv or the folks holding C/C++ talks |
20:46:22 | FromDiscord | <Phil> Or anyone having done any kind of actual performance optimization on the low-level front |
20:46:45 | FromDiscord | <Elegantbeef> We get it, you think you're better than me! 😛 |
20:47:06 | FromDiscord | <Phil> Only it being a douchebag fruit |
20:47:22 | FromDiscord | <Phil> I have you beat there hands down since your PFP is a cute doggo |
20:47:45 | FromDiscord | <Phil> (edit) "it" => "at" |
20:47:58 | FromDiscord | <Phil> And at being old, definitely at being old |
20:48:37 | FromDiscord | <Phil> Potentially also on height |
20:49:28 | FromDiscord | <michaelb.eth> In reply to @isofruit "Potentially also on height": are you in the "tall programmers" club/ |
20:49:33 | FromDiscord | <michaelb.eth> (edit) "club/" => "club?" |
20:49:53 | FromDiscord | <Phil> "Tall programmers whose height will give them back problems" club |
20:50:04 | FromDiscord | <michaelb.eth> me 2 😅 |
20:50:16 | FromDiscord | <Elegantbeef> Could not be me |
20:51:05 | FromDiscord | <leorize> you're just telling me that your posture suck xd↵(@Phil) |
20:51:09 | FromDiscord | <Phil> Of course not, you have beef.↵Only evil people have beef.↵And evil people are small since that brings them closer to hell.↵This is definitely how everything works |
20:51:26 | FromDiscord | <Elegantbeef> I mean I'm 5'10"(177cm) |
20:51:32 | FromDiscord | <Elegantbeef> I'm not that small |
20:51:45 | FromDiscord | <Phil> In reply to @leorize "you're just telling me": That could be a pretty fair assessment |
20:52:05 | FromDiscord | <Phil> I'm just hoping the rock climbing delays when it eventually fucks me over |
20:52:27 | FromDiscord | <Elegantbeef> Not all of us can look giraffes in the eyes but at least I don't have to duck to enter doors |
20:52:44 | FromDiscord | <leorize> depends on which country you visit |
20:52:53 | FromDiscord | <Elegantbeef> Me vist? |
20:53:04 | FromDiscord | <Elegantbeef> I don't even visit Canada! |
20:53:21 | FromDiscord | <leorize> just make sure your rock climbing posture is good phil |
20:53:47 | FromDiscord | <Phil> It is, I've been told just hanging generally is pretty good to decompress the spine |
20:53:55 | FromDiscord | <Elegantbeef> With the way he speaks rock climbing is just pulling himself up the cliffside |
20:55:27 | FromDiscord | <michaelb.eth> is it true that a true Canadian outdoorsman can climb a cliffside with only his lips? |
20:56:28 | FromDiscord | <Elegantbeef> Close it's cheeks |
21:37:05 | FromDiscord | <spivee> Is it normal to take 18.4 seconds to compile `echo "hello world!"` on vcc? |
21:37:50 | FromDiscord | <spivee> Not trying to throw shade, genuinely curious whether there is a config problem I should be chasing down or if it's just not a prioritised target or what is going on. |
21:38:33 | FromDiscord | <Elegantbeef> I'm going to say no |
21:38:37 | FromDiscord | <Elegantbeef> But I've never used vcc |
21:49:06 | FromDiscord | <spivee> ah antivirus |
21:49:54 | FromDiscord | <spivee> put an 'exclusion' in Windows Security for the whole `nim-2.0.2` folder and now it's 0.05 seconds |
21:50:31 | FromDiscord | <requiresupport> this issue with AVs and nim is so weird |
21:52:07 | FromDiscord | <grumblygibson> `tryRecv` polling every thread in a group of threads for a 'Ready' message should be a decent way to find threads ready for another work item, no? Trying to find error in my logic. context: https://forum.nim-lang.org/t/11339 |
21:56:01 | FromDiscord | <grumblygibson> I've been at this for days tracking down the issue. Would love a channels expert to weigh in. |
22:07:21 | FromDiscord | <griffith1deadly> In reply to @spivee "Is it normal to": on vcc yes |
22:16:52 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=XDJgNKAhEidv |
22:16:59 | FromDiscord | <Robyn [She/Her]> Why am I getting an error here? :/ |
22:17:44 | FromDiscord | <Robyn [She/Her]> Removing `T: BaseProvider` and replacing it with `T` works but, that's a bit annoying? Since then I could pass anything in |
22:18:23 | FromDiscord | <Robyn [She/Her]> I can do `T: ref object` though?? |
22:23:18 | NimEventer | New thread by RegularAlias: Attempting a DSL on top of htmlgen for fun/learning, see https://forum.nim-lang.org/t/11340 |
22:26:48 | FromDiscord | <Robyn [She/Her]> `T: BaseProvider` also works if I pass `BaseProvider` when defining `accs`, why can't I use `SQLiteHandler`? It inherits from `BaseProvider` so it makes no sense |
22:26:48 | FromDiscord | <airdroplivelinkinbi04221> Hot Teen & Onlyfans Leaks :underage: :peach: https://discord.gg/esexx @everyone |
22:26:49 | FromDiscord | <Robyn [She/Her]> <@&371760044473319454> |
22:32:39 | FromDiscord | <Robyn [She/Her]> Is there a way for me to get the fields of a type via the typedesc? |
22:32:53 | FromDiscord | <Robyn [She/Her]> I don't want my types to require `partial` on all of them :/ |
22:41:43 | FromDiscord | <spivee> I have a C header I use that defines `main` on linux and `WinMain` on Windows, and then calls `entry_point(int argc, char argv)`, which my projects are expected to define themselves. (like SDL/Sokol/etc.) Is there a way I can instruct Nim to use `entry_point(int argc, char argv)` as an entry point? |
22:51:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=GcYvMCkHCyMY |
22:53:00 | FromDiscord | <spivee> sweeet, thanks! |
22:53:23 | FromDiscord | <bosinski2023> sent a code paste, see https://play.nim-lang.org/#pasty=xXjgsBIZtdOT |
22:55:19 | FromDiscord | <Elegantbeef> `T: BaseProvider` inside a typedef does not work how you'd imagine |
22:55:35 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=GelgNdteviFN |
22:55:54 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=rWMETIYzaxhN |
22:56:12 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "`T: BaseProvider` inside a": How does it work? Feels silly |
22:56:16 | Amun-Ra | ptr UncheckedArray[cstring] == cstringArray |
22:56:18 | FromDiscord | <Robyn [She/Her]> But thanks Beef! |
22:56:27 | FromDiscord | <Elegantbeef> It only accepts `BaseProvider` |
22:56:57 | FromDiscord | <Elegantbeef> `provider` works cause `provider` is implicitly convertible to \`BaseProvider |
22:57:31 | FromDiscord | <Elegantbeef> But `typedesc[SqLiteProvider]` is not implicitly convertible |
23:02:26 | FromDiscord | <Robyn [She/Her]> Aaah okay, thank you! |
23:13:13 | * | SchweinDeBurg joined #nim |
23:14:29 | * | pmp-p quit (Ping timeout: 240 seconds) |