/srv/irclogs.ubuntu.com/2017/08/11/#ubuntu-us-fl.txt

floridagram-bot<AdamOutler> @RazPi isn't that the point of atomic operations?  Like AtomicBoolean, or sync?  I've never had a problem with AtomicBoolean.02:13
floridagram-bot<RazPi> @AdamOutler I'm not quite sure I haven't read into atomic operations too much, I think those are about shared memory? A lot of what I've read recently in concurrency is that copying variables is king. Not relying on anything but copying and message passing. Which has some overhead initially but the benefit is clearer at scale.02:27
floridagram-bot<RazPi> So much stress is put on immutable variables02:27
floridagram-bot<AdamOutler> Atomic Operations are generally used on shared variables.  There is a locking-wait mechanism which locks the variable for reading, then unlocks it after the result is returned.  The same occurs for writing.  This way when two tasks attempt to access the same resource, only one will obtain it.  They may share states by using Atomic Operations.02:31
floridagram-bot<AdamOutler> https://en.wikipedia.org/wiki/Linearizability02:31
floridagram-bot<RazPi> Ohh ok, so yeah, a lot of these languages geared towards concurrency seem to focus on avoiding locking altogether by making copies of variables, and not allowing state to change. So you have to destroy and create a new state each time.02:32
floridagram-bot<AdamOutler> oh, like making a variable final before starting a task?02:32
floridagram-bot<RazPi> I believe so, making a variable final or immutable means that you can do multiple operations on any cpu or any machine since there's no state to worry about, but it does mean you have to approach it differently02:33
floridagram-bot<AdamOutler> So, I had a problem when designing CASUAL.  I had to start ADB, Initialize the process handlers, start the scripting engine, deploy zip files and play an audio sound.   All of these were "required" before the button was able to be initialized.  My solution was to create a custom AtomicThread object array and check hasStarted and hasCompleted which were atomicBooleans.  This allowed the state to be shared02:35
floridagram-botbetween threads and worked very nicely.02:35
floridagram-bot<AdamOutler> Once the threads had all started and all completed, they were done and the checking process could continue.02:36
floridagram-bot<RazPi> Ooh, iirc things like that expand well into a finite state machine02:39
floridagram-bot<RazPi> I hit that problem in webdev in python at some point doing a ton of permission checks02:39
floridagram-bot<RazPi> That's when I started realizing that programming paradigms in general were facades over a finite state machine, and that you could abstract fsm's over and over again to cover other problem domains that represented an fsm02:40
floridagram-bot<RazPi> android has big finite state machine graph for its media player I believe?02:40
floridagram-bot<AdamOutler> Yeah, as long as you can enumerate the states of an object, you can control it.  It's when they aren't enumerated that they become problematic.02:40
floridagram-bot<AdamOutler> That's why it's best to start at a drawing board, or define an API, or at least skeleton an app before actually creating it.  The worst problems occur when you are like "oh crap, let me just take care of this problem I never thought about...".  Suddenly there's a bunch more problems and they all don't really work well together.02:41
floridagram-bot<RazPi> I don't know if this is appropriate for this case but thought I'd throw it out there02:42
floridagram-bot<AdamOutler> I always "//TODO:" any oh crap moments.  Then come back and reevaluate later to check if it was actually the right way to do it. 👍02:42
floridagram-bot<RazPi> I have a lot of TODO's to revisit :(02:43
floridagram-bot<RazPi> I literally wrote in a git history once "I'm sorry for everything after this commit."02:43
floridagram-bot<AdamOutler> hehe.  use a drawing board man.02:43
floridagram-bot<AdamOutler> hahahhahaa02:43
floridagram-bot<RazPi> xD02:43
floridagram-bot<AdamOutler> It's better than some of the stuff I've seen from OEMs.  i'm sure.02:44
floridagram-bot<AdamOutler> we're talking about 8-figure hodgepodge operations here.02:44
floridagram-bot<RazPi> @_@02:45
floridagram-bot<AdamOutler> I know... right?  Sometimes they share code samples with us.  I try not to read them because it makes me liable if I comment.  But sometimes they're really bad.02:45
floridagram-bot<AdamOutler> I can't give examples, but sometimes they're really bad.02:46
floridagram-bot<AdamOutler> Here's some bad code I can give an example about... nice and neutral, Google code, written really poorly. https://www.youtube.com/watch?v=qdglKxxXO8M02:46
floridagram-bot<AdamOutler> :D02:46
floridagram-bot<RazPi> XD02:48
floridagram-bot<RazPi> Nice intro02:48
floridagram-bot<AdamOutler> That is one of my favorite intros.02:49
floridagram-bot<AdamOutler> I guess it was the other one with the ADK with bluetooth that was really bad code.02:51
floridagram-bot<AdamOutler> https://www.youtube.com/watch?v=C1PCFE1LlC402:52
floridagram-bot<AdamOutler> Those were some of my worst performing videos for the channel, but were also some of my favorite to make.  they didn't deal with mobile devices though, so they didn't translate to the captive audience well.02:59
floridagram-bot<KMyers> @ahoneybun, That has been a thing for a while, I want a SNES classic simply for the bragging rights - and the unreleased Starfox game that will be launching on there13:19
floridagram-bot<ahoneybun> Yeah that's kinda a dick more to have an unreleased game as a selling point13:20
floridagram-bot<KMyers> @ahoneybun, Its business - and a smart move on Nintendo's part IMHO as it will drive demand to that console instead of knock-offs, emulation and other things.13:23
floridagram-bot<ahoneybun> Yea13:24
floridagram-bot<SivaMachina> A dick move and a smart business move done nesscerily have to be mutually exclusive.21:02
maxolasersquad++21:08
floridagram-bot<RazPi> I don't see how it's a dick move though, isn't it more or less like you're buying a new game?21:16
floridagram-bot<AdamOutler> I have unreleased CASUALs if anyone is interested in donating.21:30
floridagram-bot<KMyers> @AdamOutler, Honestly I do believe you on that21:30
floridagram-bot<AdamOutler> Yep, I need $100 in donations and at least 1000 thanks before I release.21:31
floridagram-bot<AdamOutler> I'm kidding. I can't.  But that's typical XDA-Kiddo behavior.21:31
floridagram-bot<AdamOutler> Speaking of thanks, I'm 124 thanks away from maxing out my Thanks Meter.21:34
floridagram-bot<AdamOutler> Can't read; too low res.21:35
floridagram-bot<AdamOutler> That's like nothing.21:38
floridagram-bot<KMyers> I integrated a T-Mobile Softphone, Plex and my OpenVPN Management UI into the NextCloud Client21:39

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!