<< 22-04-2024 >>

00:17:24*Mister_Magister quit (Quit: bye)
00:20:55*krux02_ quit (Remote host closed the connection)
00:25:54FromDiscord<Robyn [She/Her]> In reply to @A2 "it's open-source, too\: https://gitlab.com/nobodywh": @nikolay_a_k take the warning at face value but maybe this project would be useful to you? It's not bindings but yeah
00:26:22FromDiscord<Robyn [She/Her]> You could look into making your own handwritten bindings ultimately
00:44:49*Mister_Magister joined #nim
01:26:23*lucas_ta joined #nim
01:29:05*lucasta quit (Ping timeout: 272 seconds)
01:55:26*xet7 joined #nim
02:47:14*xet7 quit (Remote host closed the connection)
03:20:41*def- quit (Quit: -)
03:33:44*lucas_ta quit (Quit: Leaving)
03:40:14*def- joined #nim
03:51:12*def- quit (Quit: -)
04:08:56*def- joined #nim
04:35:07*def- quit (Quit: -)
04:36:33*def- joined #nim
05:22:52*def- quit (Quit: -)
05:23:23*def- joined #nim
05:28:11*def- quit (Client Quit)
05:30:07*def- joined #nim
05:37:22FromDiscord<Phil> sent a long message, see https://pasty.ee/zfJhJypeWphz
05:38:04FromDiscord<odexine> there's a distinction on this again isnt there
05:39:55FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=hwZciSkSeeXp
05:40:35FromDiscord<odexine> id say nothing gets stored
05:40:47FromDiscord<odexine> if you want something to be stored, that would be a specialised subject
05:44:14FromDiscord<nnsee> my (absolutely unfounded in anything) logic would say that you'd just get 2
05:49:38FromDiscord<odexine> In reply to @isofruit "I mean in code": https://reactivex.io/documentation/operators/replay.html
06:00:20FromDiscord<Phil (he/him)> Oh I'm aware what you also could use for this to make it explicit, just wasn't certain in the case of observables that get created as a part of subject or pipelines
06:18:07*PMunch joined #nim
06:38:40*def- quit (Quit: -)
06:39:21*def- joined #nim
06:42:36*def- quit (Client Quit)
06:42:54*def- joined #nim
06:51:52*ntat joined #nim
06:52:51FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=aHigXTnymyiz
06:54:38FromDiscord<Elegantbeef> This is where I shill my traitor library even though it has a learning curve 😄
06:55:05FromDiscord<Elegantbeef> You can look at `std/streams` for another way to abstract things though
07:26:05*nyeaa49284230101 joined #nim
07:28:58FromDiscord<the_real_hypno> In reply to @xkonti "Hi! I'm new to": Im not sure how much you made already but as far as my own personal experience goes i can only strictly advice to NOT try to create the project like you usually would. Specifically pointing at the "Classes" part.
07:49:45*def- quit (Quit: -)
07:51:00*def- joined #nim
07:59:47FromDiscord<madonuko> I'm going to publish a package to nimble and I've generated the docs for it using `nim doc`… will it link the documentations automatically in nimble.directory?
08:00:24*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
08:00:46*SchweinDeBurg joined #nim
08:03:22*def- quit (Quit: -)
08:03:49FromDiscord<madonuko> > doc - An optional URL for humans to read the package HTML documentation↵↵nevermind found that… so I think I'll need to use github pages to host it or something
08:04:11*def- joined #nim
08:15:49FromDiscord<madonuko> https://fyralabs.github.io/sudo.nim/↵why doesn't the theme changer works
08:17:54FromDiscord<madonuko> nvm I just copied the entire dochack.js from nim-lang.org
08:18:34FromDiscord<madonuko> might be a bad idea but who cares
08:27:20PMunch@Elegantbeef, what does traitor resolve to under the hood? Like how would it differ on runtime from the approach taken in streams?
08:32:09*def- quit (Quit: -)
08:33:04PMunchIs there a way to check if a block returns something in a macro?
08:34:45PMunchAh, just getType on a typed node :P
09:03:42PMunchStumbled on one of these silly videos like "stop writing if statements like this" videos which basically just introduced the concept of guard statements. Basically instead of nesting all your logic inside if statements just use `if not <condition>: return`
09:03:51FromDiscord<ElegantBeef> Pmunch it's a fat pointer with a `ref T`
09:04:02PMunchGot me thinking, would a "guard" statement be useful? https://pasty.ee/WQvOZzcRDNaz
09:04:21PMunch@Elegantbeef, fat pointer?
09:04:47FromDiscord<ElegantBeef> The pointer procs are stored per instance instead of globally
09:05:10FromDiscord<ElegantBeef> In my testing on my hardware atleast it was faster when dispatching on multiple different kinds
09:05:47FromDiscord<ElegantBeef> Slower than some hacky shenanigans, but it works at CT and RT
09:05:58PMunchHmm, not quite sure I understand the difference
09:06:16PMunchStreams is just an object full of pointers to procedures, right?
09:06:22FromDiscord<ElegantBeef> Right
09:06:29PMunchAnd traitor is?
09:07:07FromDiscord<ElegantBeef> When you use the dynamic dispatch part a object full of pointers procedures and a reference to the heap allocated object
09:07:41*def- joined #nim
09:07:50FromDiscord<ElegantBeef> When you use the static dispatch part it's not even there 😄
09:08:10FromDiscord<ElegantBeef> I did have a global vtable at one point but the dispatch was slower so I moved to a fat pointer
09:10:36FromDiscord<ElegantBeef> The benefit of using Traitor over manually doing what std/streams does is that you can use value types and if fully static dispatch, unless you want to use runtime dispatch
09:12:28FromDiscord<Elegantbeef> Pmunch it is currently fat pointers with a `ref` object
09:13:25FromDiscord<ElegantBeef> Ah there we go matrix slow
09:13:30PMunchHaha :P
09:14:28PMunchI'm still not 100% sure I get it.. But thanks for trying to explain it
09:16:32FromDiscord<ElegantBeef> <https://github.com/beef331/traitor/blob/master/tests/tstreams.nim> <https://github.com/beef331/traitor/blob/master/traitor/streams.nim>
09:16:39FromDiscord<ElegantBeef> Compare that to the stdlib versions
09:22:08FromDiscord<ElegantBeef> No inheritance, uses bare objects, can define your own hooks. Then it generates something akin to manually writing `Streams` when you use `toTrait`
09:24:35PMunchHmm
09:26:20*def- quit (Quit: -)
09:27:04*def- joined #nim
09:27:59FromDiscord<ElegantBeef> I also realised I should've just shared <https://github.com/beef331/traitor/blob/master/traitor.nim#L112-L119> 😄
09:30:07*def- quit (Client Quit)
09:33:15*def- joined #nim
09:33:20PMunchRight, so when you convert an object to a Traitor it creates a tuple with all the procedures you can call somehow. And dispatch is then a lookup in the tuple?
09:33:48PMunchSo the actual dispatch while running is pretty similar to streams?
09:36:23PMunchIs it just me or has GDB debugging with Nim gotten completely fucked lately?
09:36:34PMunchIt seems to randomly throw me around in the codebase..
09:50:28*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
09:50:50*ehmry joined #nim
09:52:26PMunchOh fun, GitHub has broken their RST parser..
10:15:45FromDiscord<the_real_hypno> I was never able to get anything out of Debugging Nim code. No matter what additional defined I added
10:16:13FromDiscord<the_real_hypno> Also stepping into the code always throws exception not handled
10:16:34*xutaxkamay quit (Ping timeout: 256 seconds)
10:16:34*xutaxkamay_ joined #nim
10:17:23*xutaxkamay_ is now known as xutaxkamay
10:42:59FromDiscord<bandithedoge> completely unrelated but wouldn't `prefixes` in the `sudo` proc make more sense as a regex?↵(@madonuko)
10:44:56FromDiscord<madonuko> In reply to @bandithedoge "completely unrelated but wouldn't": holy
10:45:03FromDiscord<madonuko> thanks
10:45:45FromDiscord<madonuko> I mean… there are quite a few different regex libs in nim tho
10:46:23FromDiscord<madonuko> honestly might not even be a bad idea if we allow them to pass in procs
10:52:12PMunch@the_real_hypno, I mean I get it working. I'm able to navigate the code, set breakpoints, and step in and out of things. But it seems like the line numbers sometimes don't properly match
10:54:11FromDiscord<the_real_hypno> In reply to @PMunch "<@383236491452612611>, I mean I": Lucky you. I tried, VSCode with CodeLLDB, JetBrains with lldb and also GDB. I only get 2 mangled variables, am allowed to step over things and thats roughly it
11:13:14NimEventerNew Nimble package! sudo - Detect if you are running as root, restart self with sudo if needed or setup uid zero when running with the SUID flag set., see https://github.com/FyraLabs/sudo.nim
11:18:12FromDiscord<xkonti> In reply to @the_real_hypno "Im not sure how": No code yet. Will be figuring out how to make a nimble package today on the steam. Could you explain why the inheritance approach is bad in my case?
11:18:59FromDiscord<goerge_lsd> https://nim-lang.org/docs/parseutils.html#parseFloat%2CopenArray%5Bchar%5D%2Cfloat - this doesn't error if invalid float chars are present at end of string, just stops parsing there. The parsefloat from parseutils throws an exception on error and i don't want exceptions. any alternatives?
11:19:51FromDiscord<goerge_lsd> (edit) "parseutils" => "strutils"
11:20:09FromDiscord<xkonti> In reply to @Elegantbeef "This is where I": I'll definitely look at your lib. You're saying it has a learning curve, does it meant it would make it harder for others to make additional libs with their implementation of the common abstraction?
11:21:54FromDiscord<the_real_hypno> In reply to @xkonti "No code yet. Will": Its not bad in your particular case, its bad in general. Nim is not really made for complex classes. (Doesn't want to be either as far as I understood)
11:25:57FromDiscord<xkonti> In reply to @the_real_hypno "Its not bad in": Composition over inheritance 😉 my use case would be fine with an equivalent of an "interface", but I can't find anything that fits the bill. I tried playing around with "concept" but it's something more useful for making an actual implementation rather than defining an abstraction.
11:27:07FromDiscord<the_real_hypno> Composition is the keyword already. Thats what i ended up with aswell. Types having types with according fields
11:34:22FromDiscord<madonuko> In reply to @NimEventer "New Nimble package! sudo": thanks for the merge
11:38:11FromDiscord<kots> In reply to @goerge_lsd "https://nim-lang.org/docs/parseutils.html#parseFloa": check that the return value is equal to the input length?
11:38:30FromDiscord<difuse_> sent a long message, see https://pasty.ee/dZbihpfghOFG
11:42:31FromDiscord<difuse_> Also, could I make all binaries use the same GC to make sure objects would not be leaked? I read somewhere I could have a separate dll for the GC, but couldn't find much on it
12:36:26*def- quit (Quit: -)
12:54:31*def- joined #nim
13:07:32*def- quit (Quit: -)
13:07:45*def- joined #nim
13:09:54PMunchFun little snippet for other Vim users: https://pasty.ee/yMsnIaeAHBSL
13:10:18PMunchGrabs your current selection, passes it through c2nim, and replaces it with the result
13:10:33PMunchNifty if you're copying things from a C project and want to quickly convert it
13:21:47*def- quit (Quit: -)
13:22:34*def- joined #nim
13:39:32*krux02 joined #nim
13:59:38*def- quit (Quit: -)
14:00:03*def- joined #nim
14:21:15*def- quit (Quit: -)
14:24:41*def- joined #nim
14:26:58*PMunch quit (Quit: Leaving)
14:54:23*def- quit (Quit: -)
14:54:55*def- joined #nim
15:04:41FromDiscord<tab714> i don't understand something
15:04:52FromDiscord<tab714> cstring is a c type right ?
15:11:03FromDiscord<planetis_m> Yep
15:13:00FromDiscord<tab714> In reply to @planetis_m "Yep": then why csize_t defined in system while cstring defined elsewhere ??????????????????????????????
15:13:28FromDiscord<demotomohiro> `cstring` is same to `char` in C.
15:16:56FromDiscord<nervecenter> In reply to @tab714 "cstring is a c": `cstring` means "compatible string", works with C, C++, Obj-C, and JS interop. In the context of C compatibility, it translates to `char`.
15:17:26FromDiscord<nervecenter> In reply to @tab714 "then why csize_t defined": A mystery
15:18:07FromDiscord<tab714> In reply to @nervecenter "A mystery": it makes sense cstring is defined in cstrutils
15:18:13FromDiscord<tab714> that is clear and makes sense
15:18:14FromDiscord<tab714> but
15:18:20FromDiscord<tab714> csize_t
15:18:29FromDiscord<tab714> ??? really in system ??????
15:18:37FromDiscord<tab714> it is a c type
15:18:57FromDiscord<nervecenter> Given how royally you can screw yourself if you don't use it, yes it's a bit strange, but somewhat reassuring that because it's in `system` it's always in scope
15:19:38FromDiscord<nervecenter> You'd have to ask Andreas
15:19:44FromDiscord<nervecenter> Go to #internals
15:19:49FromDiscord<tab714> what confuses me more hhhhh is there is a c types package
15:20:04FromDiscord<tab714> it contains all the c types except csize_t
15:20:23FromDiscord<tab714> (edit) "what confuses me more hhhhh is ... there" added "that"
15:21:32FromDiscord<tab714> wait wait
15:21:38FromDiscord<tab714> i misunderstood
15:22:45*def- quit (Quit: -)
15:23:19*def- joined #nim
15:26:14*def- quit (Client Quit)
15:26:26*def- joined #nim
15:38:18FromDiscord<nqeron> I'm having an issue with nim not compiling for release correctly. It compiles fine in debug mode, but when I use the -d:release flag, it complains around the area of code that uses regex. Help?
15:40:05FromDiscord<solitudesf> In reply to @nqeron "I'm having an issue": show code?
15:41:47FromDiscord<nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=YHHOKhkoOaRs
15:42:11FromDiscord<solitudesf> and the error is?
15:42:46FromDiscord<nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=orluCCnOQclJ
15:44:31FromDiscord<solitudesf> compiles fine with both debug and release on my machine
15:44:46FromDiscord<solitudesf> i can see that your regex package is outdated
15:45:56FromDiscord<nqeron> What's the best way to update that in place?
15:46:04FromDiscord<nqeron> I tried using nimble update
15:46:04FromDiscord<solitudesf> `nimble install regex`
15:48:21FromDiscord<nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=TKBOhuObwdXv
15:48:32FromDiscord<nqeron> but it doesn't actually shift to using it?
15:49:01FromDiscord<solitudesf> are you sure you arent using locks or use specific version in nimble file?
15:50:47FromDiscord<the_real_hypno> In reply to @PMunch "Grabs your current selection,": Oh thats an awesome idea 🤔 should be convertible to use the clipboard instead
15:50:50FromDiscord<nqeron> I don't think so, I have some >= for some versions
15:51:33FromDiscord<solitudesf> im not sure what is happening on your setup, but you can uninstall offending package version with `nimble uninstall [email protected]`
15:52:01*def- quit (Quit: -)
15:55:23FromDiscord<pmunch> Try `rm -r ~/.nimble/pkgs`
15:55:59FromDiscord<solitudesf> In reply to @pmunch "Try `rm -r ~/.nimble/pkgs`": nah, dont do that, that will remove all binary packages, but will leave broken symlinks in path
15:56:03FromDiscord<pmunch> I've had that issue before where old packages take precedence over newer packages installed in pkgs2
15:56:13FromDiscord<solitudesf> nvm, its about pkgs
15:56:24FromDiscord<pmunch> Yeah, not the bin folder
15:56:51FromDiscord<pmunch> In reply to @the_real_hypno "Oh thats an awesome": Yeah would be pretty easy
15:58:32FromDiscord<the_real_hypno> In reply to @pmunch "Yeah would be pretty": Already thought this through a bit more, since i probably also want to alternate the switches, i maybe do a really minimalistic GUI with 2-3 checkboxes and a text box for in out
15:58:55FromDiscord<Phil> In reply to @difuse_ "Hi, I'm new to": Having a plugin system generally sounds doable.↵Trying to override a method on an object when another DLL is loaded I struggle with imagining as a concept more generally.↵I mean, even if those are methods, you'd still need to instantiate the type with those methods and then pass that one around.↵If that shoots you in the knee somewhere I can't predict, OOP tends to be that way when I try to an
15:59:33FromDiscord<Phil> (edit) "In reply to @difuse_ "Hi, I'm new to": Having" => "sent" | "plugin system generally sounds doable.↵Trying to override a method on an object when another DLL is loaded I struggle with imagining as a concept more generally.↵I mean, even if those are methods, you'd still need to instantiate the type with those methods and then pass that one around.↵If that shoots you in the knee somewhere I can't predict, OOP tends to be that
15:59:42FromDiscord<Phil> (edit) "sent" => "In reply to @difuse_ "Hi, I'm new to": Having" | "long message, see https://pasty.ee/wJYpfkBdXKLQ" => "plugin system generally sounds doable.↵Trying to override a method on an object when another DLL is loaded I struggle with imagining as a concept more generally.↵I think you'd have an easier time if you had an Object-factory and that instantiated different subtypes based on the loaded DLLs.↵If that shoots you in
16:00:41FromDiscord<Phil> In reply to @difuse_ "Also, could I make": I think you should be fine just using ORC.↵You're not going multi-threaded, so all the data should share a ref-count on the ref-type I think.
16:10:07FromDiscord<planetis_m> In reply to @tab714 "then why csize_t defined": cstring is in system too
16:10:11*def- joined #nim
16:27:42*def- quit (Quit: -)
16:27:54*def- joined #nim
16:47:38*def- quit (Quit: -)
16:48:13*def- joined #nim
16:48:48NimEventerNew Nimble package! respite - Redis protocol backed by SQLite, see https://github.com/guzba/respite
16:52:05*rockcavera joined #nim
16:54:55*def- quit (Quit: -)
16:55:33*def- joined #nim
17:01:42*xet7 joined #nim
17:08:49*def- quit (Quit: -)
17:09:02*def- joined #nim
17:13:50NimEventerNew Nimble package! well_parser - This project is intended to parse Texas Railroad Commission data provided in an unsuitable and non-transparent format. As of 2024, this code is able to parse Drilling Permit Master and Trailer and Underground Injection Control Data, see https://codeberg.org/samsamros/RRC-permits
17:28:39FromDiscord<odexine> huh
17:28:48FromDiscord<odexine> interestingly specific
17:38:40*def- quit (Quit: -)
17:40:04FromDiscord<myxi> I can't figure out if that's the production code or the obfuscated version...
17:40:07FromDiscord<myxi> image.png https://media.discordapp.net/attachments/371759389889003532/1232023137269452953/image.png?ex=6627f275&is=6626a0f5&hm=20849cd4c0ec2d72ad5cd99d97ef7f5a621290c8c5fe4b0e430cb0b8e4767354&
17:40:09*def- joined #nim
17:40:24FromDiscord<drakamo> Is there a difference between using "let" or "const" if the value being assigned is known at compile time?
17:41:07FromDiscord<Phil> strictly speaking IIRC consts get inlined
17:41:23FromDiscord<Phil> So there's not really 1 const-value, it's more of a copy-paste situation
17:41:40FromDiscord<Phil> meanwhile with let you would only have the one instance I think
17:44:25FromDiscord<the_real_hypno> In reply to @drakamo "Is there a difference": Afaik you cant use pointers to stuff[0] with const
17:44:49FromDiscord<drakamo> In reply to @the_real_hypno "Afaik you cant use": I see.
17:45:05FromDiscord<the_real_hypno> That made me cry several hours
18:23:53FromDiscord<Phil> ... I have arrived that my plan of "Observables" having parents is doomed to fail
18:24:09FromDiscord<Phil> And that I want Observables, Subjects and "IntermittentObservables" which is the kind of stuff that map etc. will output in the future
18:24:21FromDiscord<Phil> (edit) ""IntermittentObservables"" => ""InferredObservables""
18:24:36FromDiscord<Phil> Now to figure out how those would look like...
18:58:09*ntat quit (Quit: Leaving)
19:12:57FromDiscord<Phil> How in the everloving... how does this even blow up inside a generic?↵` let x = InferredObservable[T, R]()`↵`Error: invalid type: 'Observable[system.int] or Subject[system.int]' in this context: 'InferredObservable[system.int, system.int]' for let`
19:15:03FromDiscord<Phil> This is the 4th approach along language boundaries and somehow the compiler manages to screw me again, I don't know what kind of human sacrifice it requires to actually even fix this
19:17:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=VaPmoFogNoby
19:18:05FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=cWzeUBqMrXhs
19:18:52FromDiscord<Phil> Full code for anyone curious: https://media.discordapp.net/attachments/371759389889003532/1232047993855803515/message.txt?ex=6628099c&is=6626b81c&hm=30ce750ec8a85d2b1a9c76e0dcbab6d286c1343f7e9752bc710c1af8ebb4ff53&
19:32:28FromDiscord<polylokh_39446> map's return type is `Observable[T]`, but you return `newObservable` which is initialized from `Observable[R]()`. Is that right?
19:33:24FromDiscord<difuse_> In reply to @isofruit "Having a plugin system": The object-factory was roughly what I wanted, my concern was if it was allowed to used a Nim subtype created in a different dll, and if its overrided functions would work properly because of it. But maybe I can find some other way besides function overloading if it does not work. I will explore how ORC works as well, thanks for the input!
19:33:59FromDiscord<Phil> In reply to @difuse_ "The object-factory was roughly": The recent discussion in #internals may be of interest to you
19:35:25FromDiscord<Robyn [She/Her]> The langserver is a pain in the ass
19:37:11FromDiscord<pmunch> In reply to @the_real_hypno "Already thought this through": A GUI? For Vim? Heresy!
19:37:22FromDiscord<the_real_hypno> What? No ...
19:37:27FromDiscord<the_real_hypno> i dont use Nim
19:37:32FromDiscord<the_real_hypno> (edit) "i dont use Nim ... " added "Vim lol"
19:38:11FromDiscord<the_real_hypno> Vim is like having a Arch Linux floppy lying around
19:39:21FromDiscord<pmunch> Pfft, I've been using it as my main editor for my entire professional career
19:39:38FromDiscord<pmunch> Granted I also use Arch..
19:41:02FromDiscord<nnsee> as an arch and vim user... i feel called out
19:45:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=BACpDDKbYoqG
19:46:26FromDiscord<Phil> WIth the `let x ` statement being superfluous but that's more to show that the mere instantiation is somehow messed up
19:47:26FromDiscord<Phil> As for why that leads to bad outcomes I have no idea, it make absolutely no sense and the compiler warning is just about useless
19:47:47FromDiscord<polylokh_39446> does | work at all in fields?
19:47:53FromDiscord<Phil> (edit) "warning" => "error"
19:49:11FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=UakWrnTsBnIR
19:49:45FromDiscord<polylokh_39446> I get invalid type errors without the generic and with `parent: Thing` and similar
19:51:19FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=WMSnNEhRTkqJ
19:51:20FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=nDVabVYjHgvl
19:51:27FromDiscord<polylokh_39446> (edit) "https://play.nim-lang.org/#pasty=OnAnxsXrpNOl" => "https://play.nim-lang.org/#pasty=RlMjSnMKwVtJ"
19:51:51FromDiscord<Phil> T is the value inside the container that is subject/observable
19:52:04FromDiscord<Phil> Therefore you can't infer whether sth is an observable or a subject based on T
19:53:02FromDiscord<polylokh_39446> I think you need a single type then for subject/observable, and distinguish them at runtime, but it sounds like you already into other problems with discriminated unions.
19:54:22FromDiscord<Phil> So basically I can't work with a generic over subject/observable
19:54:26FromDiscord<Phil> I need to type everything out
19:54:26FromDiscord<Phil> Fully
19:54:38FromDiscord<Phil> This legitimately makes me hate a language, what even is this
19:55:40FromDiscord<Phil> Which can't possibly work, I'm not about to write a map function for every possible Subject + Observable, that would be insane
19:56:50FromDiscord<gruo> why does nimsuggest turn my computer into a heater
19:57:05FromDiscord<gruo> its using 100% of my CPU
19:57:21FromDiscord<Phil> Maybe I can get around this if I don't include a reference to the parent but instead closures
19:57:28FromDiscord<Phil> That capture the parent and don't take parameters
19:57:45FromDiscord<luckayla> my computer is a heater that just happens to run nimsuggest
19:57:50FromDiscord<luckayla> x3d and RTX 3000 series x.x
19:58:02FromDiscord<luckayla> I literally have to use an air conditoner during winter
19:58:49FromDiscord<gruo> i think something just spawns like a billion instances
19:58:57FromDiscord<gruo> and im not sure what or why
20:00:11FromDiscord<Phil> Nope, can't do it, I run into circular dependency issues
20:00:23FromDiscord<Phil> maybe rxnim in an efficient manner is just conceptually impossible
20:01:45FromDiscord<grumblygibson> sent a code paste, see https://play.nim-lang.org/#pasty=hyFBxFxjqDmw
20:01:55FromDiscord<grumblygibson> (edit) "https://play.nim-lang.org/#pasty=UbeJgHJlwaNT" => "https://play.nim-lang.org/#pasty=PfZgqyocUGZs"
20:02:23FromDiscord<grumblygibson> (edit) "https://play.nim-lang.org/#pasty=fhFomQUOEoAi" => "https://play.nim-lang.org/#pasty=kUEPradFrEeA"
20:03:05FromDiscord<grumblygibson> I'll ignore the warning, but was hoping I could resolve it.
20:05:32FromDiscord<grumblygibson> maybe it it has to do with the fact that my channels exist as globals so the ctrlchandler can try to quit them. So the channels go out of scope only at end of program.
20:09:22FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=LulUCYULDoCL
20:10:20FromDiscord<polylokh_39446> you might catch that and either handle it or re-raise it as a `Defect` so that your program terminates with a backtrace.
20:12:52FromDiscord<nervecenter> In reply to @gruo "and im not sure": Known issue with the VSCode plugins and nimsuggest, it spawns a million instances and chews up all CPU and memory. Right now there just isn't a good LSP and plugin pairing. I think it's actively discussed in #tooling .
20:12:58FromDiscord<vindaar> @Phil embrace variant objects https://media.discordapp.net/attachments/371759389889003532/1232061605525852190/ph.nim?ex=66281649&is=6626c4c9&hm=847a8e7d9fb0537c54b6be43e5fd8bea7cb6bbcf44ac5d66efe3dffe626121ca&
20:13:40FromDiscord<vindaar> (I don't actually much understand about the code 🤭)
20:14:04FromDiscord<Phil> So attempt number 5, electric boogaloo - instead of generics use object variants
20:14:18FromDiscord<vindaar> mix and match 😎
20:14:46FromDiscord<Phil> I got violent urges towards the compiler with how much I am forced to play around the language at the moment I'll admit
20:15:53FromDiscord<vindaar> the more experienced one is in Nim, the closer ~~one flies to the sun~~ one gets to the rough edges of our beauty
20:15:56FromDiscord<polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=OOhuTeuBKcoj
20:16:02FromDiscord<pmunch> In reply to @gruo "i think something just": It could just be a bug, nimsuggest is known to sometimes run into a busy loop
20:16:43FromDiscord<polylokh_39446> the raises: isn't necessary there, it'll just alert you to any unhandled exceptions.
20:27:54FromDiscord<Phil> In reply to @vindaar "<@180601887916163073> embrace variant objects": Legitimately, the variant object approach might just have saved the project
20:28:07FromDiscord<Elegantbeef> Simple is always better
20:28:13FromDiscord<Phil> Still more type work than I desire but it gets me past the problem
20:28:22FromDiscord<Phil> In reply to @Elegantbeef "Simple is always better": Simple would be simply the concept approach working
20:28:46FromDiscord<Elegantbeef> You want runtime concepts no?
20:28:50FromDiscord<Elegantbeef> Those are not simple
20:29:22FromDiscord<vindaar> In reply to @isofruit "Legitimately, the variant object": hope it works! But yeah, variant objects are pretty useful, but do produce a bit of boilerplate
20:29:41FromDiscord<Elegantbeef> Just use fungus and sweep it under the rug
20:31:41FromDiscord<vindaar> are you kidding or is that another one of your 5B different macro related libraries? 🤣
20:31:48FromDiscord<Elegantbeef> That is
20:31:55FromDiscord<Elegantbeef> https://github.com/beef331/fungus
20:32:05FromDiscord<Elegantbeef> Though I think metagn has a better version inside skinsuit
20:32:22FromDiscord<Elegantbeef> https://github.com/metagn/skinsuit
20:34:21FromDiscord<Elegantbeef> The sad thing about all my macros is that I mostly just make them for shits and giggles
20:34:25FromDiscord<vindaar> neat, thanks!
20:34:35FromDiscord<Elegantbeef> Though in this case I'm actually using my traitor stuff for my present project
20:35:39FromDiscord<bosinski2023> In reply to @Elegantbeef "The sad thing about": nope, oopsie is great and micros, too
20:35:39FromDiscord<vindaar> Me I usually try to avoid external libs for small stuff (for multiple reasons, also just not being super familiar). And for more serious stuff, I feel like it's not worth it
20:36:19FromDiscord<vindaar> so usually I end up writing random macro code for each project as I need it. Today I wrote (probaly
20:36:47FromDiscord<Elegantbeef> Yea I don't like repeating myself and mostly write libraries like this cause my brain gets a tickle and goes to town
20:37:31FromDiscord<grumblygibson> In reply to @polylokh_39446 "the raises: isn't necessary": So if I understand right, then with channels I'll always get this warning if I send a datatype without a destructor, such as an int or an enum. However, I can box that in an object with a proper destructor and then all is fine.
20:37:32FromDiscord<vindaar> probably yet another) loop fusion macro for a port of llm.c to nim 😅 In that case, because OpenMP's `collapse` doesn't seem very compatible with Nim
20:46:11FromDiscord<grumblygibson> In reply to @grumblygibson "So if I understand": No I don't understand how isolate is used with channels. I can send primitive datatypes just fine without issue in small examples. Will read up on how isolate is invoked in the threading lib.
20:47:11FromDiscord<Phil> Nope, still hitting the wall
20:47:37FromDiscord<Phil> In this case I'm hitting recursive type with multiple generics leading to infinite generics problems
20:48:56FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=umPogtffHCXQ
20:49:55FromDiscord<Phil> Still got further than ever before but now I'm hitting the brick wall of wanting to recursively traverse up my chain of Observables to the "source" and trigger "next" events on there but only for the observables that are part of the chain
20:52:39FromDiscord<vindaar> why would you have a type that contains itself (using generics) though? Or what does that actually look like in your code?
20:53:35FromDiscord<bosinski2023> @vindaar hi, may i ask why your json-schema-validator is not on nimble - it looks pretty nice ?
20:53:38FromDiscord<Phil> In reply to @vindaar "why would you have": They form a chain in a sense. Each instance represents a step in an operation with a reference to the previous "operation" obejct.
20:54:21FromDiscord<Phil> You can "subscribe" to every individual step to see what its values are after that step and every time any of the previous steps produce a new value because a new value gets pumped into this chain it gets forwarded to the next step of the operation
20:54:36FromDiscord<vindaar> In reply to @bosinski2023 "<@150345911057252352> hi, may i": I never fully finished it. I can push it to nimble though, if you think it's useful. I wrote it for a toy (https://github.com/Vindaar/MetaPlot) that never really went anywhere.
20:56:59FromDiscord<bosinski2023> In reply to @vindaar "I never fully finished": ic, i'll try it out and report back. Since it passes the schema-test-suite, i guess its pretty much what i need. Maybe i can add the loading of $ref-stuff..
20:57:08FromDiscord<grumblygibson> Seems nutty to me that `isolate` complains about primitive datatypes. Is there a logical foundation for this behavior?
20:57:31FromDiscord<Elegantbeef> Yea the hooks are wrong
20:57:42FromDiscord<vindaar> In reply to @isofruit "They form a chain": hmm. And it needs to be a) fully generic (no restrictions) b) have type X contain X and thus cannot have a 'parent' type to get away from the infinite recursion somehow?
20:58:00FromDiscord<vindaar> In reply to @bosinski2023 "ic, i'll try it": yep, please feel free (to try it and also to help out fixing it up!)
20:58:50FromDiscord<Phil> In reply to @vindaar "hmm. And it needs": You can have "finishing" parent-types, the problem is you need to somehow be able to figure out through what chain of operations you get from "source" to your operation
20:59:36FromDiscord<vindaar> I see. Hard for me to wrap my head around enough to provid solid advice :/
20:59:43FromDiscord<vindaar> (edit) "provid" => "provide"
20:59:54FromDiscord<Phil> Ugh, I'm going to sleep. There very much is no easy answer for this and maybe I should just give up on it. Maybe I get a propper solution, I dunno
21:00:14FromDiscord<Phil> What I wanted to do was be able to "lazily" append operations to that chain
21:01:13FromDiscord<Phil> Currently each operation, when it gets attached to that "chain", in certain circumstances fetches itself a copy of the available data from the previous operation and transforms it according to whatever transformation proc is stored inside of it
21:01:27FromDiscord<Phil> Which means you get a ton of data duplication
21:02:01FromDiscord<Robyn [She/Her]> I genuinely can't tolerate getting 101 errors from fucking lang server
21:02:24FromDiscord<Phil> The intended way you would just go through the parent and say "Ey, push all your data one by one through this operation, which in turn should push its results through this next operation etc. all the way until you arrive at me"
21:02:24FromDiscord<Elegantbeef> Turn off the tooling and write code like it's 1902
21:02:38FromDiscord<Phil> "And then I emit the final result"
21:03:26FromDiscord<Phil> (edit) "me"" => "me, the final child where somebody is subscribing to the values""
21:03:43FromDiscord<vindaar> In reply to @isofruit "Ugh, I'm going to": yeah, I'm going to do that soon too. Generally, are you aware of how you would write the same code if it didn't have to be generic? i.e. only for integers or something? Maybe writing a proof of concept that works correctly for a restricted subset makes it easier to reason about a way to extend it into the generic direction?
21:05:05FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "*Turn off the tooling": I really find it convinient though sigh
21:05:09FromDiscord<Elegantbeef> Is this about taking an operation putting it through multiple different type consumer/emiters and emitting a reult?
21:07:33FromDiscord<Phil> Its a chain of things being both consumers and emitters (emitting every time they consume sth. where they emit the transformation) that start at something that only emits (a Subject/Observable) and ends in something that only consumes (Subscription)
21:08:30FromDiscord<Phil> And I'm at the "consumes" endpoint and want all values from source to get pushed through the individual chains between source and end-consumer. But only those chains, none of the other consumers that might be branching of somewhere should be activated
21:11:45*krux02_ joined #nim
21:13:50FromDiscord<bosinski2023> In reply to @isofruit "And I'm at the": this sounds like a 'privileged' operation from source to the end-consumer ? So that 'the others consumers', which are not on the privileged path, should stay-put and will be served later on ?
21:14:05FromDiscord<Elegantbeef> Hmph I don't quite understand how it should look
21:14:53*krux02 quit (Ping timeout: 268 seconds)
21:18:14FromDiscord<Phil> In reply to @bosinski2023 "this sounds like a": Kind of?↵There's like 2 scenarios:↵1) Somebody pushes a new value into the "source". That should forward data to everybody↵2) A new end-consumer gets attached somewhere. That should forward data from the source through all the chains to only that end-consumer.
21:18:35FromDiscord<Phil> Modelling one was the thing I did first, modelling two is what I wanted a reference to the parent for
21:25:37FromDiscord<Phil> I guess the chain of operations kind of is like an acyclic unidirectional graph?
21:25:47FromDiscord<Phil> Starts at source and ends in various subscriptions
21:25:58FromDiscord<bosinski2023> sent a long message, see https://pasty.ee/CsyWWAykhSsP
21:26:44FromDiscord<bosinski2023> (edit) "https://pasty.ee/AbrkXIJYbuSK" => "https://pasty.ee/jZXmYMMXPsbf"
21:26:51FromDiscord<Phil> Yeah, though I would assume this to be rather doable because RXJS somehow manages it
21:28:40FromDiscord<bosinski2023> In reply to @isofruit "Yeah, though I would": i'd say this is a graph-problem and you need to model "paths" and "events" in case nodes in the graph-hierachy need to be able to communicate and exchange data.
21:29:16FromDiscord<bosinski2023> (edit) "data." => "data, but have no direct connection. Or you need a broker.."
21:40:45FromDiscord<bosinski2023> sent a long message, see https://pasty.ee/fBJwYQjlImui
22:08:15*KhazAkar quit (Ping timeout: 245 seconds)
22:08:56FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=PDlxGyhpfHQZ
22:10:29*KhazAkar joined #nim
22:14:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=LjrCrHWAGJHg
22:14:21FromDiscord<Robyn [She/Her]> In reply to @threefour "I'm wanting to make": I'd imagine a template would work here... Probably
22:14:46FromDiscord<Elegantbeef> It would indeed robyn 😛
22:14:47FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=CDZGVNdMZrcf
22:15:24FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=ATsLLQhYZJzX
22:15:27FromDiscord<Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=cfgsCejZOQnB" => "https://play.nim-lang.org/#pasty=JOPrjXhmlziC"
22:18:34FromDiscord<threefour> sent a code paste, see https://play.nim-lang.org/#pasty=HpdtWJFthExY
23:30:33*KhazAkar quit (Read error: Connection reset by peer)
23:31:18*KhazAkar joined #nim
23:32:54*def- quit (Quit: -)
23:33:19*def- joined #nim
23:38:56*def- quit (Quit: -)
23:40:30*def- joined #nim
23:48:45*def- quit (Quit: -)
23:49:09*def- joined #nim
23:53:13FromDiscord<the_real_hypno> Copilot knows 😮
23:53:14FromDiscord<the_real_hypno> https://media.discordapp.net/attachments/371759389889003532/1232117039397601321/image.png?ex=662849e9&is=6626f869&hm=992b01305f71eb244a292359cc985b0239198646d34c9ff724503d5c57a04175&
23:54:49FromDiscord<the_real_hypno> Andreas is not my name btw 😄