<< 30-05-2024 >>

00:00:14FromDiscord<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:36FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=aDVgqsmR↵Cordyceps is my local library, but god this syntax looks so clean
01:41:44FromDiscord<Robyn [She/Her]> I just need a few macros and it'll be perfect
01:42:03FromDiscord<Robyn [She/Her]> Maybe I don't even need a macro for `as` :>
01:42:13FromDiscord<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:27FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=jBIWEqup
02:22:48FromDiscord<Elegantbeef> Not B
02:22:52FromDiscord<Robyn [She/Her]> I could use `to` for choice A tbh
02:23:07FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Not B": Yeah, it looks gross with Nim's syntax
02:23:14FromDiscord<Robyn [She/Her]> Not sure what else it should be though
02:23:23FromDiscord<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:59FromDiscord<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:47FromDiscord<Elegantbeef> Your pragma does not stick around
03:42:49FromDiscord<Elegantbeef> So you need another pragma and to attach it
03:44:21*SchweinDeBurg joined #nim
03:59:23FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Your pragma does not": Wdym?
03:59:32FromDiscord<Robyn [She/Her]> My macro adds the pragma to the generated type
03:59:41FromDiscord<Robyn [She/Her]> Hold I should've been more clear sorry
04:00:41FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=RieDAMZc
04:01:11FromDiscord<Robyn [She/Her]> The type does have the pragma, since in the macro I generate the AST with the pragma included
04:01:27FromDiscord<Elegantbeef> t is an instance not the type
04:01:33FromDiscord<Robyn [She/Her]> Oh
04:01:48FromDiscord<Robyn [She/Her]> So then I'd use `typeof(t)`?
04:02:26FromDiscord<Robyn [She/Her]> Still a no
04:02:40FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=cjeHwIdv
04:03:02FromDiscord<Elegantbeef> or `type Bleh = concept type T`
04:03:02FromDiscord<Elegantbeef> bud isn't tagged `{.pragma.}`
04:03:53FromDiscord<Robyn [She/Her]> It is `template bud() {.pragma.}`
04:04:23FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=wFFalkOA
04:04:26FromDiscord<Robyn [She/Her]> Could this be the issue?
04:05:06FromDiscord<Robyn [She/Her]> `target: Bud`?
04:05:57FromDiscord<Robyn [She/Her]> Oh wait
04:06:05FromDiscord<Robyn [She/Her]> My generated AST is broken
04:06:42FromDiscord<Robyn [She/Her]> Hm, I fixed that but it's still not working
04:08:39FromDiscord<Elegantbeef> Is this a generic type?
04:09:22FromDiscord<Robyn [She/Her]> It is, yeah
04:09:34FromDiscord<Robyn [She/Her]> Oh wait could that be the issue?
04:14:39FromDiscord<Robyn [She/Her]> Not sure how to fix it tbh
04:20:03FromDiscord<Robyn [She/Her]> `stripGenericParams`, neat
04:22:43FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LBbTKFgq
04:22:44FromDiscord<Robyn [She/Her]> Hm
04:27:45FromDiscord<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:55PMunchHmm, what's the most ergonomic way to get an `array[3, char]` from a string
06:42:02PMunchStarting at an arbitrary position
06:48:21FromDiscord<odexine> that outright requires a copy no?
06:51:28PMunchSure
06:51:42PMunchI'm just going for ergonomics
06:52:01PMunchCurrently I do `[mystr[i], mystr[i+1], mystr[i+2]]`
06:52:48FromDiscord<Elegantbeef> Time to make a `proc toArray(oa: openArray[char], size: static int): array[size, char] = result[0..size] = oa` 😄
06:53:04FromDiscord<Elegantbeef> Now you can have `myString.toOpenArray(x, y).toArray(4)`
06:53:25PMunchAh, `toArray` was the missing piece!
06:53:43PMunchOh wait, didn't read your first message :P
06:53:47PMunchThought it was in the stdlib
06:54:12FromDiscord<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:23PMunchHmm, 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:47FromDiscord<Elegantbeef> Pmunch you're best to do `for y in someSeq.toOpenArray(0, someSeq.high)`
08:01:54FromDiscord<Elegantbeef> Or use slicerator which has `[]` iterators
08:06:05*def- quit (Quit: -)
08:07:09*def- joined #nim
08:10:11Amun-Raor the classic way for i in 1 .. someseq.hight: … someseq[i] …
08:10:18Amun-Rawhich is effin faster
08:11:06PMunchWell it makes sense, you're copying all the elements into new seq :P
08:11:21PMunchBut 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:37Amun-RaI've to benchmark classic iterating vs the one with toOpenArray for trivial types
08:15:35*def- quit (Client Quit)
08:15:45PMunchShould be pretty comparable speed wise
08:15:53PMunchAs 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:06FromDiscord<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:08FromDiscord<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:19FromDiscord<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:19FromDiscord<Robyn [She/Her]> Is it possible to create an unmangled sym from an ident?
12:32:30FromDiscord<Robyn [She/Her]> Actually might not need to do that
12:35:47FromDiscord<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:12FromDiscord<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:37FromDiscord<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:36PMunchHmm, why doesn't `HttpRequestError` keep the HTTP request error code?
12:43:57PMunchI 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:12FromDiscord<Robyn [She/Her]> Aha, `getTypeInst` did the trick!
12:47:34FromDiscord<Robyn [She/Her]> In reply to @PMunch "Hmm, why doesn't `HttpRequestError`": Sounds like an oversight to me
12:49:32PMunchYeah unfortunately
12:49:47PMunchThe standard library has a bunch of these small oversights..
12:50:11FromDiscord<Robyn [She/Her]> Time for a new standard library? 😛
12:50:56PMunchDon't tempt me..
12:51:08PMunchI've seriously considered it a couple of times
12:51:17PMunchBut it's quite a massive undertaking
12:52:15FromDiscord<Robyn [She/Her]> Yeah I can imagine rip
12:52:33FromDiscord<Robyn [She/Her]> Ugh, `macrocache` is so limiting...
13:14:57FromDiscord<ieltan> $
13:18:13FromDiscord<odexine> In reply to @chronos.vitaqua "Ugh, `macrocache` is so": In what way
13:19:39FromDiscord<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:04FromDiscord<Robyn [She/Her]> Or even tables with an arbitrary type
13:20:31FromDiscord<Robyn [She/Her]> `Table[string, tuple[name: string, typ: typedesc]]`
13:20:45FromDiscord<Robyn [She/Her]> I can use compile-time variables but you're supposed to avoid them
13:21:39FromDiscord<odexine> I think the guarantees given by macro cache are harder to achieve if less limited
13:24:11FromDiscord<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:51FromDiscord<Robyn [She/Her]> Do I say fuck it and use a compile-time variable anyway? Hm...
13:52:06FromDiscord<Robyn [She/Her]> It'd be useful to have a table that maps a string to another string...
13:53:54NimEventerNew 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:55FromDiscord<nnsee> In reply to @NimEventer "New thread by IgnisTempestas:": god i hate how he pronounces init
14:20:57FromDiscord<nnsee> "eye-nit"
14:21:24FromDiscord<zumi.dxy> sql = squeal
14:21:27FromDiscord<saint.___.> In reply to @nnsee "god i hate how": 🤮
14:27:51FromDiscord<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:57FromDiscord<nnsee> or even just use `nimble install --passNim="--run"` to automatically execute the compiled binary as root
14:31:41FromDiscord<nnsee> unless that behavior didn't exist in those versions of nim/nimble
15:00:48*def- quit (Quit: -)
15:01:17FromDiscord<odexine> In reply to @NimEventer "New thread by IgnisTempestas:": oh jeez john hammond
15:06:31FromDiscord<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:48FromDiscord<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:28FromDiscord<odexine> up is child to parent so B to A
17:02:44*def- joined #nim
17:06:52FromDiscord<Robyn [She/Her]> It wasn't the thing I needed anyway ehe
17:07:02FromDiscord<Robyn [She/Her]> Anyway, I managed to make a simple unpack macro :)))
17:07:11FromDiscord<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:20FromDiscord<albassort> i tried using c2nim last night
17:59:31FromDiscord<albassort> it just wouldn't output
17:59:32FromDiscord<albassort> it was stuck?
17:59:48FromDiscord<albassort> is this normal for 6000 line files?
18:10:01FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=sfaoYqyr
18:10:15FromDiscord<albassort> (edit) "https://play.nim-lang.org/#pasty=LEwGaSfb" => "https://play.nim-lang.org/#pasty=wsWCBupS"
18:11:17FromDiscord<albassort> how is this converted to nim?
18:11:18FromDiscord<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:36FromDiscord<Robyn [She/Her]> Unpack macro works ✨
18:33:49FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=jcYRxWlK
18:33:59FromDiscord<Robyn [She/Her]> Actually wait
18:34:00FromDiscord<Robyn [She/Her]> Hm
18:34:33FromDiscord<Robyn [She/Her]> `distinct pointer` seems right but I don't do anything regarding C, so...
18:36:48FromDiscord<Robyn [She/Her]> I just need a macro for matching and then I'm all set
18:37:03FromDiscord<Robyn [She/Her]> Which is a lot harder than it sounds...
18:38:56FromDiscord<albassort> it points to the typedef
18:38:56FromDiscord<albassort> but the typdef is void
18:41:33*systemdsucks quit (Ping timeout: 268 seconds)
18:42:16FromDiscord<Robyn [She/Her]> A `void` is a `pointer` in Nim, so do with that what you will
18:42:51FromDiscord<albassort> i meant the struct has no elements
18:42:56FromDiscord<albassort> its just an empty strut
18:43:01FromDiscord<albassort> (edit) "strut" => "struct"
18:43:04FromDiscord<albassort> and its a pointer to that
18:44:36FromDiscord<Robyn [She/Her]> 🤷‍♀️
18:44:50FromDiscord<Robyn [She/Her]> I'd say just do it how your mind expands it into
18:45:38FromDiscord<albassort> heres the theory:
18:45:46FromDiscord<albassort> oh not a theory
18:45:59FromDiscord<albassort> this is basically the c method of writing distrinct void pointer
18:46:13FromDiscord<albassort> (edit) "distrinct" => "a distinct"
18:46:27FromDiscord<albassort> so they can put whatevr data they want at the given address
18:46:31FromDiscord<albassort> kinda clever?
18:46:34FromDiscord<leorize> it is, but this is not how you'd translate that particular typedef to nim
18:46:44FromDiscord<albassort> how would you
18:47:51FromDiscord<leorize> https://play.nim-lang.org/#pasty=UcLOEQbh
18:48:27FromDiscord<leorize> oops I read it wong, gotta flip it around
18:48:57FromDiscord<leorize> https://play.nim-lang.org/#pasty=HGbgHpnH
18:49:07FromDiscord<leorize> although I'd recommend to not use libgpgme if possible
18:49:08FromDiscord<albassort> you can have ptrs to typedsc?
18:49:51FromDiscord<leorize> I don't see any typedesc here \:p
18:49:56FromDiscord<albassort> In reply to @leorize "although I'd recommend to": what should i wrap then
18:52:57FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=LKmZQDiQ
18:54:08FromDiscord<leorize> I don't think there's any mature alternatives, unfortunately↵(@albassort)
18:54:28FromDiscord<leorize> rust is going with their sequoia project but it will take awhile
18:54:42FromDiscord<leorize> you can't, that's pattern matching↵(@Robyn [She/Her])
18:55:01*def- quit (Quit: -)
18:55:17FromDiscord<leorize> you could do a combination of `if x.isSome(): case x.get... else: ...`
18:55:26FromDiscord<leorize> but nothing as neat as that rust snippet
18:57:04FromDiscord<albassort> In reply to @leorize "you can't, that's pattern": theres nmom bindings for it, but i dont like it
18:57:42FromDiscord<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:57FromDiscord<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:59FromDiscord<albassort> (edit) "nmom" => "nim"
18:57:59FromDiscord<albassort> (edit) "nim" => "nmom" | "it" => "them for various reasons"
18:58:01FromDiscord<Robyn [She/Her]> Unless you're saying that's also not doable even with a macro
18:58:05FromDiscord<albassort> (edit) "nmom" => "nim"
18:58:21FromDiscord<dddeserttt> Hey fellas
18:58:24FromDiscord<albassort> In reply to @leorize "I don't think there's": resopnd to this(
18:58:25FromDiscord<nnsee> hey fella
18:58:27FromDiscord<leorize> look for haxscramper's macro↵(@Robyn [She/Her])
18:58:27FromDiscord<albassort> (edit) "this(" => "this"
18:58:37FromDiscord<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:52FromDiscord<dddeserttt> I trying to forward some socket traffic over a proxy. Anyone know anything about that
18:58:54FromDiscord<dddeserttt> In nim ofc
18:59:04FromDiscord<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:30FromDiscord<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:43FromDiscord<shad.ow> plain illwill would be suitable for my project but i need truecolor support and i'd like a slicing system
18:59:48FromDiscord<shad.ow> illwave supports these, but again zero documentation
18:59:52FromDiscord<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:03FromDiscord<dddeserttt> Using nim ofc
19:00:29FromDiscord<Robyn [She/Her]> In reply to @leorize "look for haxscramper's macro": Where should I look? In the Discord or?
19:00:40FromDiscord<albassort> In reply to @leorize "my only gripe with": wait what
19:00:49FromDiscord<albassort> ?????
19:01:10FromDiscord<albassort> you're fucking with me
19:02:47FromDiscord<albassort> no it connects to the daemon
19:03:04FromDiscord<albassort> i think
19:04:44FromDiscord<leorize> just skimmed the source code, this is still the case today
19:04:50FromDiscord<leorize> you can see why people wanted an another gnupg implementation
19:05:27FromDiscord<albassort> why do thsi
19:05:30FromDiscord<albassort> (edit) "thsi" => "this"
19:05:45FromDiscord<albassort> at this point why not implement RPC over the server
19:07:02FromDiscord<leorize> gnupg is very ancient
19:07:10FromDiscord<leorize> kinda like gcc
19:07:23FromDiscord<leorize> so there's no easy way to factor the core out as a library
19:07:36FromDiscord<leorize> people used to just call the gnupg executables
19:07:43FromDiscord<leorize> and that was error prone
19:07:53FromDiscord<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:54FromDiscord<leorize> so libgpgme comes around to standardize that part \:p
19:07:56FromDiscord<endzone19653> 18+ Teen Girls and onlyfans leaks for free :peach: :underage: https://discord.gg/VYtq9nhhYC @everyone
19:08:08FromDiscord<albassort> <@&371760044473319454>
19:08:56FromDiscord<leorize> a requirement to using libgpgme is to have gnupg installed↵(@albassort)
19:09:07FromDiscord<leorize> so I assume that it just pick the executable from your PATH
19:09:23FromDiscord<albassort> i am unhappy about this
19:09:58FromDiscord<albassort> so there was nim bindings for a rust thing
19:10:17FromDiscord<albassort> but i didn't like it because of code style reasons and it also embedded it in the code
19:11:24FromDiscord<albassort> so should i rewrite that?
19:11:26FromDiscord<albassort> also didn't get high level enough
19:12:08FromDiscord<albassort> https://github.com/ba0f3/sequoia.nim
19:12:44FromDiscord<leorize> maybe, that wrapper is a little ancient
19:12:55FromDiscord<Robyn [She/Her]> Half-tempted to make a case statement macro hm
19:13:36FromDiscord<leorize> case stmt macro doesn't give you anything special
19:13:45FromDiscord<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:10FromDiscord<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:48FromDiscord<albassort> thank you for the warning before i burnt my time away
19:16:07FromDiscord<albassort> i had pc issues, had it not been for that i would have had hours of work done on the wrapper
19:17:11FromDiscord<Robyn [She/Her]> In reply to @leorize "case stmt macro doesn't": Fair enough
19:17:42FromDiscord<Robyn [She/Her]> Might just make `unpackIt` and not deal with the fuckery that is a `match` macro
19:17:47FromDiscord<Robyn [She/Her]> PRs welcome ✨
19:17:49FromDiscord<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:08FromDiscord<albassort> leorize, before i wrap sequoia
19:19:25FromDiscord<albassort> i dont actually know what to wrap lol
19:19:51FromDiscord<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:22FromDiscord<albassort> there are like no docs
19:20:37FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1245819170113851492/image.png?ex=665a2304&is=6658d184&hm=580062038dc6997ce420ffb9cad84a4e4404b23947fa677438779c883f0d4e80&
19:20:53FromDiscord<albassort> Seems like this is the same issue as gpgme
19:21:59FromDiscord<leorize> the sequoia library itself is different
19:22:24FromDiscord<leorize> and lol I just figured out what is today's design of gpgme
19:23:11FromDiscord<albassort> it runs the executable as a subprocess and communicates through ipc
19:23:13FromDiscord<albassort> ?
19:23:15FromDiscord<dddeserttt> Hey does anyone know how to use socks proxies with nim net
19:23:23FromDiscord<albassort> or does it create command line args
19:23:37FromDiscord<albassort> In reply to @dddeserttt "Hey does anyone know": yes!
19:23:44FromDiscord<leorize> it does both lmao↵(@albassort)
19:23:48FromDiscord<albassort> are you using net sockets themselves
19:24:01FromDiscord<dddeserttt> Yes
19:24:07FromDiscord<dddeserttt> I am
19:24:15FromDiscord<dddeserttt> Just the nim native Lib
19:24:27FromDiscord<albassort> you connect to the socks server then you follow the socks protocol
19:24:36FromDiscord<albassort> rfc 1999 or something
19:24:52FromDiscord<albassort> thats it
19:24:57FromDiscord<albassort> UDP binding is a little more silly and depends on the implementation but tcp sockets are simple
19:25:08FromDiscord<dddeserttt> TCP is what I’m going for
19:25:18FromDiscord<dddeserttt> Trying to send a program over the tor network
19:25:34FromDiscord<dddeserttt> Net stuff confuses me generally
19:25:39FromDiscord<albassort> you need to make sure the tor socks tunnel is on
19:25:47FromDiscord<albassort> in your tor.cfg
19:25:48FromDiscord<dddeserttt> It is
19:25:56FromDiscord<dddeserttt> I believe
19:26:01FromDiscord<dddeserttt> I have the service running
19:26:08FromDiscord<albassort> its not on by default
19:26:14FromDiscord<dddeserttt> Lemme check
19:26:34FromDiscord<albassort> make sure the socks tunnel has a port on
19:27:08FromDiscord<albassort> In reply to @leorize "it does both lmao": do you think they'll ever fix it or even give us rpc
19:27:15FromDiscord<albassort> rpc would be so fucking easy
19:28:18FromDiscord<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:31FromDiscord<dddeserttt> You know where tor config is located?
19:28:37FromDiscord<albassort> /etc/tor/
19:29:13FromDiscord<dddeserttt> Tor sets socks proxy on be deadly
19:29:15FromDiscord<dddeserttt> Default
19:29:17FromDiscord<dddeserttt> Sweet
19:29:20FromDiscord<albassort> cool
19:29:36FromDiscord<albassort> https://datatracker.ietf.org/doc/html/rfc1928
19:29:45FromDiscord<albassort> i could give you my code, but i wont lol
19:30:00FromDiscord<albassort> im sure theres a socks thing for nim
19:30:01FromDiscord<albassort> but anyway
19:30:10FromDiscord<albassort> you wanna connect to the port, usually 9100 iirc
19:30:21FromDiscord<dddeserttt> I can connect
19:30:31FromDiscord<albassort> sorry
19:30:32FromDiscord<albassort> 9050
19:30:33FromDiscord<dddeserttt> I’m confused on where I go after I connect
19:30:37FromDiscord<albassort> oh
19:30:38FromDiscord<albassort> well
19:30:48FromDiscord<albassort> you need to folllow the rfc
19:31:12FromDiscord<dddeserttt> client.connect(“localhost”, Port(9050)
19:31:27FromDiscord<dddeserttt> But how after connecting to that do I connect to a different IP
19:31:59FromDiscord<albassort> follow. the. rfc.
19:33:26FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1245822400294289539/image.png?ex=665a2606&is=6658d486&hm=4bf1997cbd2ceb126501fe146008ebbe85d6c25264c7a0abbb731ba223a30115&
19:33:28FromDiscord<albassort> https://media.discordapp.net/attachments/371759389889003532/1245822400566788136/image.png?ex=665a2606&is=6658d486&hm=aa298d4956e359295748ce1ec0b23963d0d1c7f054460f56c051670e938c372b&
19:34:03FromDiscord<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:55FromDiscord<albassort> note: idk how bind works, you wanna do connect 99.99% of times
19:39:48FromDiscord<albassort> oh god wrapping rust is gonna be hard
19:39:49FromDiscord<albassort> i barely even know any rust
19:42:01FromDiscord<albassort> oh i see
19:42:05FromDiscord<albassort> i just need to compile it to a static library and i can use importc
19:43:28FromDiscord<dddeserttt> This whole rfc thing is actually useful
19:43:39FromDiscord<dddeserttt> My teachers tried to tell me
19:43:52FromDiscord<albassort> they can be difficult and ambigous at times
19:44:01FromDiscord<albassort> because usually they come before an implementation
19:44:06FromDiscord<dddeserttt> I see
19:44:07FromDiscord<albassort> this one is a little bit bad on the UDp side
19:44:16FromDiscord<albassort> (edit) "UDp" => "UDP and the Connect"
19:44:27FromDiscord<albassort> but for your needs, its well done
19:44:42FromDiscord<albassort> usually when working with protocols, the rfc is the first place to go, then after, an implementation
19:45:11FromDiscord<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:19FromDiscord<albassort> tell your teachers i said hi
19:55:36FromDiscord<dddeserttt> Will do😭
19:58:02*def- quit (Quit: -)
20:00:25*def- joined #nim
20:02:33FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=udQFlILr
20:03:24FromDiscord<nervecenter> (edit) "https://play.nim-lang.org/#pasty=cRyQBHlw" => "https://play.nim-lang.org/#pasty=FboBxFDh"
20:03:41FromDiscord<nervecenter> I'm just trying to filter out rows that have a NaN in that column
20:25:12FromDiscord<nervecenter> Looks like it's going to need a look my the maintainers, answered in #science.
20:25:17FromDiscord<nervecenter> (edit) "my" => "by"
20:25:54*ntat quit (Quit: Leaving)
20:28:12*systemds1cks joined #nim
20:42:32FromDiscord<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:08FromDiscord<Elegantbeef> That's a shame
20:47:16FromDiscord<Robyn [She/Her]> Shouldn't be too hard
20:53:27FromDiscord<Robyn [She/Her]> Case statements can have else if branches?
20:53:31FromDiscord<Robyn [She/Her]> How does that work?
20:54:03FromDiscord<Elegantbeef> The same was as normal if elif
20:54:17FromDiscord<Elegantbeef> Turn all `of` branches into `if` then emit `elif` or `else`
20:58:36FromDiscord<Robyn [She/Her]> Oh neat
21:20:54*def- quit (Quit: -)
21:21:42*def- joined #nim
21:38:30FromDiscord<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:52FromDiscord<Robyn [She/Her]> Oh wait
21:43:18*beholders_eye quit (Read error: Connection reset by peer)
21:47:30FromDiscord<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:40FromDiscord<Robyn [She/Her]> Implicit returns don't work? 😔
21:49:17*beholders_eye joined #nim
21:58:25FromDiscord<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:34FromDiscord<shad.ow> oh i might just want boxy
22:03:00*def- joined #nim
22:03:22FromDiscord<Elegantbeef> Do all branches return a string?
22:03:23FromDiscord<Elegantbeef> Oh bridge was down for a moment
22:05:17FromDiscord<Elegantbeef> @Robyn [She/Her] your `unpackIt` does not return anything
22:05:17FromDiscord<Elegantbeef> mark it `: untyped`
22:06:23*def- quit (Client Quit)
22:06:51*systemds1cks is now known as systemdsucks
22:18:37FromDiscord<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:17FromDiscord<Robyn [She/Her]> Nice, it works!
22:27:30*pbsds3 quit (Quit: The Lounge - https://thelounge.chat)
22:29:21FromDiscord<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:00FromDiscord<Elegantbeef> `'Hint'`
22:35:06FromDiscord<Elegantbeef> It's easier to just do `{.used.}`
22:35:17FromDiscord<Elegantbeef> `var bleh {.used.} = ...` inside a genast
22:43:27FromDiscord<Robyn [She/Her]> In reply to @chronos.vitaqua "`Hint: 'it' is declared": Oh
22:44:00FromDiscord<Robyn [She/Her]> How's `genAst` different to `quote do`?
22:44:14FromDiscord<Elegantbeef> No need for acc quoting replacements
22:44:17FromDiscord<Elegantbeef> So you get in less of a mess
22:45:02FromDiscord<Elegantbeef> you also can do things like `genast(myIdent = ident"jimbo"): var myIdent = 100`
22:45:24FromDiscord<Robyn [She/Her]> Ooooh that seems useful
22:47:18FromDiscord<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:56FromDiscord<Robyn [She/Her]> Oh huh
23:08:01FromDiscord<Robyn [She/Her]> https://play.nim-lang.org/#pasty=nsmjBZAp
23:08:37FromDiscord<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:56FromDiscord<Elegantbeef> Well yea
23:09:05FromDiscord<Elegantbeef> Wait
23:09:17FromDiscord<Elegantbeef> Is that type erased into a `Result`?
23:09:25FromDiscord<Elegantbeef> Or `Error` whatever you have the silly type named
23:09:59FromDiscord<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:19FromDiscord<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:46FromDiscord<Elegantbeef> Ah you might've hit the awful Nim generic typebug
23:16:55FromDiscord<Robyn [She/Her]> Oh no ._.
23:17:22FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/issues/22479#issuecomment-1678456115
23:18:43FromDiscord<Robyn [She/Her]> I don't get the issue?
23:19:03FromDiscord<Robyn [She/Her]> Oh wait
23:19:03FromDiscord<Robyn [She/Her]> Ooh
23:19:08FromDiscord<Robyn [She/Her]> ...ugh
23:19:21FromDiscord<Robyn [She/Her]> Is there no way to work around it?
23:20:16FromDiscord<Elegantbeef> There is
23:20:25*def- quit (Quit: -)
23:20:31FromDiscord<Elegantbeef> Use the generic parameter like `_: array[0, (K, V)]`
23:21:18*def- joined #nim
23:21:38FromDiscord<Robyn [She/Her]> Huh?
23:21:51FromDiscord<Robyn [She/Her]> What do you mean?
23:22:03FromDiscord<Elegantbeef> If one uses the generic parameters inside the type definition it's not considered the same type
23:22:20FromDiscord<Elegantbeef> This might be the issue, but it might also be another issue that's unrelated
23:22:28FromDiscord<Elegantbeef> It could just be your `test` is being bound wrongly
23:22:58FromDiscord<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?