r4m0n changed the topic of #kspmodders to: Technical discussion ONLY (KSP related or not), for random shit-talking, join #shitshow (seriously)
fcbayerndm has quit [Quit: fcbayerndm]
Wetmelon has quit [Ping timeout: 183 seconds]
fcbayerndm has joined #kspmodders
GlsFrg|phone has joined #kspmodders
Glass|phone has quit [Ping timeout: 204 seconds]
GlsFrg|phone has quit [Read error: Connection reset by peer]
Glass|phone has joined #kspmodders
<SilverFox> So, there isnt a way to fully unload dll's from ram of an executing process in c# right?
<SilverFox> Im planning on setting up modules for foxbot that can be loaded and unloaded
<SilverFox> if not, its not a big deal to unload via just restarting foxbot
<SilverFox> and what would be the best way to go about modularity like that?
<SilverFox> hopefully I can setup VS to have me make sub-assembly type things next to the main project so that I dont have to start a new project for each module I want to make
icefire has quit [Read error: Connection reset by peer]
Supernovy has joined #kspmodders
fcbayerndm has quit [Quit: fcbayerndm]
<G-Mobile> wrong
<G-Mobile> app domains
<G-Mobile> ~g msdn C# app domains
<SilverFox> the fuck you mean "wrong"
<SilverFox> there was nothing to be "wrong" about
<G-Mobile> "there isn't a way to fully unload dlls from ram of an executing process in C# right"?"
<G-Mobile> no, not right, wrong
<SilverFox> link is bad
<SilverFox> so using these I should be able to do this easily
<G-Mobile> yep
<G-Mobile> key restriction, app domains cannot interact with eachother; but that shouldn't be an issue for foxbot
<SilverFox> well, I need to interact with the modules
<SilverFox> specifically send them the message data that came in
<G-Mobile> the program can interact with it's domains yea
<SilverFox> and receive data back from them
<G-Mobile> yep
<G-Mobile> but ~g wouldn't be able to talk with ~wa
<SilverFox> hmmmmmmmmm
<G-Mobile> unless you build an interface between them through the main program
<SilverFox> that specific case might not be a problem, but I do have a majority of search functions using the google searching
<SilverFox> so I need to plan this out so im not doing any janky shit
<G-Mobile> can you have app domains in an app domain, so the google function has it's own plugins?
<G-Mobile> majiir we summon thee
* G-Mobile leaves
<SilverFox> because c# foxbot is supposed to be the best programming I can do
<SilverFox> well, there would be multiple instances of google domain and that seems shitty and loading and unloading them lots might cause a memory leak, idk
<G-Mobile> No there wouldnt?
<G-Mobile> There'd be one instance of the google domain and it would contain the domains that are dependant on google
<SilverFox> this sounds like reverse inheritence, perhaps Im not picturing it right
<G-Mobile> or, build an event driven app interface level
<SilverFox> event driven sounds like something useful
<SilverFox> my bot does things when things get triggered
<SilverFox> in fact, that's the entirety of my bot currently, but I'd also have new features in new foxbot that would utilize time rather than check states when messages happen
<SilverFox> which could probably be a module in of itself; the time module
<G-Mobile> loaded plugins register what they do with a central authority, then other plugins can ask for providers from the authority, then make a decoupling event for when a provider rehashes, so each bound client knows to remove its references
<SilverFox> that's a good thing to note
<SilverFox> when things get unloaded, there should be a time where they get to do their shutdown sequence and then report back saying they've shut down their shit, and then it can be killed
<SilverFox> kinda like a dynamic cluster
<SilverFox> however, this also brings to light that having all the stuff get the message sent to them means that every function called is going to trigger lots of cpu load when there are lots of modules loaded
<SilverFox> relatively lots anyways
<SilverFox> currently I have it set up so that the functions at the end of message processing return; after they're done so the rest of the onMessage method isnt run through with the bajillion functions, since it isnt necessary, and this saves on processing
<SilverFox> and im curious what an elegant solution to that would be
<G-Mobile> SilverFox: dont note that, its a suggestion not a truth
<SilverFox> dont note what, I said a few things, unless you mean what you said, in which case I've already forgotten about it
<G-Mobile> Good
<SilverFox> it would be nice to have majiir comment on this
<SilverFox> or someone else experience in the programming field
<SilverFox> r4m0n, what say you
<r4m0n> reading backlogs...
<r4m0n> ok, you want C# modules interacting with each other, each in their own appdomain?
<SilverFox> foxbot9001 is supposed to be well written and a thing to be proud of
<G-Mobile> To abstract a bit, the modules need to be reloadable without taking the bot down, but need to provide features to eachother to minimize code duplication
<SilverFox> so what I want is to load in say, the tells module, and now if a message is sent, the tell module will receive it and check if it fits the criteria of its inputs, ie. ~tell, and if it does, it'll process the message, do its thing, then send the reply to mothership which sends the message/feedback here
<G-Mobile> if there is a better solution than app domaina, so be it
<SilverFox> and it, preferably, should be reloadable/ loadable/unloadable
<r4m0n> nah, appdomain is pretty much the best bet for this
<SilverFox> noted
<r4m0n> you want a simple, generic API on the plugins, implemented with an Interface on the main executable, which all plugins should depend on
<SilverFox> however, biggest pseudo-problem now is that if lots of modules are loaded, they'll all get the messages and all have to process them
<SilverFox> indeed
<r4m0n> if you mind that (which isn't any considerable load, really), just have some regex interface or something so that the core does the filtering
Glass|phone has quit [Ping timeout: 186 seconds]
<r4m0n> I'd just instantiate the plugin modules and call a function on them all and let them do their thing
<r4m0n> you can also have some generic message passing in the core if you want shared functionality
<r4m0n> no direct connection between domains, just have the core pass stuff around
<SilverFox> well, my current system return;'s after a function has done processing so that it doesnt have to process a bunch of other if statements that really dont need to be processed
<SilverFox> so I'd like to keep that feature
<r4m0n> as long as the IRC message parsing is singlethreaded, you don't even need to worry about locks or the like for unloading/loading modules
<r4m0n> you may want multiple modules responding to a message in the future
<SilverFox> hrmmmm
<r4m0n> if you really don't, just stop iterating after the first returns something
<SilverFox> also, I have modules that might depend on other modules
<SilverFox> such as pornhub search depends on google
<SilverFox> also smaller problem; how the fuck would I organize all these small google search modules
<r4m0n> if you want shared functions, have separate libraries for them, and depend on those
<r4m0n> then you'll have to handle the loading if those when they change, and you'll get a copy per domain
<SilverFox> perhaps if I had the core relay data to any necessary modules?
<SilverFox> like, sending a moduleInteractionRequest type deal?
<SilverFox> "hey i have data for module X" "oh, module X isn't loaded" "k"
<r4m0n> that's useful to have in any case
<SilverFox> right
<SilverFox> so perhaps the best solution would be that, where core relays requests to the requested module
<SilverFox> and to make things easier I'd have a dictionary relating string, module
<SilverFox> so instead of having a direct reference to the module hardcoded, it just asks for "google"
<SilverFox> however that might be a problem now, since I'm hardcoding the reference in a different manner, and updating the reference name means changing all the previous modules
<SilverFox> how do I get around this?
<SilverFox> im going to have a fuckton of google referencing modules
<r4m0n> I think a google function fits more in a separate library than a module
<r4m0n> there's several ways to query it, and to handle the results, you'll want some flexibility there
<SilverFox> hmmm, but arent dlls the ones that are hard to unload?
<SilverFox> or can you appdomain them as well?
<r4m0n> the dependencies will also be loaded in each appdomain
<r4m0n> you'll end up with multiple copies
<r4m0n> which isn't an issue, really
<SilverFox> that's a thing I want to avoid
<SilverFox> redundant copies of a module
<r4m0n> that's a thing you don't need to worry about
<SilverFox> why?
<r4m0n> stop worrying about the 10k that's going to be loaded multiple times
<G-Mobile> SilverFox: with app domains you literally cannot avoid duplicating dependencies
<r4m0n> if you want to auto-reload any changed DLLs, just track what's loaded by each plugin and reload all affected
<r4m0n> you get a list of what's in each anyway
<SilverFox> how would I get this list?
Glass|phone has joined #kspmodders
<SilverFox> having to code for things to auto-reload dependencies sounds like additional boilerplate, i feel gross about that
<SilverFox> because really all that's happening is "query + site restriction"
<SilverFox> oh shit wait
<SilverFox> my cache
<G-Mobile> so the way it works is that every app domain shares zero code with the rest of the program, it's executible is isolated, nooooo touchy, because of that, even if every single dll usings system.io, every app domain has to establish a unique instance of system.io; plugins within the same appdomain can share stuff; the tradeoff here is that as an immutible rule you cannot unload DLLs
<G-Mobile> what you can do is unload entire domains
<G-Mobile> restarting the program is reloading the main app domain
<SilverFox> I could implement a cache module, and this would also make sure that a well drawn out interaction system is going on between modules and core, since it's going to get lots of use
<G-Mobile> either you have all this duplicate dependency code, or you don't reload plugins
<SilverFox> what duplicate dependency code here?
<G-Mobile> all the using lines in every plugin
<SilverFox> I think I can minimize that with interface
<G-Mobile> those usings are loaded once per app domain that calls for them
<SilverFox> right, and some I can't get around
<G-Mobile> yep
<SilverFox> I'll live with those
<G-Mobile> great
<SilverFox> like system and shit like that
<SilverFox> but what I dont particularly feel great about is having modules as dependencies be loaded via usings in that manner where I have to re-establish all instances when a change is made
<SilverFox> seems like it adds more work to be done
<G-Mobile> I'm havin a stroke
<SilverFox> stop it
<SilverFox> I just need to make sure all this is done well, and efficiently
<SilverFox> my bot doesnt peg the processor of my pi, and I'd like to keep it that way
<G-Mobile> r4m0n: do appdomains get the usings of the main domain?
<r4m0n> totally isolated
<SilverFox> that sounds like it's asking for jankiness
<SilverFox> so they're sandboxed, neat
<r4m0n> they get their own runtime loaded, I think
<G-Mobile> yea, figured; it's half a reloading feature and three quarters a security feature
<r4m0n> yep, I think it's designed with security as the main function
<SilverFox> which is neat
Glass|phone has quit [Ping timeout: 186 seconds]
<G-Mobile> basicalty if you have some code that's doing dangerous stuff like being exposed to the public or handling passwords, you can put the public code where it literally can't touch the rest of the program, and the password code where nothing else can touch it
<G-Mobile> then even if there's some shit wrong in your public code and somebody hacks your steez, they're impotent
Glass|phone has joined #kspmodders
<SilverFox> so, lets say Im reloading the google module, someone tries to google, it just doesnt get any return because the module doesnt exist currently/isnt inited yet or whatever, if any module tries to talk with the google module, it'll just get told that module doesn't exist and the module will just null or whateverthefuck
<G-Mobile> what I would do is have step one of unloading a module be to trigger an event in the main domain that goes through all the registered clients of the services that module provides, and invoke a function to deregister the service reference, and every module would therefore behave appropriately if one of their service dependencies goes down
<G-Mobile> so say ~yt uses google, when google goes down, main tells youtube "google is down", and youtube would respond by telling main "disable my commands"
<G-Mobile> then when google comes back up part of the loading process would be a broadcast event "Hi I'm google, I do this:", sent to every other module, and those modules can then say "Hey, I want that, main, register me as a client for service(google.thing), oh and also enable my command"
<SilverFox> hrmmmmm
<G-Mobile> this lets you unload modules that other modules are dependent on gracefully without reloading them too; and it would mean you do not have race conditions on startup
<SilverFox> module disabling is an idea
<G-Mobile> you don't need to disable the module, just it's command
<G-Mobile> so while google is offline, there is no ~yt command to call
<SilverFox> modules can have an infinite number of commands
<SilverFox> tracking per-command isn't the cores job
<G-Mobile> yea, and maybe they're not all depndent
<G-Mobile> as long as somewhere along the line it gets figured out such that you can toggle the availability of exterior functionality based on the internal capacity to actually perform the function, I don't care what goes where
<G-Mobile> when the google module is down, the youtube module shouldn't crash or give a 404 response to any commands that it can't complete without the google module
<G-Mobile> it's totally OK for an IRC bot to just not respond
<SilverFox> my idea is that if the module is down, internally it might be like "this module isnt loaded, so I cant do anything" and just wont respond to the command, as if it didnt exist
<G-Mobile> sure
<SilverFox> but could also respond with "dependent module not loaded: <module>" and that'd be useful for quick diagnostic via irc
<G-Mobile> verbosity levels
<SilverFox> so I could be like "oh" "~loadmodule <module>"
<G-Mobile> under normal conditions give no reply, when you're debugging you can turn up the verbosity and get errors
<G-Mobile> error messages that is
<SilverFox> well then I'd always set to debugging because I want to know when shit goes wrong
<SilverFox> for whatever reason
<G-Mobile> ok well that's a different issue
<G-Mobile> so now you want a feature set in the main domain that will send you a PM any time a command results in an irregular response
<SilverFox> perhaps
<SilverFox> PM sounds neat
<G-Mobile> that way you don't have to know to find the error in the buffer, or check logs (also logs), and it'll capture/forward thet string that caused the irregular response
<SilverFox> I wonder if I can program foxbot with a basic self-diagnostic so that if a module does give irregular response, or just randomly crashes, that it tries reloading the module on its own instead of being an infant that cant do anything for itself
<G-Mobile> I would do a repeat failure or failure rate response
<SilverFox> of course you would
Wetmelon has joined #kspmodders
<G-Mobile> also reload capping
<G-Mobile> if you reload three times, just unload it
<SilverFox> that's a fair suggestion, but idk
<SilverFox> I'll think that one over later
<G-Mobile> it would probably be smart to have these diagnostics be managed by a plugin; the functions themselves will probably need to be hard coded, if you can avoid that it'd be for the best, but this is a feature set you'll be testing a lot
<SilverFox> mmmm idk about a separate plugin for it
<SilverFox> what is kinda assbackwards is having a diagnostic module loaded
<G-Mobile> I think it'll be easier to get this one critical feature set working if you don't have to reload the whole program every time
<SilverFox> with plugins; dlls, I still have to reload the program, otherwise memory leak. I hate memory leaks
<G-Mobile> not with app domains
<G-Mobile> every app domain is a separate runtime, separate ram
<G-Mobile> when you unload an app domain, everything that was it's gets deallocated
<G-Mobile> they're like child processes, different organs
<SilverFox> right, but app domains can't communicate the same a loaded dll could
lpg has left #kspmodders [Up, up, and away!]
<G-Mobile> sure
<SilverFox> I wonder if that would have effect
<SilverFox> if there's something wrong with the code that loads modules, it cant really diagnose it because it couldnt load the diagnostic module
<G-Mobile> ok so, have an integral super basic diagnostic that'll let you catch that, and then allow it's functionality to be overridden by a privileged plugin
<SilverFox> so like, core basic diagnostics, which is upgraded by the diagnostic module?
<G-Mobile> yea
<SilverFox> that's workable
<G-Mobile> so you can do the brute force, shotgun logging even in the worst cases
<SilverFox> right
<G-Mobile> but you can do the fancy features in an environment that's more suitable for it's own development
<SilverFox> right
<G-Mobile> I think you've got enough to work on for now, no use planning further than this until you've got your dick on some code
<SilverFox> well, there's also the thing of "can't really run C# on a pi"
<G-Mobile> ~g raspberry pi mono C#
<G-Mobile> seems doable
<SilverFox> this is also in 2013, Im looking for something more recent that is working in case anything changed
<G-Mobile> you always use slight distance from present to ignore sources, so whatever
<SilverFox> I'll have to test whether this can work still, but it's getting late, and I shouldn't fuck with my sleep schedule this much, so off to bed I go
angavrilov has joined #kspmodders
GlsFrg|phone has joined #kspmodders
Glass|phone has quit [Ping timeout: 204 seconds]
Glass|phone has joined #kspmodders
GlsFrg|phone has quit [Read error: Connection reset by peer]
Wetmelon has quit [Ping timeout: 183 seconds]
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 186 seconds]
angavrilov||phone has quit [Ping timeout: 204 seconds]
angavrilov|phone has joined #kspmodders
Rokker is now known as RokkerSleep
angavrilov|phone has quit [Ping timeout: 204 seconds]
angavrilov|phone has joined #kspmodders
angavrilov||phone has joined #kspmodders
<G-Mobile> re:hyperloop, how much do you have to reduce the atmospheric density of the tube to reduce drag by 90%?
GlsFrg|phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 204 seconds]
Glass|phone has quit [Ping timeout: 200 seconds]
Glass|phone has joined #kspmodders
GlsFrg|phone has quit [Read error: Connection reset by peer]
Glass|phone has quit [Read error: Connection reset by peer]
Glass|phone has joined #kspmodders
GlsFrg|phone has joined #kspmodders
Glass|phone has quit [Read error: Connection reset by peer]
<G-Mobile> given how much less activity this channel has now, we really need more of yall to get on BNCs
GlsFrg|phone has quit [Read error: Connection reset by peer]
Glass|phone has joined #kspmodders
aeTIos has quit [Ping timeout: 383 seconds]
GlassYuri has joined #kspmodders
Wetmelon has joined #kspmodders
Daz has quit [Read error: Connection reset by peer]
Daz has joined #kspmodders
Wetmelon has quit [Ping timeout: 183 seconds]
Severian has quit [Ping timeout: 383 seconds]
Severian has joined #kspmodders
RokkerSleep has quit [Quit: Connection closed for inactivity]
Snoozee has quit [Quit: CUT THE HARDLINES!!]
Snoozee has joined #kspmodders
Snoozee is now known as Majiir
Asymptote has joined #kspmodders
RokkerSleep has joined #kspmodders
RokkerSleep is now known as Rokker
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Ping timeout: 183 seconds]
m4v has quit [Ping timeout: 204 seconds]
m4v has joined #kspmodders
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 183 seconds]
GlassYuri has quit [Quit: Leaving]
RandomJeb has joined #kspmodders
GlsFrg|phone has joined #kspmodders
Glass|phone has quit [Ping timeout: 195 seconds]
GlsFrg|phone has quit [Read error: Connection reset by peer]
Glass|phone has joined #kspmodders
Technicalfool has quit [Remote host closed the connection]
Technicalfool has joined #kspmodders
Supernovy has quit [Quit: Goodnight.]
GlsFrg|phone has joined #kspmodders
Glass|phone has quit [Read error: Connection reset by peer]
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Ping timeout: 200 seconds]
angavrilov|phone has quit [Ping timeout: 200 seconds]
angavrilov|phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 204 seconds]
angavrilov|phone has joined #kspmodders
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 200 seconds]
Wetmelon has joined #kspmodders
angavrilov|phone has joined #kspmodders
angavrilov||phone has quit [Ping timeout: 383 seconds]
angavrilov||phone has joined #kspmodders
angavrilov|phone has quit [Ping timeout: 200 seconds]
aeTIos has joined #kspmodders
TonyC has joined #kspmodders
Orum has joined #kspmodders
icefire has joined #kspmodders
LabMonkey has joined #kspmodders
Orum has left #kspmodders [#kspmodders]
StatutoryApe has quit [Ping timeout: 183 seconds]
xEvilReeperx has joined #kspmodders
Technicalfool is now known as technicallySleeping
Asymptote has quit [Read error: Connection reset by peer]
icefire_ has joined #kspmodders
icefire has quit [Ping timeout: 183 seconds]
icefire_ has quit [Remote host closed the connection]
icefire_ has joined #kspmodders
angavrilov has quit [Remote host closed the connection]
icefire_ is now known as icefire
Glass|phone has joined #kspmodders
GlsFrg|phone has quit [Ping timeout: 195 seconds]