A list of puns related to "Cooperative Multitasking"
I wanted to try the new ruby 3 and the Fiber.scheduler.
The documentation is lacking, it took me several days to understand whats happening.
But in the end I was able to understand it more or less.
And wrote an MQTT client, which turned out to be very easy. The network communication is straightforward with Fibers.
Take a look: https://github.com/jsaak/ruby-mqtt3/blob/master/ruby-mqtt3.rb
edit: it seems that people expect a hello world, hold my hands type article here. This is not it.
If you want that, I found these:
https://rubyreferences.github.io/rubychanges/3.0.html#non-blocking-fiber-and-scheduler
https://www.youtube.com/watch?v=Y29SSOS4UOc
https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
http://www.wjwh.eu/posts/2020-12-28-ruby-fiber-scheduler-c-extension.html
I'm asked about cooperative synchronization in regards to concurrency, however this doesn't seem to be a very popular term. I want to be sure I don't gather the wrong information. Any resources covering the topic would be greatly appreciated as well.
I've been reading through this post that asks mainly about how preemptive multitasking works and decided to do a little bit of reading on the wiki. I saw a few mentions of cooperative multitasking, mostly about it being used in Windows and Mac versions prior to Win95 and OSX, respectively. What I got from reading about cooperative multitasking is that apps were more prone to locking up the OS as a whole, but other than that the whole concept is still clear as mud to me. Why are cooperative apps more prone to taking down a whole computer as opposed to apps in a preemptive environment? Is there an advantage that a cooperative multitasking OS has over a preemptive one, and if not, why didn't companies like MS and Apple use preemption in their OSes in the first place? Are there any recent OSes that still use cooperative multitasking today?
Hello :)
I have quite an advanced general question about PHP. I was writing an article about Python for a PHP audience and when it came to talking about Python's native async modules I wanted to write quite naively that PHP does not support async natively.
Then I wondered if it was really true and I went down the rabbit hole.
From what I read in different places, one thing that allows async for a language is to have coroutines. PHP supports them since 5.5 thanks to generators and allows not only to pause the state of a function and get a value from it, but also send back a value to this function in its paused state. Nikita Popov made an interesting (but quite complicated) article about it here in 2012.
I also read the Fibers RFC (implemented now) which seems to bring an easier way to control the flow of functions. Then I read this article about Fibers which at some point clearly states:
>Now, the fiber API itself does not provide such an event loop (which I consider a good thing).
This means you would still have to use something like ReactPHP, Swoole or Amp to provide async execution models or to build anything that can actually execute concurrently. This means that with or without fibers, async PHP will be provided by external libraries.
So I came to the conclusion that what PHP misses right now to have a real async native support is the event loop, but the rest is present in the language. I never used async PHP but I checked the Swoole library and the tool requires a specific pecl extension (`swoole`). On the other hand, for ReactPHP no extension is necessary: their event loop seems to run on native PHP.
So I have several questions:
- Am I right when I say that what PHP mainly misses for async support is an event loop (which Python and node have)?
- Is it planned to add some day a native event loop to PHP?
- If we are able with PHP code (with libraries like ReactPHP but without extensions) to do async programming, can we really say the language does not support async natively?
It's a quite complicated topic for me so sorry if some of my questions do not make sense.
If someone can help me understand a bit more how all this works I would be really glad, thank you! :)
In the old days when we only had single core processors, how would a processor schedule a task and then know to go back to windows scheduler (or OS of choice) and get another task?
Did it have some small cache of code that told it once it was done doing a task to go back to windows scheduler and compute a new one?
How did a single core know how to jump around so quickly from task to task to give the appearance of "multiple programs running simultaneiously" even though the precessor could only compute one task at a time.
I guess I don't understand how it could know to say, do a math problem for one program, then know what task to do next. If windows scheduler was a program in itself, how does a processor know to do a task and then not just "forget" windows scheduler if technically while it was working on another task, it couldn't be running scheduler at the exact same time to tell it what comes next.
I've been thinking about a problem for some time now and failed miserably with even writing a minimal example.
The general idea is to write a scheduler with real time cooperative multitasking. This means functions yield control back voluntarily within a fixed time period. Since this would be boring on its own, I wanted to ensure, that only those functions can be scheduled, which can guarantee, that they will yield within a time span, which is (given possibly constrained inputs) always shorter then the minimum time announced to the scheduler. The scheduler itself is doable. However I am struggling to express the proof for the execution time boundary for a function in the type signature (or as a dependent pair). I wouldn't mind writing a simple interpreter/machine model and perform static code analysis to find an upper bound of execution speed, however I would like to stay within the language and not proof properties of the compiled code. But this is hard since I cannot pattern match on the function body.
Maybe there are also some ways of using quantitative type theory for this?
Of course there will be examples for which no such proof exists. This is totally fine. Up to now I am totally happy with examples like Fibonacci or even simple O(1) functions. Just something I can start thinking about.
So has anyone got an idea how one could tackle this problem? I am happy for any suggestion.
Topic: The Instar Society: An Invitation
In: Boards βΊ Practitioner Organizations βΊ Recruitment by babelytra:
Hello! I'm here on behalf of the Instar Society, a loose global organization of Practitioners helping each other take some of the danger out of self-modification. We tend to attract halflight Practitioners or those who work with insects, but neither one of those is a requirement. We're looking for more members, and this forum was recommended to me as a place to find Practitioners who might be interested in joining.
The core ritual that brings the Instar Society together is the Ecdysis ritual: a powerful and versatile halflight Practice somewhere between Citation and Shadow of Oneself. It allows a Practitioner in our Society (an "Instar") to call upon the remote assistance of other Instars to reshape one's own form or Self. Again, familiarity with other halflight Practices is not necessary.
Some of our members use Ecdysis to repeatedly alter their bodies in preparation for a final transcendent metamorphosis, at which point they become fully Other. Instars who wish to retain our Practice instead use Ecdysis to hone our Practice in various ways, transforming our immaterial rather than visceral Selves.
After performing an Ecdysis on one's Self with some total number of participants, an Instar must support an equal number of other Instars' Ecdysis rituals before they are eligible for Society support in another Ecdysis of their own. This model encourages our members to set aside time to help each other progress and ensures that new members are well-supported in their first Ecdysis.
We ask that Instars swear oaths to not harm other Instars while in Ecdysis, to cooperate with the Instar who called them there, and to not spread personal information we learn there. However, if you are called to assist and find your caller's actions or intentions objectionable, you may deny them your assistance and exit the ritual early.
If what you've read so far interests you, read on for a more thorough explanation of what Ecdysis entails and how the Instar Society can help.
---
To perform Ecdysis, you will first need to obtain one Exuviae per ritual participant. This generally means you plus two helpers.
To obtain an Exuviae, you will need to draw a diagram (provided to those who have sworn the Instar Society's oaths) around a live animal as it is about to molt. The more extreme the animal's transformation is, the more power
... keep reading on reddit β‘Hi, I'm new to this subreddit (and reddit in general). I was recently introduced to this community, and I happen to have quite a lot of content that aligns with its themes. I thought I'd start posting some of it here chapter by chapter and see if you guys like it. I'm starting off with the most HFY-themed one, Birds of Prey. It's part of an ongoing sci-fi series, but all of my stories can also be read standalone. Please note that it does contain NSFW/Pancakes later in the story, but those scenes are confined to their own chapter which can be safely skipped. The links included below are to relevant concept art of species and vehicles from the setting.
Now also available on Royal Road: https://www.royalroad.com/fiction/43057/birds-of-prey
A UNN fleet on routine patrol near the outskirts of Coalition space encounters a previously uncontacted civilization, but while the aliens seem friendly, the Betelgeusian hive fleet that's sizing up their homeworld is not. Undersupplied and months from the nearest reinforcements, the fleet must coordinate with the locals in order to organize a last-ditch defense of the planet.
Book cover: http://snekguy.com/wp-content/uploads/2020/12/bop-h_guetzli.jpg
CHAPTER 1: U.F.O
The alarm blared, the sound of boots hammering on the deck joining the siren as the hangar bay was filled with a rush of activity. The running figures and idle spacecraft were illuminated by flashing, orange warning lighting, instructions coming through on loudspeakers and radios as the personnel hurried to their positions.
Jaeger was already wearing his helmet, double-checking the seals on his flight suit as he made his way towards his plane, listening to the chatter in his ear.
β...heat signatures in the Oort cloud, nothing showing up on radar, but there's a lot of interference from small bodies and debris...β
Just like with every long-range patrol, or Bug hunts as they were colloquially known, the UNN Rorke had been drifting along the edge of Coalition space and scanning for Betelgeusian activity for weeks now with no contacts. Jaeger was itching to get back into the cockpit, to stretch his wings in the black void of space. Being cooped up inside the jump carrier was nearly enough to drive him crazy.
His chest swelled with excitement as he arrived beside his ship, its angular, black chassis making it look like it had been chiseled from a block of solid onyx. The airframe was designed for the lowest possible radar cross-section, the swep
... keep reading on reddit β‘The funeral director was asking us what we think Mum should wear in her casket.
Mum always loved to wear sarongs (fabric wraps that go around the torso and drape downward a bit like a long skirt would), so my uncle suggested that she wear a sarong in there.
The funeral director looked a bit confused, as did some of our family members, to which my uncle added:
"What's sarong with that?"
I started laughing like an idiot. He was proud of it too. The funeral director was rather shocked. We assured her, and our more proper relatives, that Mum would've absolutely loved the joke (which is very true).
His delivery was perfect. I'll never forget the risk he took. We sometimes recall the moment as a way help cushion the blows of the grieving process.
--Edit-- I appreciate the condolences. I'm doing well and the worst is behind me and my family. But thanks :)
--Edit-- Massive thanks for all the awards and kind words. And the puns! Love 'em.
I would have a daughter
Capital of Ireland
It's Dublin everyday
Granted.... It is likely just because it was originally a portable exclusive, and not that many people play portable games.
Man... I really loved Peace Walker. IIRC it is the only game with cooperative multiplayer, which was amazing because my brother lived overseas and I LOVED playing this with him every day. However unlike some other games who struggle to strike a balance between multiplayer and single player, Peace Walker managed to do it really well to where there wasnβt too extreme of an advantage in playing with 4 people. I mean it was waaaay easier to get spotted with 4 jackasses running around and the bosses were very well programmed to where they used more of their weaponry when multiple targets are present (For example, the Cocoon wonβt just fire off its entire arsenal against a single player and will usually use 1 or 2 weapons at a time, however with more players, it will multitask as use more and more of its weapons at once).
Oh yeah, the boss fights.. They were amazing. I think this game had the most boss battles of any MGS title aside from maaaaaybe MHR:R. And the fights were usually quite fun... Though honestly I got sick of the 500th tank and APC bosses. The AI battles were the HIGHLIGHT of some of the best battles in the series. I fucking LOVED fighting these guys. One aspect I loved in particular was how many ways you could fight them, there was no βone wayβ to beat them, there were several ways and each way gave you different rewards for constructing ZEKE (oh yeah, you can make your own fucking Metal Gear!). Take fighting Pupa, you had the option to solely go after its AI pod for a quicker kill and more chips with the draw back of having a harder fight OR you could choose to blast apart its components and weaken it to get its parts at the cost of a longer battle.
The story was really cool too. I admit message wise it wasnβt as deep or complex as in MGS2 or MGS3, but I still found the idea of the Peace Walker machine to be interesting, with it being guaranteed to retaliate against a nationβs nuclear attack because of Hot Coldmanβs (I bet Kojima feels real proud about this name) hypothesizes that humans are naturally hesitant to retaliate and kill millions of people. I did think the whole βPeace Walker is the Bossβ plot thing was kinda silly admittedly, I mean I guess itβs kinda tame in a series composed of psychics, super powered plant girls, giant ass mechs and 4th wall breaks, but it still felt kinda dumb and I donβt really understa
... keep reading on reddit β‘Because 10+10 is twenty and 11+11 is twenty too..
Edit: thank you for awards, I have never gotten one before. I apologize that this is a repost, I did see it on TikTok and thought that it was cute and wanted to share. In the future I will check the sub for similar content before I post anything.
http://m.imgur.com/ImM3RWz
But Bill kept the Windows
True story; it even happened last night. My 5-year-old son walks up behind me and out of the blue says, "hey."
I turn to him and say, "yeah, kiddo? What's up?"
He responds, "it's dead grass."
I'm really confused and trying to figure out what's wrong and what he wants from me. "What? There's dead grass? What's wrong with that?"
.
.
.
He says, totally straight-faced, "hay is dead grass," and runs off.
Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.