--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> On Oct 27, 2014, at 2:43 PM, branimir....@gmail.com wrote:
> Also, without pointer arithmetic low level programming is pain.
The crypto/tls package contains some pretty low-level programming. But it doesn’t even import “unsafe”. And I would venture to guess that it’s easier to hack on than OpenSSL. :-P
Of course a kernel would need to contain some unsafe code. But if I needed to write a kernel, I would find C’s lack of strings, maps, channels and GC more of a pain than Go’s lack of (convenient) pointer arithmetic.
> Also, one can't use GC in kernel.
Why not?
Of course you need to be careful about latency, but kernels have been written in GC languages, such as Oberon. Microsoft’s Singularity is not just garbage-collected, but managed code (like C#).
If we still have to rely on C as a language for writing kernels (entire kernel or modules/components thereof) then I feel Go would miss a vital armoury in its arsenal. On the other hand Go would justice to its inception if we are able to write a full stack kernel (*nix or otherwise) from the scratch in it. I am not against C - its an splendid language very close to the ISA layer - but those are just my views about Go.What do u think?
> On Oct 27, 2014, at 12:58 PM, branimir....@gmail.com wrote:
>
> Go is high level language. Writing kernel in go is exercise in futility…
At one time people would have probably said the same about C.
On Oct 28, 2014, at 7:26 AM, wkharold <wkha...@gmail.com> wrote:No, no one ever said that about C for the simple reason that parts of the Unix/Linux kernel were written in C from the beginning.
While I'm sure some clever person might be able to develop *an* operating system kernel primarily in Go it is currently difficult/impossible to write Go code that could run in the *Linux* kernel.
--
Go is high level language. Writing kernel in go is exercise in futility...
Am Montag, 27. Oktober 2014 20:58:23 UTC+1 schrieb branimir....@gmail.com:Go is high level language. Writing kernel in go is exercise in futility...
This is pure non-sense. Go only requires packages available that offer the required hardware access,
in addition to its unsafe package.
It has been done multiple times in system programming languages that even offer more abstractions than
Go, like Cedar, Oberon, Oberon-2, Active Oberon, Modula-3, Sing#.
The Swiss Federal Institute of Technology enjoyed quite a few Oberon workstations back in the mid-90's.
--
Paulo
Go uses userspace runtime . Besides packages that are useless on bare metal it needsbare metal runtime.
For a start I really like Go, but I it is useless to me as I can't even write shared object library
and call it from C/C++. I see there is plugin for gccgo https://github.com/unbit/uwsgi/blob/master/plugins/gccgo/gccgo_plugin.c
but I try just to initialize runtime and failed :(
For a start I really like Go, but I it is useless to me as I can't even write shared object library
and call it from C/C++. I see there is plugin for gccgo https://github.com/unbit/uwsgi/blob/master/plugins/gccgo/gccgo_plugin.c
but I try just to initialize runtime and failed :(Again, this is the *current* implementation. There are ideas however to implement shared libraries in Go. Just give it some time. The language is still young.
Again, this is the *current* implementation. There are ideas however to implement shared libraries in Go. Just give it some time. The language is still young.
gccgo can produce shared libraries that can be called from C/C++ (whatever). Problem is that there is no exported Go function to initialize runtime from C and all
my attempts failed :(
We are still talking about kernels?
so what is missing? can we put golang inside browser, +JIT, to replace JS(missing strong type)?