00:00:14 | FromDiscord | <Robyn [She/Her]> Oh wait that's for count tables, I was confused for a sec |
00:12:15 | * | beholders_eye quit (Read error: Connection reset by peer) |
00:18:01 | * | beholders_eye joined #nim |
00:30:38 | * | beholders_eye quit (Read error: Connection reset by peer) |
00:34:43 | * | SchweinDeBurg joined #nim |
00:36:35 | * | beholders_eye joined #nim |
00:41:43 | * | fallback quit (Quit: IRCNow and Forever!) |
00:46:06 | * | beholders_eye quit (Read error: Connection reset by peer) |
00:47:21 | * | fallback joined #nim |
00:52:05 | * | beholders_eye joined #nim |
00:53:03 | * | def- joined #nim |
01:10:39 | * | Onionhammer9 joined #nim |
01:12:00 | * | Onionhammer quit (Ping timeout: 255 seconds) |
01:12:00 | * | Onionhammer9 is now known as Onionhammer |
01:28:44 | * | beholders_eye quit (Read error: Connection reset by peer) |
01:35:03 | * | beholders_eye joined #nim |
01:38:55 | * | beholders_eye quit (Read error: Connection reset by peer) |
01:39:26 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
01:39:36 | * | SchweinDeBurg joined #nim |
01:41:36 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=aDVgqsmR↵Cordyceps is my local library, but god this syntax looks so clean |
01:41:44 | FromDiscord | <Robyn [She/Her]> I just need a few macros and it'll be perfect |
01:42:03 | FromDiscord | <Robyn [She/Her]> Maybe I don't even need a macro for `as` :> |
01:42:13 | FromDiscord | <Robyn [She/Her]> Actually I might |
01:44:27 | * | beholders_eye joined #nim |
01:45:04 | * | beholders_eye quit (Read error: Connection reset by peer) |
01:47:56 | * | krux02 quit (Remote host closed the connection) |
01:48:01 | * | def- quit (Quit: -) |
01:50:53 | * | beholders_eye joined #nim |
01:52:47 | * | beholders_eye quit (Read error: Connection reset by peer) |
01:54:03 | * | def- joined #nim |
01:58:15 | * | beholders_eye joined #nim |
01:59:04 | * | beholders_eye quit (Read error: Connection reset by peer) |
02:00:54 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
02:02:49 | * | disso_pch quit (Quit: Leaving) |
02:04:37 | * | beholders_eye joined #nim |
02:10:20 | * | def- quit (Quit: -) |
02:10:39 | * | def- joined #nim |
02:17:17 | * | beholders_eye quit (Ping timeout: 256 seconds) |
02:22:27 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=jBIWEqup |
02:22:48 | FromDiscord | <Elegantbeef> Not B |
02:22:52 | FromDiscord | <Robyn [She/Her]> I could use `to` for choice A tbh |
02:23:07 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Not B": Yeah, it looks gross with Nim's syntax |
02:23:14 | FromDiscord | <Robyn [She/Her]> Not sure what else it should be though |
02:23:23 | FromDiscord | <Robyn [She/Her]> Choice A is the best then? |
02:43:04 | * | fallback quit (Quit: IRCNow and Forever!) |
02:47:38 | * | fallback joined #nim |
03:38:59 | FromDiscord | <Robyn [She/Her]> How do I check if there's a custom pragma on a type, using a concept? `hasCustomPragma` isn't working |
03:42:47 | FromDiscord | <Elegantbeef> Your pragma does not stick around |
03:42:49 | FromDiscord | <Elegantbeef> So you need another pragma and to attach it |
03:44:21 | * | SchweinDeBurg joined #nim |
03:59:23 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Your pragma does not": Wdym? |
03:59:32 | FromDiscord | <Robyn [She/Her]> My macro adds the pragma to the generated type |
03:59:41 | FromDiscord | <Robyn [She/Her]> Hold I should've been more clear sorry |
04:00:41 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RieDAMZc |
04:01:11 | FromDiscord | <Robyn [She/Her]> The type does have the pragma, since in the macro I generate the AST with the pragma included |
04:01:27 | FromDiscord | <Elegantbeef> t is an instance not the type |
04:01:33 | FromDiscord | <Robyn [She/Her]> Oh |
04:01:48 | FromDiscord | <Robyn [She/Her]> So then I'd use `typeof(t)`? |
04:02:26 | FromDiscord | <Robyn [She/Her]> Still a no |
04:02:40 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=cjeHwIdv |
04:03:02 | FromDiscord | <Elegantbeef> or `type Bleh = concept type T` |
04:03:02 | FromDiscord | <Elegantbeef> bud isn't tagged `{.pragma.}` |
04:03:53 | FromDiscord | <Robyn [She/Her]> It is `template bud() {.pragma.}` |
04:04:23 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=wFFalkOA |
04:04:26 | FromDiscord | <Robyn [She/Her]> Could this be the issue? |
04:05:06 | FromDiscord | <Robyn [She/Her]> `target: Bud`? |
04:05:57 | FromDiscord | <Robyn [She/Her]> Oh wait |
04:06:05 | FromDiscord | <Robyn [She/Her]> My generated AST is broken |
04:06:42 | FromDiscord | <Robyn [She/Her]> Hm, I fixed that but it's still not working |
04:08:39 | FromDiscord | <Elegantbeef> Is this a generic type? |
04:09:22 | FromDiscord | <Robyn [She/Her]> It is, yeah |
04:09:34 | FromDiscord | <Robyn [She/Her]> Oh wait could that be the issue? |
04:14:39 | FromDiscord | <Robyn [She/Her]> Not sure how to fix it tbh |
04:20:03 | FromDiscord | <Robyn [She/Her]> `stripGenericParams`, neat |
04:22:43 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LBbTKFgq |
04:22:44 | FromDiscord | <Robyn [She/Her]> Hm |
04:27:45 | FromDiscord | <Robyn [She/Her]> Okay so I made another macro that does the `hasCustomPragma` check there, but it's returning false even though the condition should be true... |
04:49:44 | * | def- quit (Quit: -) |
04:50:31 | * | def- joined #nim |
05:32:46 | * | def- quit (Quit: -) |
05:33:32 | * | def- joined #nim |
05:44:48 | * | fallback quit (Read error: Connection reset by peer) |
05:49:37 | * | fallback joined #nim |
05:58:12 | * | def- quit (Quit: -) |
05:58:23 | * | def- joined #nim |
06:01:19 | * | def- quit (Client Quit) |
06:04:27 | * | def- joined #nim |
06:08:49 | * | def- quit (Client Quit) |
06:09:00 | * | def- joined #nim |
06:33:29 | * | PMunch joined #nim |
06:41:55 | PMunch | Hmm, what's the most ergonomic way to get an `array[3, char]` from a string |
06:42:02 | PMunch | Starting at an arbitrary position |
06:48:21 | FromDiscord | <odexine> that outright requires a copy no? |
06:51:28 | PMunch | Sure |
06:51:42 | PMunch | I'm just going for ergonomics |
06:52:01 | PMunch | Currently I do `[mystr[i], mystr[i+1], mystr[i+2]]` |
06:52:48 | FromDiscord | <Elegantbeef> Time to make a `proc toArray(oa: openArray[char], size: static int): array[size, char] = result[0..size] = oa` 😄 |
06:53:04 | FromDiscord | <Elegantbeef> Now you can have `myString.toOpenArray(x, y).toArray(4)` |
06:53:25 | PMunch | Ah, `toArray` was the missing piece! |
06:53:43 | PMunch | Oh wait, didn't read your first message :P |
06:53:47 | PMunch | Thought it was in the stdlib |
06:54:12 | FromDiscord | <Elegantbeef> Nope the stdlib has no fun array operations |
07:14:29 | * | Jhonny2x4 quit (Ping timeout: 240 seconds) |
07:42:37 | * | ntat joined #nim |
07:46:05 | * | redj quit (Ping timeout: 240 seconds) |
07:47:02 | * | redj joined #nim |
07:47:23 | PMunch | Hmm, when you do `for x in someseq[1..^1]`, is Nim smart enough to optimize that, or would it be better to do `for y in 1..someseq.high: let x = someseq[y]`? |
08:01:47 | FromDiscord | <Elegantbeef> Pmunch you're best to do `for y in someSeq.toOpenArray(0, someSeq.high)` |
08:01:54 | FromDiscord | <Elegantbeef> Or use slicerator which has `[]` iterators |
08:06:05 | * | def- quit (Quit: -) |
08:07:09 | * | def- joined #nim |
08:10:11 | Amun-Ra | or the classic way for i in 1 .. someseq.hight: … someseq[i] … |
08:10:18 | Amun-Ra | which is effin faster |
08:11:06 | PMunch | Well it makes sense, you're copying all the elements into new seq :P |
08:11:21 | PMunch | But it's a bit annoying that the for loop can't optimize it |
08:12:22 | * | def- quit (Quit: -) |
08:12:34 | * | def- joined #nim |
08:12:37 | Amun-Ra | I've to benchmark classic iterating vs the one with toOpenArray for trivial types |
08:15:35 | * | def- quit (Client Quit) |
08:15:45 | PMunch | Should be pretty comparable speed wise |
08:15:53 | PMunch | As they're basically doing the same thing |
08:25:46 | * | fallback quit (Read error: Connection reset by peer) |
08:31:02 | * | fallback joined #nim |
08:36:09 | * | def- joined #nim |
08:38:06 | FromDiscord | <Phil> In reply to @the_real_hypno "Same but i always": Its partially that, but also just shows once more how broad the spectrum of software ist |
08:38:08 | FromDiscord | <Phil> (edit) "ist" => "is" |
09:12:29 | * | def- quit (Quit: -) |
09:12:39 | * | Jhonny2x4 joined #nim |
09:12:53 | * | def- joined #nim |
09:15:57 | * | def- quit (Client Quit) |
09:19:03 | * | def- joined #nim |
09:19:03 | * | def- quit (Client Quit) |
09:39:08 | * | def- joined #nim |
09:42:17 | * | def- quit (Client Quit) |
10:02:41 | * | def- joined #nim |
10:26:19 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "Okay so I made": Still stumped on this rip |
10:39:39 | * | def- quit (Quit: -) |
10:40:32 | * | def- joined #nim |
10:45:02 | * | krux02 joined #nim |
11:06:59 | * | ntat quit (Quit: Leaving) |
12:16:35 | * | beholders_eye joined #nim |
12:32:19 | FromDiscord | <Robyn [She/Her]> Is it possible to create an unmangled sym from an ident? |
12:32:30 | FromDiscord | <Robyn [She/Her]> Actually might not need to do that |
12:35:47 | FromDiscord | <Robyn [She/Her]> Ughhh I can't figure out how to use a macro to get the type of the symbol passed in |
12:41:12 | FromDiscord | <Robyn [She/Her]> It'd be useful if I could get the name of the type... I'm only getting the implementation back when I want the name too |
12:41:37 | FromDiscord | <Robyn [She/Her]> (edit) "It'd be useful if I could get the name of the type... I'm only getting the implementation back when I want the name ... too" added "of the distinct type" |
12:43:36 | PMunch | Hmm, why doesn't `HttpRequestError` keep the HTTP request error code? |
12:43:57 | PMunch | I mean it is in the message, but it's a bit annoying having to parse it from there instead of being able to access it numerically |
12:47:12 | FromDiscord | <Robyn [She/Her]> Aha, `getTypeInst` did the trick! |
12:47:34 | FromDiscord | <Robyn [She/Her]> In reply to @PMunch "Hmm, why doesn't `HttpRequestError`": Sounds like an oversight to me |
12:49:32 | PMunch | Yeah unfortunately |
12:49:47 | PMunch | The standard library has a bunch of these small oversights.. |
12:50:11 | FromDiscord | <Robyn [She/Her]> Time for a new standard library? 😛 |
12:50:56 | PMunch | Don't tempt me.. |
12:51:08 | PMunch | I've seriously considered it a couple of times |
12:51:17 | PMunch | But it's quite a massive undertaking |
12:52:15 | FromDiscord | <Robyn [She/Her]> Yeah I can imagine rip |
12:52:33 | FromDiscord | <Robyn [She/Her]> Ugh, `macrocache` is so limiting... |
13:14:57 | FromDiscord | <ieltan> $ |
13:18:13 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Ugh, `macrocache` is so": In what way |
13:19:39 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "In what way": I can't have nested tables, which is a tad important to me here |
13:20:04 | FromDiscord | <Robyn [She/Her]> Or even tables with an arbitrary type |
13:20:31 | FromDiscord | <Robyn [She/Her]> `Table[string, tuple[name: string, typ: typedesc]]` |
13:20:45 | FromDiscord | <Robyn [She/Her]> I can use compile-time variables but you're supposed to avoid them |
13:21:39 | FromDiscord | <odexine> I think the guarantees given by macro cache are harder to achieve if less limited |
13:24:11 | FromDiscord | <Robyn [She/Her]> Yeah I know, but it does really suck |
13:26:45 | * | PMunch quit (Read error: Connection reset by peer) |
13:28:03 | * | PMunch joined #nim |
13:32:33 | * | PMunch quit (Read error: Connection reset by peer) |
13:32:41 | * | PMunch_ joined #nim |
13:42:42 | * | PMunch_ quit (Quit: Leaving) |
13:51:51 | FromDiscord | <Robyn [She/Her]> Do I say fuck it and use a compile-time variable anyway? Hm... |
13:52:06 | FromDiscord | <Robyn [She/Her]> It'd be useful to have a table that maps a string to another string... |
13:53:54 | NimEventer | New thread by IgnisTempestas: Privilege Escalation with Nim Package Manager - John Hammond, see https://forum.nim-lang.org/t/11678 |
14:10:04 | * | def- quit (Quit: -) |
14:11:36 | * | def- joined #nim |
14:16:37 | * | def- quit (Quit: -) |
14:17:27 | * | def- joined #nim |
14:20:55 | FromDiscord | <nnsee> In reply to @NimEventer "New thread by IgnisTempestas:": god i hate how he pronounces init |
14:20:57 | FromDiscord | <nnsee> "eye-nit" |
14:21:24 | FromDiscord | <zumi.dxy> sql = squeal |
14:21:27 | FromDiscord | <saint.___.> In reply to @nnsee "god i hate how": 🤮 |
14:27:51 | FromDiscord | <nnsee> In reply to @NimEventer "New thread by IgnisTempestas:": am i missing something or is this a really roundabout way to exploiting sudo-able `nimble install `, when you can just... execute commands at compile time (which would be executed as root) |
14:29:57 | FromDiscord | <nnsee> or even just use `nimble install --passNim="--run"` to automatically execute the compiled binary as root |
14:31:41 | FromDiscord | <nnsee> unless that behavior didn't exist in those versions of nim/nimble |
15:00:48 | * | def- quit (Quit: -) |
15:01:17 | FromDiscord | <odexine> In reply to @NimEventer "New thread by IgnisTempestas:": oh jeez john hammond |
15:06:31 | FromDiscord | <odexine> In reply to @nnsee ""eye-nit"": eyenitialisation |
15:21:21 | * | def- joined #nim |
15:34:42 | * | lucasta joined #nim |
15:57:06 | * | def- quit (Quit: -) |
15:58:47 | * | def- joined #nim |
16:21:19 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
16:32:05 | * | def- quit (Quit: -) |
16:34:06 | * | def- joined #nim |
16:37:47 | * | def- quit (Client Quit) |
16:39:27 | * | def- joined #nim |
16:42:33 | * | def- quit (Client Quit) |
16:51:48 | FromDiscord | <Robyn [She/Her]> If I have two types, `A` and `B`, with `B` inheriting from `A`, would that mean if I wanted an instance of `B` to be converted into an instance of `A`, it'd be upcasting? |
16:55:28 | FromDiscord | <odexine> up is child to parent so B to A |
17:02:44 | * | def- joined #nim |
17:06:52 | FromDiscord | <Robyn [She/Her]> It wasn't the thing I needed anyway ehe |
17:07:02 | FromDiscord | <Robyn [She/Her]> Anyway, I managed to make a simple unpack macro :))) |
17:07:11 | FromDiscord | <Robyn [She/Her]> Just gotta make it more robust now |
17:22:34 | * | SchweinDeBurg quit (Quit: WeeChat 4.4.0-dev) |
17:31:53 | * | Lord_Nightmare joined #nim |
17:56:21 | * | ntat joined #nim |
17:59:20 | FromDiscord | <albassort> i tried using c2nim last night |
17:59:31 | FromDiscord | <albassort> it just wouldn't output |
17:59:32 | FromDiscord | <albassort> it was stuck? |
17:59:48 | FromDiscord | <albassort> is this normal for 6000 line files? |
18:10:01 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=sfaoYqyr |
18:10:15 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#pasty=LEwGaSfb" => "https://play.nim-lang.org/#pasty=wsWCBupS" |
18:11:17 | FromDiscord | <albassort> how is this converted to nim? |
18:11:18 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=bjHfSikZ |
18:26:55 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
18:33:04 | * | Lord_Nightmare joined #nim |
18:33:36 | FromDiscord | <Robyn [She/Her]> Unpack macro works ✨ |
18:33:49 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=jcYRxWlK |
18:33:59 | FromDiscord | <Robyn [She/Her]> Actually wait |
18:34:00 | FromDiscord | <Robyn [She/Her]> Hm |
18:34:33 | FromDiscord | <Robyn [She/Her]> `distinct pointer` seems right but I don't do anything regarding C, so... |
18:36:48 | FromDiscord | <Robyn [She/Her]> I just need a macro for matching and then I'm all set |
18:37:03 | FromDiscord | <Robyn [She/Her]> Which is a lot harder than it sounds... |
18:38:56 | FromDiscord | <albassort> it points to the typedef |
18:38:56 | FromDiscord | <albassort> but the typdef is void |
18:41:33 | * | systemdsucks quit (Ping timeout: 268 seconds) |
18:42:16 | FromDiscord | <Robyn [She/Her]> A `void` is a `pointer` in Nim, so do with that what you will |
18:42:51 | FromDiscord | <albassort> i meant the struct has no elements |
18:42:56 | FromDiscord | <albassort> its just an empty strut |
18:43:01 | FromDiscord | <albassort> (edit) "strut" => "struct" |
18:43:04 | FromDiscord | <albassort> and its a pointer to that |
18:44:36 | FromDiscord | <Robyn [She/Her]> 🤷♀️ |
18:44:50 | FromDiscord | <Robyn [She/Her]> I'd say just do it how your mind expands it into |
18:45:38 | FromDiscord | <albassort> heres the theory: |
18:45:46 | FromDiscord | <albassort> oh not a theory |
18:45:59 | FromDiscord | <albassort> this is basically the c method of writing distrinct void pointer |
18:46:13 | FromDiscord | <albassort> (edit) "distrinct" => "a distinct" |
18:46:27 | FromDiscord | <albassort> so they can put whatevr data they want at the given address |
18:46:31 | FromDiscord | <albassort> kinda clever? |
18:46:34 | FromDiscord | <leorize> it is, but this is not how you'd translate that particular typedef to nim |
18:46:44 | FromDiscord | <albassort> how would you |
18:47:51 | FromDiscord | <leorize> https://play.nim-lang.org/#pasty=UcLOEQbh |
18:48:27 | FromDiscord | <leorize> oops I read it wong, gotta flip it around |
18:48:57 | FromDiscord | <leorize> https://play.nim-lang.org/#pasty=HGbgHpnH |
18:49:07 | FromDiscord | <leorize> although I'd recommend to not use libgpgme if possible |
18:49:08 | FromDiscord | <albassort> you can have ptrs to typedsc? |
18:49:51 | FromDiscord | <leorize> I don't see any typedesc here \:p |
18:49:56 | FromDiscord | <albassort> In reply to @leorize "although I'd recommend to": what should i wrap then |
18:52:57 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LKmZQDiQ |
18:54:08 | FromDiscord | <leorize> I don't think there's any mature alternatives, unfortunately↵(@albassort) |
18:54:28 | FromDiscord | <leorize> rust is going with their sequoia project but it will take awhile |
18:54:42 | FromDiscord | <leorize> you can't, that's pattern matching↵(@Robyn [She/Her]) |
18:55:01 | * | def- quit (Quit: -) |
18:55:17 | FromDiscord | <leorize> you could do a combination of `if x.isSome(): case x.get... else: ...` |
18:55:26 | FromDiscord | <leorize> but nothing as neat as that rust snippet |
18:57:04 | FromDiscord | <albassort> In reply to @leorize "you can't, that's pattern": theres nmom bindings for it, but i dont like it |
18:57:42 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "you can't, that's pattern": I'm implementing it as a macro, I'm asking for theoretical syntax that I could implement |
18:57:57 | FromDiscord | <albassort> and gpg is the most developed and i want to be secure and not get burned by using the new kid on the block |
18:57:59 | FromDiscord | <albassort> (edit) "nmom" => "nim" |
18:57:59 | FromDiscord | <albassort> (edit) "nim" => "nmom" | "it" => "them for various reasons" |
18:58:01 | FromDiscord | <Robyn [She/Her]> Unless you're saying that's also not doable even with a macro |
18:58:05 | FromDiscord | <albassort> (edit) "nmom" => "nim" |
18:58:21 | FromDiscord | <dddeserttt> Hey fellas |
18:58:24 | FromDiscord | <albassort> In reply to @leorize "I don't think there's": resopnd to this( |
18:58:25 | FromDiscord | <nnsee> hey fella |
18:58:27 | FromDiscord | <leorize> look for haxscramper's macro↵(@Robyn [She/Her]) |
18:58:27 | FromDiscord | <albassort> (edit) "this(" => "this" |
18:58:37 | FromDiscord | <shad.ow> has anyone made a project using nimwave other than bbs ansiwave / the starter project ? i am suffering from a supreme lack of documentation rn 😭 |
18:58:52 | FromDiscord | <dddeserttt> I trying to forward some socket traffic over a proxy. Anyone know anything about that |
18:58:54 | FromDiscord | <dddeserttt> In nim ofc |
18:59:04 | FromDiscord | <leorize> it depends on your goal, but unfortunately if you are doing interop with gpg then it's likely that libgpgme is the only solution↵(@albassort) |
18:59:30 | FromDiscord | <leorize> my only gripe with it (which I'm not sure is still true), is that libgpgme basically just calls the gnupg executable and parse the result, so it's slow af |
18:59:43 | FromDiscord | <shad.ow> plain illwill would be suitable for my project but i need truecolor support and i'd like a slicing system |
18:59:48 | FromDiscord | <shad.ow> illwave supports these, but again zero documentation |
18:59:52 | FromDiscord | <albassort> the main tuing i dont like about gpgme is the fact that ~~its fucking insane~~ that take XML as input for some reason |
19:00:03 | FromDiscord | <dddeserttt> Using nim ofc |
19:00:29 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "look for haxscramper's macro": Where should I look? In the Discord or? |
19:00:40 | FromDiscord | <albassort> In reply to @leorize "my only gripe with": wait what |
19:00:49 | FromDiscord | <albassort> ????? |
19:01:10 | FromDiscord | <albassort> you're fucking with me |
19:02:47 | FromDiscord | <albassort> no it connects to the daemon |
19:03:04 | FromDiscord | <albassort> i think |
19:04:44 | FromDiscord | <leorize> just skimmed the source code, this is still the case today |
19:04:50 | FromDiscord | <leorize> you can see why people wanted an another gnupg implementation |
19:05:27 | FromDiscord | <albassort> why do thsi |
19:05:30 | FromDiscord | <albassort> (edit) "thsi" => "this" |
19:05:45 | FromDiscord | <albassort> at this point why not implement RPC over the server |
19:07:02 | FromDiscord | <leorize> gnupg is very ancient |
19:07:10 | FromDiscord | <leorize> kinda like gcc |
19:07:23 | FromDiscord | <leorize> so there's no easy way to factor the core out as a library |
19:07:36 | FromDiscord | <leorize> people used to just call the gnupg executables |
19:07:43 | FromDiscord | <leorize> and that was error prone |
19:07:53 | FromDiscord | <albassort> ok so does it call the code via ./ or does it embed it within the code as the "engine" if so then it shouldn't be that much slower than calling the actual functions |
19:07:54 | FromDiscord | <leorize> so libgpgme comes around to standardize that part \:p |
19:07:56 | FromDiscord | <endzone19653> 18+ Teen Girls and onlyfans leaks for free :peach: :underage: https://discord.gg/VYtq9nhhYC @everyone |
19:08:08 | FromDiscord | <albassort> <@&371760044473319454> |
19:08:56 | FromDiscord | <leorize> a requirement to using libgpgme is to have gnupg installed↵(@albassort) |
19:09:07 | FromDiscord | <leorize> so I assume that it just pick the executable from your PATH |
19:09:23 | FromDiscord | <albassort> i am unhappy about this |
19:09:58 | FromDiscord | <albassort> so there was nim bindings for a rust thing |
19:10:17 | FromDiscord | <albassort> but i didn't like it because of code style reasons and it also embedded it in the code |
19:11:24 | FromDiscord | <albassort> so should i rewrite that? |
19:11:26 | FromDiscord | <albassort> also didn't get high level enough |
19:12:08 | FromDiscord | <albassort> https://github.com/ba0f3/sequoia.nim |
19:12:44 | FromDiscord | <leorize> maybe, that wrapper is a little ancient |
19:12:55 | FromDiscord | <Robyn [She/Her]> Half-tempted to make a case statement macro hm |
19:13:36 | FromDiscord | <leorize> case stmt macro doesn't give you anything special |
19:13:45 | FromDiscord | <albassort> In reply to @chronos.vitaqua "Half-tempted to make a": remember that in case statements all cases are blocks so you can use them as gotos |
19:14:51 | * | def- joined #nim |
19:15:10 | FromDiscord | <albassort> i think I will fork the ancient wrapper, update the style and make it compile for 2.0 and add high level bindings |
19:15:48 | FromDiscord | <albassort> thank you for the warning before i burnt my time away |
19:16:07 | FromDiscord | <albassort> i had pc issues, had it not been for that i would have had hours of work done on the wrapper |
19:17:11 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "case stmt macro doesn't": Fair enough |
19:17:42 | FromDiscord | <Robyn [She/Her]> Might just make `unpackIt` and not deal with the fuckery that is a `match` macro |
19:17:47 | FromDiscord | <Robyn [She/Her]> PRs welcome ✨ |
19:17:49 | FromDiscord | <leorize> see if this is any good\: https://nim-lang.github.io/fusion/src/fusion/matching.html |
19:17:59 | * | def- quit (Client Quit) |
19:18:19 | * | def- joined #nim |
19:19:08 | FromDiscord | <albassort> leorize, before i wrap sequoia |
19:19:25 | FromDiscord | <albassort> i dont actually know what to wrap lol |
19:19:51 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "see if this is": Ooh it looks nice, just dislike that I have to do `case Obj():`, but I can deal with it, thanks Leorize! |
19:20:22 | FromDiscord | <albassort> there are like no docs |
19:20:37 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1245819170113851492/image.png?ex=665a2304&is=6658d184&hm=580062038dc6997ce420ffb9cad84a4e4404b23947fa677438779c883f0d4e80& |
19:20:53 | FromDiscord | <albassort> Seems like this is the same issue as gpgme |
19:21:59 | FromDiscord | <leorize> the sequoia library itself is different |
19:22:24 | FromDiscord | <leorize> and lol I just figured out what is today's design of gpgme |
19:23:11 | FromDiscord | <albassort> it runs the executable as a subprocess and communicates through ipc |
19:23:13 | FromDiscord | <albassort> ? |
19:23:15 | FromDiscord | <dddeserttt> Hey does anyone know how to use socks proxies with nim net |
19:23:23 | FromDiscord | <albassort> or does it create command line args |
19:23:37 | FromDiscord | <albassort> In reply to @dddeserttt "Hey does anyone know": yes! |
19:23:44 | FromDiscord | <leorize> it does both lmao↵(@albassort) |
19:23:48 | FromDiscord | <albassort> are you using net sockets themselves |
19:24:01 | FromDiscord | <dddeserttt> Yes |
19:24:07 | FromDiscord | <dddeserttt> I am |
19:24:15 | FromDiscord | <dddeserttt> Just the nim native Lib |
19:24:27 | FromDiscord | <albassort> you connect to the socks server then you follow the socks protocol |
19:24:36 | FromDiscord | <albassort> rfc 1999 or something |
19:24:52 | FromDiscord | <albassort> thats it |
19:24:57 | FromDiscord | <albassort> UDP binding is a little more silly and depends on the implementation but tcp sockets are simple |
19:25:08 | FromDiscord | <dddeserttt> TCP is what I’m going for |
19:25:18 | FromDiscord | <dddeserttt> Trying to send a program over the tor network |
19:25:34 | FromDiscord | <dddeserttt> Net stuff confuses me generally |
19:25:39 | FromDiscord | <albassort> you need to make sure the tor socks tunnel is on |
19:25:47 | FromDiscord | <albassort> in your tor.cfg |
19:25:48 | FromDiscord | <dddeserttt> It is |
19:25:56 | FromDiscord | <dddeserttt> I believe |
19:26:01 | FromDiscord | <dddeserttt> I have the service running |
19:26:08 | FromDiscord | <albassort> its not on by default |
19:26:14 | FromDiscord | <dddeserttt> Lemme check |
19:26:34 | FromDiscord | <albassort> make sure the socks tunnel has a port on |
19:27:08 | FromDiscord | <albassort> In reply to @leorize "it does both lmao": do you think they'll ever fix it or even give us rpc |
19:27:15 | FromDiscord | <albassort> rpc would be so fucking easy |
19:28:18 | FromDiscord | <albassort> im not gonna implement an rpc alternative to gpgme because that would mean i'd need to natively bind to gpg which nobody seems to want to do because they know its a waste of time |
19:28:31 | FromDiscord | <dddeserttt> You know where tor config is located? |
19:28:37 | FromDiscord | <albassort> /etc/tor/ |
19:29:13 | FromDiscord | <dddeserttt> Tor sets socks proxy on be deadly |
19:29:15 | FromDiscord | <dddeserttt> Default |
19:29:17 | FromDiscord | <dddeserttt> Sweet |
19:29:20 | FromDiscord | <albassort> cool |
19:29:36 | FromDiscord | <albassort> https://datatracker.ietf.org/doc/html/rfc1928 |
19:29:45 | FromDiscord | <albassort> i could give you my code, but i wont lol |
19:30:00 | FromDiscord | <albassort> im sure theres a socks thing for nim |
19:30:01 | FromDiscord | <albassort> but anyway |
19:30:10 | FromDiscord | <albassort> you wanna connect to the port, usually 9100 iirc |
19:30:21 | FromDiscord | <dddeserttt> I can connect |
19:30:31 | FromDiscord | <albassort> sorry |
19:30:32 | FromDiscord | <albassort> 9050 |
19:30:33 | FromDiscord | <dddeserttt> I’m confused on where I go after I connect |
19:30:37 | FromDiscord | <albassort> oh |
19:30:38 | FromDiscord | <albassort> well |
19:30:48 | FromDiscord | <albassort> you need to folllow the rfc |
19:31:12 | FromDiscord | <dddeserttt> client.connect(“localhost”, Port(9050) |
19:31:27 | FromDiscord | <dddeserttt> But how after connecting to that do I connect to a different IP |
19:31:59 | FromDiscord | <albassort> follow. the. rfc. |
19:33:26 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1245822400294289539/image.png?ex=665a2606&is=6658d486&hm=4bf1997cbd2ceb126501fe146008ebbe85d6c25264c7a0abbb731ba223a30115& |
19:33:28 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1245822400566788136/image.png?ex=665a2606&is=6658d486&hm=aa298d4956e359295748ce1ec0b23963d0d1c7f054460f56c051670e938c372b& |
19:34:03 | FromDiscord | <albassort> after you get a 0x00 in the REp field of the reply, the socket works as if you are directly connected to the socket |
19:34:55 | FromDiscord | <albassort> note: idk how bind works, you wanna do connect 99.99% of times |
19:39:48 | FromDiscord | <albassort> oh god wrapping rust is gonna be hard |
19:39:49 | FromDiscord | <albassort> i barely even know any rust |
19:42:01 | FromDiscord | <albassort> oh i see |
19:42:05 | FromDiscord | <albassort> i just need to compile it to a static library and i can use importc |
19:43:28 | FromDiscord | <dddeserttt> This whole rfc thing is actually useful |
19:43:39 | FromDiscord | <dddeserttt> My teachers tried to tell me |
19:43:52 | FromDiscord | <albassort> they can be difficult and ambigous at times |
19:44:01 | FromDiscord | <albassort> because usually they come before an implementation |
19:44:06 | FromDiscord | <dddeserttt> I see |
19:44:07 | FromDiscord | <albassort> this one is a little bit bad on the UDp side |
19:44:16 | FromDiscord | <albassort> (edit) "UDp" => "UDP and the Connect" |
19:44:27 | FromDiscord | <albassort> but for your needs, its well done |
19:44:42 | FromDiscord | <albassort> usually when working with protocols, the rfc is the first place to go, then after, an implementation |
19:45:11 | FromDiscord | <albassort> (edit) "usually when working with protocols, the rfc is the first place to go, then after, an implementation ... " added "(if you need it)" |
19:45:19 | FromDiscord | <albassort> tell your teachers i said hi |
19:55:36 | FromDiscord | <dddeserttt> Will do😭 |
19:58:02 | * | def- quit (Quit: -) |
20:00:25 | * | def- joined #nim |
20:02:33 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=udQFlILr |
20:03:24 | FromDiscord | <nervecenter> (edit) "https://play.nim-lang.org/#pasty=cRyQBHlw" => "https://play.nim-lang.org/#pasty=FboBxFDh" |
20:03:41 | FromDiscord | <nervecenter> I'm just trying to filter out rows that have a NaN in that column |
20:25:12 | FromDiscord | <nervecenter> Looks like it's going to need a look my the maintainers, answered in #science. |
20:25:17 | FromDiscord | <nervecenter> (edit) "my" => "by" |
20:25:54 | * | ntat quit (Quit: Leaving) |
20:28:12 | * | systemds1cks joined #nim |
20:42:32 | FromDiscord | <Robyn [She/Her]> I need to generate a case statement but I'm not sure how to do that in this situation oof |
20:45:08 | FromDiscord | <Elegantbeef> That's a shame |
20:47:16 | FromDiscord | <Robyn [She/Her]> Shouldn't be too hard |
20:53:27 | FromDiscord | <Robyn [She/Her]> Case statements can have else if branches? |
20:53:31 | FromDiscord | <Robyn [She/Her]> How does that work? |
20:54:03 | FromDiscord | <Elegantbeef> The same was as normal if elif |
20:54:17 | FromDiscord | <Elegantbeef> Turn all `of` branches into `if` then emit `elif` or `else` |
20:58:36 | FromDiscord | <Robyn [She/Her]> Oh neat |
21:20:54 | * | def- quit (Quit: -) |
21:21:42 | * | def- joined #nim |
21:38:30 | FromDiscord | <Robyn [She/Her]> `/data/data/com.termux/files/home/Cordyceps/src/cordyceps.nim(416, 6) Error: Expected: CaseStmt`↵https://play.nim-lang.org/#pasty=GNicirDk Line 370 onwards :/ |
21:40:52 | FromDiscord | <Robyn [She/Her]> Oh wait |
21:43:18 | * | beholders_eye quit (Read error: Connection reset by peer) |
21:47:30 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=htlVBEhP↵`/data/data/com.termux/files/home/Cordyceps/src/cordyceps.nim(420, 21) Error: expression 'test(it)' is of type 'string' and has to be used (or discarded); start of expression here: /data/data/com.termux/files/home/Cordyceps/src/cordyceps.nim(377, 20)` |
21:47:40 | FromDiscord | <Robyn [She/Her]> Implicit returns don't work? 😔 |
21:49:17 | * | beholders_eye joined #nim |
21:58:25 | FromDiscord | <shad.ow> anyone have an example of combining pixie with sdl2 or glfw to handle input ? there used to be examples, but i don't see them anymore |
22:01:08 | * | def- quit (Quit: -) |
22:02:34 | FromDiscord | <shad.ow> oh i might just want boxy |
22:03:00 | * | def- joined #nim |
22:03:22 | FromDiscord | <Elegantbeef> Do all branches return a string? |
22:03:23 | FromDiscord | <Elegantbeef> Oh bridge was down for a moment |
22:05:17 | FromDiscord | <Elegantbeef> @Robyn [She/Her] your `unpackIt` does not return anything |
22:05:17 | FromDiscord | <Elegantbeef> mark it `: untyped` |
22:06:23 | * | def- quit (Client Quit) |
22:06:51 | * | systemds1cks is now known as systemdsucks |
22:18:37 | FromDiscord | <Robyn [She/Her]> Ah, I thought it was supposed to return that implicitly anyway, thanks Beef! |
22:18:41 | * | disso-peach joined #nim |
22:19:17 | FromDiscord | <Robyn [She/Her]> Nice, it works! |
22:27:30 | * | pbsds3 quit (Quit: The Lounge - https://thelounge.chat) |
22:29:21 | FromDiscord | <Robyn [She/Her]> `Hint: 'it' is declared but not used [XDeclaredButNotUsed]` this is annoying but trying `stmt.add quote do: {.push warning[XDeclaredButNotUsed]:off.}` gave `Error: invalid pragma: warning[XDeclaredButNotUsed]: off` |
22:29:42 | * | pbsds3 joined #nim |
22:35:00 | FromDiscord | <Elegantbeef> `'Hint'` |
22:35:06 | FromDiscord | <Elegantbeef> It's easier to just do `{.used.}` |
22:35:17 | FromDiscord | <Elegantbeef> `var bleh {.used.} = ...` inside a genast |
22:43:27 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "`Hint: 'it' is declared": Oh |
22:44:00 | FromDiscord | <Robyn [She/Her]> How's `genAst` different to `quote do`? |
22:44:14 | FromDiscord | <Elegantbeef> No need for acc quoting replacements |
22:44:17 | FromDiscord | <Elegantbeef> So you get in less of a mess |
22:45:02 | FromDiscord | <Elegantbeef> you also can do things like `genast(myIdent = ident"jimbo"): var myIdent = 100` |
22:45:24 | FromDiscord | <Robyn [She/Her]> Ooooh that seems useful |
22:47:18 | FromDiscord | <Robyn [She/Her]> `/data/data/com.termux/files/home/Cordyceps/src/cordyceps.nim(418, 6) Hint: 'test' is declared but not used [XDeclaredButNotUsed]` `test` is the proc I'm using, and the generated AST does use it, so hm... |
23:04:00 | * | def- joined #nim |
23:07:56 | FromDiscord | <Robyn [She/Her]> Oh huh |
23:08:01 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=nsmjBZAp |
23:08:37 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "https://play.nim-lang.org/#pasty=nsmjBZAp": For some reason, `unpack` seems to be returning an int still even though both the ASTs seem fine? |
23:08:56 | FromDiscord | <Elegantbeef> Well yea |
23:09:05 | FromDiscord | <Elegantbeef> Wait |
23:09:17 | FromDiscord | <Elegantbeef> Is that type erased into a `Result`? |
23:09:25 | FromDiscord | <Elegantbeef> Or `Error` whatever you have the silly type named |
23:09:59 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Is that type erased": No, it shouldn't be? And either way, it's operating on the kind in the type |
23:10:19 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "For some reason, `unpack`": Also I mean `unpackIt` not `unpack`, that seems to be working fine |
23:16:46 | FromDiscord | <Elegantbeef> Ah you might've hit the awful Nim generic typebug |
23:16:55 | FromDiscord | <Robyn [She/Her]> Oh no ._. |
23:17:22 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/issues/22479#issuecomment-1678456115 |
23:18:43 | FromDiscord | <Robyn [She/Her]> I don't get the issue? |
23:19:03 | FromDiscord | <Robyn [She/Her]> Oh wait |
23:19:03 | FromDiscord | <Robyn [She/Her]> Ooh |
23:19:08 | FromDiscord | <Robyn [She/Her]> ...ugh |
23:19:21 | FromDiscord | <Robyn [She/Her]> Is there no way to work around it? |
23:20:16 | FromDiscord | <Elegantbeef> There is |
23:20:25 | * | def- quit (Quit: -) |
23:20:31 | FromDiscord | <Elegantbeef> Use the generic parameter like `_: array[0, (K, V)]` |
23:21:18 | * | def- joined #nim |
23:21:38 | FromDiscord | <Robyn [She/Her]> Huh? |
23:21:51 | FromDiscord | <Robyn [She/Her]> What do you mean? |
23:22:03 | FromDiscord | <Elegantbeef> If one uses the generic parameters inside the type definition it's not considered the same type |
23:22:20 | FromDiscord | <Elegantbeef> This might be the issue, but it might also be another issue that's unrelated |
23:22:28 | FromDiscord | <Elegantbeef> It could just be your `test` is being bound wrongly |
23:22:58 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "If one uses the": So I should try adding that field you recommended and see if that fixed it? |
23:32:37 | FromDiscord | <Robyn [She/Her]> It didn't fix it |
23:35:41 | * | beholders_eye quit (Read error: Connection reset by peer) |
23:37:41 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "It could just be": I'm not sure how to fix that honestly |
23:39:12 | FromDiscord | <Elegantbeef> You're converting the type |
23:39:45 | FromDiscord | <Elegantbeef> `unpackIt` only makes sense on `Result` |
23:40:10 | FromDiscord | <Elegantbeef> You do not need to `unpack` `Err` you just grab the field |
23:40:31 | FromDiscord | <Elegantbeef> If `Error`'s kind is ever `rOk` you dun goofed |
23:40:41 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "If `Error`'s kind is": That's why I have a case statement tho |
23:40:49 | FromDiscord | <Elegantbeef> But what's the point? |
23:41:04 | FromDiscord | <Elegantbeef> You have `Err` you know `kind == rErr` |
23:41:21 | * | beholders_eye joined #nim |
23:41:32 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=HjDqEvxI |
23:41:36 | FromDiscord | <Elegantbeef> you should be able to just do `string(e)` or w/e |
23:41:42 | FromDiscord | <Elegantbeef> Right, but what's the point |
23:41:52 | FromDiscord | <Elegantbeef> You're unpacking an `Error` type |
23:41:59 | FromDiscord | <Elegantbeef> You will never get to the `rOk` branch |
23:42:47 | FromDiscord | <Elegantbeef> `unpackit` in your usecase is just `test(e)` but done through a macro |
23:43:38 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "But what's the point?": So you can do stuff like `proc codeRepr(i: DotExpr): string` with AST types you don't know? |
23:43:42 | FromDiscord | <Elegantbeef> Yes it should probably call the proper `test` |
23:43:54 | FromDiscord | <Elegantbeef> But you know the type |
23:44:07 | FromDiscord | <Elegantbeef> `unpackit` should only operate on `Result` not `Err` |
23:44:14 | FromDiscord | <Robyn [She/Her]> If you don't know the type, though, like on a DOD AST? |
23:44:23 | FromDiscord | <Elegantbeef> You know the type |
23:44:31 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "`unpackit` should only operate": So I should explicitly disallow that? |
23:44:35 | FromDiscord | <Elegantbeef> `Error` does not need to be unpacked it's typed |
23:44:42 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "You know the type": I don't understand |
23:45:02 | FromDiscord | <Elegantbeef> `unpack` should be an operation that applies to all branches of the sumtype, it's probably best called `map` |
23:45:23 | FromDiscord | <Elegantbeef> There is no need to call `map` on a branched type |
23:45:26 | FromDiscord | <Elegantbeef> Since you already know the type |
23:45:30 | FromDiscord | <Elegantbeef> Just call the procedure directly |
23:46:22 | FromDiscord | <Robyn [She/Her]> Branched type as in, the case statement that checks the fields? |
23:46:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=nDPsIXtH |
23:46:48 | FromDiscord | <Elegantbeef> This is the only situation that makes sense |
23:46:53 | FromDiscord | <Elegantbeef> When you actually use the sumtype |
23:47:18 | FromDiscord | <Elegantbeef> `Error[T, E]` is a known type, why would you need to unpack it it's an error, so grab the error value and carry on |
23:47:20 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=xDnQmtdH |
23:48:19 | FromDiscord | <Elegantbeef> The entire point of the distinct typing in Fungus(and I assume all Rust style ''''''enums''''''') is you use the type system to statically alleviate the type loss |
23:48:38 | FromDiscord | <Elegantbeef> Yes I only felt secure with that many quotes around enums |
23:48:43 | FromDiscord | <Robyn [She/Her]> Yeah that makes sense to me |
23:51:05 | FromDiscord | <Elegantbeef> Of course you still had a bug inside the `unpackIt` macro, but see if it appears still with the proper implementation 😄 |
23:52:52 | FromDiscord | <Robyn [She/Her]> Yeah, it still happens rip |
23:53:06 | FromDiscord | <Elegantbeef> Current source? |
23:53:15 | FromDiscord | <Robyn [She/Her]> Thanks for all the help though, Beef, I know it can be frustrating to explain stuff to me :p |
23:53:16 | FromDiscord | <Robyn [She/Her]> https://play.nim-lang.org/#pasty=brNoaRJs |
23:55:20 | FromDiscord | <Elegantbeef> Ah I see the issue |
23:55:27 | FromDiscord | <Elegantbeef> `stmt.add body.copyNimTree()` |
23:56:32 | FromDiscord | <Elegantbeef> Also you might want `template it(): auto {.used.} = bod(target)` instead of the `it = ...` to do copy elision |
23:58:06 | * | def- quit (Quit: -) |
23:59:05 | FromDiscord | <Robyn [She/Her]> Ooh oki! |
23:59:43 | FromDiscord | <Robyn [She/Her]> Why the copy, though? |