Re:Writing my own init with Go
by sotaan on Tuesday February 09, 2016 @11:27AM
(#11066384)
If you improve the perf/functionalities of init using Go, I will give this language a go right after. It seems promising tho.
[ Parent
| on HN ]
Is that possible to recode init in any other language using your technique? For instance can I try it in Ruby?
Since init is the first process that runs, you can't use an interpreted language like ruby (since the interpreter would have to run first, which is impossible if your program itself is init). Maybe there's a Ruby-compiler out there somewhere, but as-is Ruby would be impossible.
> Since init is the first process that runs, you can't use an interpreted language like ruby
Sure you can, you can even use a shell script: https://wiki.gentoo.org/wiki/Custom_Initramfs#Init
Re:Writing my own init with Go
by justinsaccount on Tuesday February 09, 2016 @11:51AM
(#11066630)
This is simply not true. It's not impossible and it works exactly like any program would.
No it wouldn't. Either hack a quick shim to start the interpreter or rely on the operating system to figure out how to run a script. The #! is there for a reason.