00:17:24 | * | Mister_Magister quit (Quit: bye) |
00:20:55 | * | krux02_ quit (Remote host closed the connection) |
00:25:54 | FromDiscord | <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:22 | FromDiscord | <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:22 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/zfJhJypeWphz |
05:38:04 | FromDiscord | <odexine> there's a distinction on this again isnt there |
05:39:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=hwZciSkSeeXp |
05:40:35 | FromDiscord | <odexine> id say nothing gets stored |
05:40:47 | FromDiscord | <odexine> if you want something to be stored, that would be a specialised subject |
05:44:14 | FromDiscord | <nnsee> my (absolutely unfounded in anything) logic would say that you'd just get 2 |
05:49:38 | FromDiscord | <odexine> In reply to @isofruit "I mean in code": https://reactivex.io/documentation/operators/replay.html |
06:00:20 | FromDiscord | <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:51 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=aHigXTnymyiz |
06:54:38 | FromDiscord | <Elegantbeef> This is where I shill my traitor library even though it has a learning curve 😄 |
06:55:05 | FromDiscord | <Elegantbeef> You can look at `std/streams` for another way to abstract things though |
07:26:05 | * | nyeaa49284230101 joined #nim |
07:28:58 | FromDiscord | <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:47 | FromDiscord | <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:49 | FromDiscord | <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:49 | FromDiscord | <madonuko> https://fyralabs.github.io/sudo.nim/↵why doesn't the theme changer works |
08:17:54 | FromDiscord | <madonuko> nvm I just copied the entire dochack.js from nim-lang.org |
08:18:34 | FromDiscord | <madonuko> might be a bad idea but who cares |
08:27:20 | PMunch | @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:04 | PMunch | Is there a way to check if a block returns something in a macro? |
08:34:45 | PMunch | Ah, just getType on a typed node :P |
09:03:42 | PMunch | Stumbled 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:51 | FromDiscord | <ElegantBeef> Pmunch it's a fat pointer with a `ref T` |
09:04:02 | PMunch | Got me thinking, would a "guard" statement be useful? https://pasty.ee/WQvOZzcRDNaz |
09:04:21 | PMunch | @Elegantbeef, fat pointer? |
09:04:47 | FromDiscord | <ElegantBeef> The pointer procs are stored per instance instead of globally |
09:05:10 | FromDiscord | <ElegantBeef> In my testing on my hardware atleast it was faster when dispatching on multiple different kinds |
09:05:47 | FromDiscord | <ElegantBeef> Slower than some hacky shenanigans, but it works at CT and RT |
09:05:58 | PMunch | Hmm, not quite sure I understand the difference |
09:06:16 | PMunch | Streams is just an object full of pointers to procedures, right? |
09:06:22 | FromDiscord | <ElegantBeef> Right |
09:06:29 | PMunch | And traitor is? |
09:07:07 | FromDiscord | <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:50 | FromDiscord | <ElegantBeef> When you use the static dispatch part it's not even there 😄 |
09:08:10 | FromDiscord | <ElegantBeef> I did have a global vtable at one point but the dispatch was slower so I moved to a fat pointer |
09:10:36 | FromDiscord | <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:28 | FromDiscord | <Elegantbeef> Pmunch it is currently fat pointers with a `ref` object |
09:13:25 | FromDiscord | <ElegantBeef> Ah there we go matrix slow |
09:13:30 | PMunch | Haha :P |
09:14:28 | PMunch | I'm still not 100% sure I get it.. But thanks for trying to explain it |
09:16:32 | FromDiscord | <ElegantBeef> <https://github.com/beef331/traitor/blob/master/tests/tstreams.nim> <https://github.com/beef331/traitor/blob/master/traitor/streams.nim> |
09:16:39 | FromDiscord | <ElegantBeef> Compare that to the stdlib versions |
09:22:08 | FromDiscord | <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:35 | PMunch | Hmm |
09:26:20 | * | def- quit (Quit: -) |
09:27:04 | * | def- joined #nim |
09:27:59 | FromDiscord | <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:20 | PMunch | Right, 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:48 | PMunch | So the actual dispatch while running is pretty similar to streams? |
09:36:23 | PMunch | Is it just me or has GDB debugging with Nim gotten completely fucked lately? |
09:36:34 | PMunch | It 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:26 | PMunch | Oh fun, GitHub has broken their RST parser.. |
10:15:45 | FromDiscord | <the_real_hypno> I was never able to get anything out of Debugging Nim code. No matter what additional defined I added |
10:16:13 | FromDiscord | <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:59 | FromDiscord | <bandithedoge> completely unrelated but wouldn't `prefixes` in the `sudo` proc make more sense as a regex?↵(@madonuko) |
10:44:56 | FromDiscord | <madonuko> In reply to @bandithedoge "completely unrelated but wouldn't": holy |
10:45:03 | FromDiscord | <madonuko> thanks |
10:45:45 | FromDiscord | <madonuko> I mean… there are quite a few different regex libs in nim tho |
10:46:23 | FromDiscord | <madonuko> honestly might not even be a bad idea if we allow them to pass in procs |
10:52:12 | PMunch | @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:11 | FromDiscord | <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:14 | NimEventer | New 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:12 | FromDiscord | <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:59 | FromDiscord | <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:51 | FromDiscord | <goerge_lsd> (edit) "parseutils" => "strutils" |
11:20:09 | FromDiscord | <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:54 | FromDiscord | <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:57 | FromDiscord | <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:07 | FromDiscord | <the_real_hypno> Composition is the keyword already. Thats what i ended up with aswell. Types having types with according fields |
11:34:22 | FromDiscord | <madonuko> In reply to @NimEventer "New Nimble package! sudo": thanks for the merge |
11:38:11 | FromDiscord | <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:30 | FromDiscord | <difuse_> sent a long message, see https://pasty.ee/dZbihpfghOFG |
11:42:31 | FromDiscord | <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:54 | PMunch | Fun little snippet for other Vim users: https://pasty.ee/yMsnIaeAHBSL |
13:10:18 | PMunch | Grabs your current selection, passes it through c2nim, and replaces it with the result |
13:10:33 | PMunch | Nifty 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:41 | FromDiscord | <tab714> i don't understand something |
15:04:52 | FromDiscord | <tab714> cstring is a c type right ? |
15:11:03 | FromDiscord | <planetis_m> Yep |
15:13:00 | FromDiscord | <tab714> In reply to @planetis_m "Yep": then why csize_t defined in system while cstring defined elsewhere ?????????????????????????????? |
15:13:28 | FromDiscord | <demotomohiro> `cstring` is same to `char` in C. |
15:16:56 | FromDiscord | <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:26 | FromDiscord | <nervecenter> In reply to @tab714 "then why csize_t defined": A mystery |
15:18:07 | FromDiscord | <tab714> In reply to @nervecenter "A mystery": it makes sense cstring is defined in cstrutils |
15:18:13 | FromDiscord | <tab714> that is clear and makes sense |
15:18:14 | FromDiscord | <tab714> but |
15:18:20 | FromDiscord | <tab714> csize_t |
15:18:29 | FromDiscord | <tab714> ??? really in system ?????? |
15:18:37 | FromDiscord | <tab714> it is a c type |
15:18:57 | FromDiscord | <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:38 | FromDiscord | <nervecenter> You'd have to ask Andreas |
15:19:44 | FromDiscord | <nervecenter> Go to #internals |
15:19:49 | FromDiscord | <tab714> what confuses me more hhhhh is there is a c types package |
15:20:04 | FromDiscord | <tab714> it contains all the c types except csize_t |
15:20:23 | FromDiscord | <tab714> (edit) "what confuses me more hhhhh is ... there" added "that" |
15:21:32 | FromDiscord | <tab714> wait wait |
15:21:38 | FromDiscord | <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:18 | FromDiscord | <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:05 | FromDiscord | <solitudesf> In reply to @nqeron "I'm having an issue": show code? |
15:41:47 | FromDiscord | <nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=YHHOKhkoOaRs |
15:42:11 | FromDiscord | <solitudesf> and the error is? |
15:42:46 | FromDiscord | <nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=orluCCnOQclJ |
15:44:31 | FromDiscord | <solitudesf> compiles fine with both debug and release on my machine |
15:44:46 | FromDiscord | <solitudesf> i can see that your regex package is outdated |
15:45:56 | FromDiscord | <nqeron> What's the best way to update that in place? |
15:46:04 | FromDiscord | <nqeron> I tried using nimble update |
15:46:04 | FromDiscord | <solitudesf> `nimble install regex` |
15:48:21 | FromDiscord | <nqeron> sent a code paste, see https://play.nim-lang.org/#pasty=TKBOhuObwdXv |
15:48:32 | FromDiscord | <nqeron> but it doesn't actually shift to using it? |
15:49:01 | FromDiscord | <solitudesf> are you sure you arent using locks or use specific version in nimble file? |
15:50:47 | FromDiscord | <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:50 | FromDiscord | <nqeron> I don't think so, I have some >= for some versions |
15:51:33 | FromDiscord | <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:23 | FromDiscord | <pmunch> Try `rm -r ~/.nimble/pkgs` |
15:55:59 | FromDiscord | <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:03 | FromDiscord | <pmunch> I've had that issue before where old packages take precedence over newer packages installed in pkgs2 |
15:56:13 | FromDiscord | <solitudesf> nvm, its about pkgs |
15:56:24 | FromDiscord | <pmunch> Yeah, not the bin folder |
15:56:51 | FromDiscord | <pmunch> In reply to @the_real_hypno "Oh thats an awesome": Yeah would be pretty easy |
15:58:32 | FromDiscord | <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:55 | FromDiscord | <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:33 | FromDiscord | <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:42 | FromDiscord | <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:41 | FromDiscord | <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:07 | FromDiscord | <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:48 | NimEventer | New 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:50 | NimEventer | New 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:39 | FromDiscord | <odexine> huh |
17:28:48 | FromDiscord | <odexine> interestingly specific |
17:38:40 | * | def- quit (Quit: -) |
17:40:04 | FromDiscord | <myxi> I can't figure out if that's the production code or the obfuscated version... |
17:40:07 | FromDiscord | <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:24 | FromDiscord | <drakamo> Is there a difference between using "let" or "const" if the value being assigned is known at compile time? |
17:41:07 | FromDiscord | <Phil> strictly speaking IIRC consts get inlined |
17:41:23 | FromDiscord | <Phil> So there's not really 1 const-value, it's more of a copy-paste situation |
17:41:40 | FromDiscord | <Phil> meanwhile with let you would only have the one instance I think |
17:44:25 | FromDiscord | <the_real_hypno> In reply to @drakamo "Is there a difference": Afaik you cant use pointers to stuff[0] with const |
17:44:49 | FromDiscord | <drakamo> In reply to @the_real_hypno "Afaik you cant use": I see. |
17:45:05 | FromDiscord | <the_real_hypno> That made me cry several hours |
18:23:53 | FromDiscord | <Phil> ... I have arrived that my plan of "Observables" having parents is doomed to fail |
18:24:09 | FromDiscord | <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:21 | FromDiscord | <Phil> (edit) ""IntermittentObservables"" => ""InferredObservables"" |
18:24:36 | FromDiscord | <Phil> Now to figure out how those would look like... |
18:58:09 | * | ntat quit (Quit: Leaving) |
19:12:57 | FromDiscord | <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:03 | FromDiscord | <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:01 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=VaPmoFogNoby |
19:18:05 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=cWzeUBqMrXhs |
19:18:52 | FromDiscord | <Phil> Full code for anyone curious: https://media.discordapp.net/attachments/371759389889003532/1232047993855803515/message.txt?ex=6628099c&is=6626b81c&hm=30ce750ec8a85d2b1a9c76e0dcbab6d286c1343f7e9752bc710c1af8ebb4ff53& |
19:32:28 | FromDiscord | <polylokh_39446> map's return type is `Observable[T]`, but you return `newObservable` which is initialized from `Observable[R]()`. Is that right? |
19:33:24 | FromDiscord | <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:59 | FromDiscord | <Phil> In reply to @difuse_ "The object-factory was roughly": The recent discussion in #internals may be of interest to you |
19:35:25 | FromDiscord | <Robyn [She/Her]> The langserver is a pain in the ass |
19:37:11 | FromDiscord | <pmunch> In reply to @the_real_hypno "Already thought this through": A GUI? For Vim? Heresy! |
19:37:22 | FromDiscord | <the_real_hypno> What? No ... |
19:37:27 | FromDiscord | <the_real_hypno> i dont use Nim |
19:37:32 | FromDiscord | <the_real_hypno> (edit) "i dont use Nim ... " added "Vim lol" |
19:38:11 | FromDiscord | <the_real_hypno> Vim is like having a Arch Linux floppy lying around |
19:39:21 | FromDiscord | <pmunch> Pfft, I've been using it as my main editor for my entire professional career |
19:39:38 | FromDiscord | <pmunch> Granted I also use Arch.. |
19:41:02 | FromDiscord | <nnsee> as an arch and vim user... i feel called out |
19:45:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=BACpDDKbYoqG |
19:46:26 | FromDiscord | <Phil> WIth the `let x ` statement being superfluous but that's more to show that the mere instantiation is somehow messed up |
19:47:26 | FromDiscord | <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:47 | FromDiscord | <polylokh_39446> does | work at all in fields? |
19:47:53 | FromDiscord | <Phil> (edit) "warning" => "error" |
19:49:11 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=UakWrnTsBnIR |
19:49:45 | FromDiscord | <polylokh_39446> I get invalid type errors without the generic and with `parent: Thing` and similar |
19:51:19 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=WMSnNEhRTkqJ |
19:51:20 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=nDVabVYjHgvl |
19:51:27 | FromDiscord | <polylokh_39446> (edit) "https://play.nim-lang.org/#pasty=OnAnxsXrpNOl" => "https://play.nim-lang.org/#pasty=RlMjSnMKwVtJ" |
19:51:51 | FromDiscord | <Phil> T is the value inside the container that is subject/observable |
19:52:04 | FromDiscord | <Phil> Therefore you can't infer whether sth is an observable or a subject based on T |
19:53:02 | FromDiscord | <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:22 | FromDiscord | <Phil> So basically I can't work with a generic over subject/observable |
19:54:26 | FromDiscord | <Phil> I need to type everything out |
19:54:26 | FromDiscord | <Phil> Fully |
19:54:38 | FromDiscord | <Phil> This legitimately makes me hate a language, what even is this |
19:55:40 | FromDiscord | <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:50 | FromDiscord | <gruo> why does nimsuggest turn my computer into a heater |
19:57:05 | FromDiscord | <gruo> its using 100% of my CPU |
19:57:21 | FromDiscord | <Phil> Maybe I can get around this if I don't include a reference to the parent but instead closures |
19:57:28 | FromDiscord | <Phil> That capture the parent and don't take parameters |
19:57:45 | FromDiscord | <luckayla> my computer is a heater that just happens to run nimsuggest |
19:57:50 | FromDiscord | <luckayla> x3d and RTX 3000 series x.x |
19:58:02 | FromDiscord | <luckayla> I literally have to use an air conditoner during winter |
19:58:49 | FromDiscord | <gruo> i think something just spawns like a billion instances |
19:58:57 | FromDiscord | <gruo> and im not sure what or why |
20:00:11 | FromDiscord | <Phil> Nope, can't do it, I run into circular dependency issues |
20:00:23 | FromDiscord | <Phil> maybe rxnim in an efficient manner is just conceptually impossible |
20:01:45 | FromDiscord | <grumblygibson> sent a code paste, see https://play.nim-lang.org/#pasty=hyFBxFxjqDmw |
20:01:55 | FromDiscord | <grumblygibson> (edit) "https://play.nim-lang.org/#pasty=UbeJgHJlwaNT" => "https://play.nim-lang.org/#pasty=PfZgqyocUGZs" |
20:02:23 | FromDiscord | <grumblygibson> (edit) "https://play.nim-lang.org/#pasty=fhFomQUOEoAi" => "https://play.nim-lang.org/#pasty=kUEPradFrEeA" |
20:03:05 | FromDiscord | <grumblygibson> I'll ignore the warning, but was hoping I could resolve it. |
20:05:32 | FromDiscord | <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:22 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=LulUCYULDoCL |
20:10:20 | FromDiscord | <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:52 | FromDiscord | <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:58 | FromDiscord | <vindaar> @Phil embrace variant objects https://media.discordapp.net/attachments/371759389889003532/1232061605525852190/ph.nim?ex=66281649&is=6626c4c9&hm=847a8e7d9fb0537c54b6be43e5fd8bea7cb6bbcf44ac5d66efe3dffe626121ca& |
20:13:40 | FromDiscord | <vindaar> (I don't actually much understand about the code ðŸ¤) |
20:14:04 | FromDiscord | <Phil> So attempt number 5, electric boogaloo - instead of generics use object variants |
20:14:18 | FromDiscord | <vindaar> mix and match 😎 |
20:14:46 | FromDiscord | <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:53 | FromDiscord | <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:56 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=OOhuTeuBKcoj |
20:16:02 | FromDiscord | <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:43 | FromDiscord | <polylokh_39446> the raises: isn't necessary there, it'll just alert you to any unhandled exceptions. |
20:27:54 | FromDiscord | <Phil> In reply to @vindaar "<@180601887916163073> embrace variant objects": Legitimately, the variant object approach might just have saved the project |
20:28:07 | FromDiscord | <Elegantbeef> Simple is always better |
20:28:13 | FromDiscord | <Phil> Still more type work than I desire but it gets me past the problem |
20:28:22 | FromDiscord | <Phil> In reply to @Elegantbeef "Simple is always better": Simple would be simply the concept approach working |
20:28:46 | FromDiscord | <Elegantbeef> You want runtime concepts no? |
20:28:50 | FromDiscord | <Elegantbeef> Those are not simple |
20:29:22 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> Just use fungus and sweep it under the rug |
20:31:41 | FromDiscord | <vindaar> are you kidding or is that another one of your 5B different macro related libraries? 🤣 |
20:31:48 | FromDiscord | <Elegantbeef> That is |
20:31:55 | FromDiscord | <Elegantbeef> https://github.com/beef331/fungus |
20:32:05 | FromDiscord | <Elegantbeef> Though I think metagn has a better version inside skinsuit |
20:32:22 | FromDiscord | <Elegantbeef> https://github.com/metagn/skinsuit |
20:34:21 | FromDiscord | <Elegantbeef> The sad thing about all my macros is that I mostly just make them for shits and giggles |
20:34:25 | FromDiscord | <vindaar> neat, thanks! |
20:34:35 | FromDiscord | <Elegantbeef> Though in this case I'm actually using my traitor stuff for my present project |
20:35:39 | FromDiscord | <bosinski2023> In reply to @Elegantbeef "The sad thing about": nope, oopsie is great and micros, too |
20:35:39 | FromDiscord | <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:19 | FromDiscord | <vindaar> so usually I end up writing random macro code for each project as I need it. Today I wrote (probaly |
20:36:47 | FromDiscord | <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:31 | FromDiscord | <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:32 | FromDiscord | <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:11 | FromDiscord | <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:11 | FromDiscord | <Phil> Nope, still hitting the wall |
20:47:37 | FromDiscord | <Phil> In this case I'm hitting recursive type with multiple generics leading to infinite generics problems |
20:48:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=umPogtffHCXQ |
20:49:55 | FromDiscord | <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:39 | FromDiscord | <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:35 | FromDiscord | <bosinski2023> @vindaar hi, may i ask why your json-schema-validator is not on nimble - it looks pretty nice ? |
20:53:38 | FromDiscord | <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:21 | FromDiscord | <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:36 | FromDiscord | <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:59 | FromDiscord | <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:08 | FromDiscord | <grumblygibson> Seems nutty to me that `isolate` complains about primitive datatypes. Is there a logical foundation for this behavior? |
20:57:31 | FromDiscord | <Elegantbeef> Yea the hooks are wrong |
20:57:42 | FromDiscord | <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:00 | FromDiscord | <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:50 | FromDiscord | <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:36 | FromDiscord | <vindaar> I see. Hard for me to wrap my head around enough to provid solid advice :/ |
20:59:43 | FromDiscord | <vindaar> (edit) "provid" => "provide" |
20:59:54 | FromDiscord | <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:14 | FromDiscord | <Phil> What I wanted to do was be able to "lazily" append operations to that chain |
21:01:13 | FromDiscord | <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:27 | FromDiscord | <Phil> Which means you get a ton of data duplication |
21:02:01 | FromDiscord | <Robyn [She/Her]> I genuinely can't tolerate getting 101 errors from fucking lang server |
21:02:24 | FromDiscord | <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:24 | FromDiscord | <Elegantbeef> Turn off the tooling and write code like it's 1902 |
21:02:38 | FromDiscord | <Phil> "And then I emit the final result" |
21:03:26 | FromDiscord | <Phil> (edit) "me"" => "me, the final child where somebody is subscribing to the values"" |
21:03:43 | FromDiscord | <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:05 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "*Turn off the tooling": I really find it convinient though sigh |
21:05:09 | FromDiscord | <Elegantbeef> Is this about taking an operation putting it through multiple different type consumer/emiters and emitting a reult? |
21:07:33 | FromDiscord | <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:30 | FromDiscord | <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:50 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> Hmph I don't quite understand how it should look |
21:14:53 | * | krux02 quit (Ping timeout: 268 seconds) |
21:18:14 | FromDiscord | <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:35 | FromDiscord | <Phil> Modelling one was the thing I did first, modelling two is what I wanted a reference to the parent for |
21:25:37 | FromDiscord | <Phil> I guess the chain of operations kind of is like an acyclic unidirectional graph? |
21:25:47 | FromDiscord | <Phil> Starts at source and ends in various subscriptions |
21:25:58 | FromDiscord | <bosinski2023> sent a long message, see https://pasty.ee/CsyWWAykhSsP |
21:26:44 | FromDiscord | <bosinski2023> (edit) "https://pasty.ee/AbrkXIJYbuSK" => "https://pasty.ee/jZXmYMMXPsbf" |
21:26:51 | FromDiscord | <Phil> Yeah, though I would assume this to be rather doable because RXJS somehow manages it |
21:28:40 | FromDiscord | <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:16 | FromDiscord | <bosinski2023> (edit) "data." => "data, but have no direct connection. Or you need a broker.." |
21:40:45 | FromDiscord | <bosinski2023> sent a long message, see https://pasty.ee/fBJwYQjlImui |
22:08:15 | * | KhazAkar quit (Ping timeout: 245 seconds) |
22:08:56 | FromDiscord | <threefour> sent a code paste, see https://play.nim-lang.org/#pasty=PDlxGyhpfHQZ |
22:10:29 | * | KhazAkar joined #nim |
22:14:20 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=LjrCrHWAGJHg |
22:14:21 | FromDiscord | <Robyn [She/Her]> In reply to @threefour "I'm wanting to make": I'd imagine a template would work here... Probably |
22:14:46 | FromDiscord | <Elegantbeef> It would indeed robyn 😛 |
22:14:47 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=CDZGVNdMZrcf |
22:15:24 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=ATsLLQhYZJzX |
22:15:27 | FromDiscord | <Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=cfgsCejZOQnB" => "https://play.nim-lang.org/#pasty=JOPrjXhmlziC" |
22:18:34 | FromDiscord | <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:13 | FromDiscord | <the_real_hypno> Copilot knows 😮 |
23:53:14 | FromDiscord | <the_real_hypno> https://media.discordapp.net/attachments/371759389889003532/1232117039397601321/image.png?ex=662849e9&is=6626f869&hm=992b01305f71eb244a292359cc985b0239198646d34c9ff724503d5c57a04175& |
23:54:49 | FromDiscord | <the_real_hypno> Andreas is not my name btw 😄 |