5 ms·
What is a lambda to you in this case? That lambda will need to be scheduled, it will need to maintain it's scope... All the same general issues could exist. The
by nixpulvis 8y ago
What is a lambda to you in this case? That lambda will need to be scheduled, it will need to maintain it's scope... All the same general issues could exist. There have been plenty of machines that simply run functions, in fact before there was things we call OSes today, the machines that ran the code would typically not have an notion of time sharing, and would map even more closely to a pure lambda evaluator.
Without specifics about what differences you mean, lambda = function = process = thread = fiber = service = worker = ...
- stcredzero 8y agoWhat is a lambda to you in this case? Pure functions. That lambda will need to be scheduled, it will need to maintain it's scope... All the same general issues could exist. But no users would have to be able to start processes. Instead, lambdas could be associated with persistent storage of state, and processes would be started by the OS to apply the lambdas in a simulation loop, but users wouldn't directly start processes. Perhaps thinking of those as processes isn't quite right either.
- nixpulvis 8y agoThe only truly pure functions exist in the imaginary world of mathematics, if you even believe that. But I think I kinda get your point, but would challenge you to think about this issue with the frame of mind of access control and permissions a bit. I think you'll find the need for some kind of process like task. Maybe not...
- stcredzero 8y agoThe only truly pure functions exist in the imaginary world of mathematics, if you even believe that. Note I already mentioned persistent stores of state. I think you'll find the need for some kind of process like task. Maybe not... Maybe re-read. I've already said that there would be a process like task. Lambdas will need to be associated with state. Users won't have to start processes. Instead, processes will be more like processors.
- macintux 8y agoThis sounds like the Erlang VM.
- stcredzero 8y agoI'll take that as positive feedback.
- chc4 8y agoHave you looked at Urbit? It uses this idea - programs are state machines that you give to the runtime, which pumps them with events (IO, RPC calls, etc) that return [new-state events-out]. All programs are purely functional and deterministic, so you can replay events or serialize the app to transfer somewhere else.
- stcredzero 8y agoAll programs are purely functional and deterministic, so you can replay events or serialize the app to transfer somewhere else. Interesting. Actually, I have one of my processes serializing its state and exporting it to a different process, while all of the clients continue playing the MMOsteroids game they're logged into.
- nickpsecurity 8y agoI'd look at Haskell-based stuff first. I was told, though, by Haskellers that things like House operating system are imperative in style even if done in Haskell. So, a quick search for functional programs for OS's gave these possibilities: https://news.ycombinator.com/item?id=7166755 https://news.ycombinator.com/item?id=7166755 You were actually in that thread. Did the commenter's work not actually use FP or you not see it?
- stcredzero 8y agoYou were actually in that thread. That's kinda trippy. It's like I was a different person. Also, I was working on the predecessor system to the one I'm currently working on. Back then, the thing was written in Clojure. I later ported it to Go. The design philosophy has changed a heck of a lot as well. Back then, I was going to have everything on the same very large and fast virtual instance, with modest goals for the largest population/scale. Now my system is scalable by adding more "workers," which I've spread out onto small AWS instances.