News for hackers. Stuff that matters.
Re:Redox – A Unix-Like Operating System Written in Rust by nixpulvis on Tuesday November 13, 2018 @12:59PM (#18443096)
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 = ...

Re:Redox – A Unix-Like Operating System Written in Rust by stcredzero on Tuesday November 13, 2018 @01:18PM (#18443281)
What 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.

Re:Redox – A Unix-Like Operating System Written in Rust by chc4 on Tuesday November 13, 2018 @02:06PM (#18443799)
Have 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.
Re:Redox – A Unix-Like Operating System Written in Rust by stcredzero on Tuesday November 13, 2018 @07:20PM (#18446178)
All 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.

Re:Redox – A Unix-Like Operating System Written in Rust by nixpulvis on Tuesday November 13, 2018 @01:21PM (#18443310)
The 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...

Re:Redox – A Unix-Like Operating System Written in Rust by stcredzero on Tuesday November 13, 2018 @01:44PM (#18443562)
The 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.

Re:Redox – A Unix-Like Operating System Written in Rust by macintux on Tuesday November 13, 2018 @02:01PM (#18443743)
This sounds like the Erlang VM.
Re:Redox – A Unix-Like Operating System Written in Rust by stcredzero on Tuesday November 13, 2018 @07:28PM (#18446236)
I'll take that as positive feedback.
Re:Redox – A Unix-Like Operating System Written in Rust by nickpsecurity on Tuesday November 13, 2018 @05:05PM (#18445357)
I'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

You were actually in that thread. Did the commenter's work not actually use FP or you not see it?

Re:Redox – A Unix-Like Operating System Written in Rust by stcredzero on Tuesday November 13, 2018 @07:28PM (#18446232)
You 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.