Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[9fans] Go for systems programming

76 views
Skip to first unread message

lamg

unread,
May 17, 2013, 11:51:01 AM5/17/13
to
Can Go be used for replacing C in Plan9? Could be a kernel be written
in Go? If it is not possible, what about making a C-like Go? Where
C-like Go means having similar syntax, but not channels, garbage
collection, and other fancy 21st century runtime features; but with no
need for makefiles and fast compilation times. Could this be a sort of
plugable compiler, where we could select what features of the language
we would use for being included in the runtime?
I think it will be nice for Plan9 having such language-compiler, Go
has proved to be an improvement over C in its own niche.

Nemo

unread,
May 17, 2013, 12:07:55 PM5/17/13
to
If you remove the features that make go interesting you'd get C without
punctuation symbols.

Matthew Veety

unread,
May 17, 2013, 12:31:22 PM5/17/13
to
On May 17, 2013, at 11:51, lamg <gort.an...@gmail.com> wrote:

> I think it will be nice for Plan9 having such language-compiler, Go
> has proved to be an improvement over C in its own niche.
>

In its own niche is the important point here. Just because writing a kernel or system utilities can be done in Go doesn't mean it should be. Go isn't even totally stable or feature complete on Plan 9 at this point. You get the same shit in C on Plan 9 as you do Go plus it's more stable and has better support.
At this point I would say keep using C unless you have some specific need to use Go on Plan 9.

--
Veety

erik quanstrom

unread,
May 17, 2013, 12:49:37 PM5/17/13
to
> In its own niche is the important point here. Just because writing a
> kernel or system utilities can be done in Go doesn't mean it should
> be. Go isn't even totally stable or feature complete on Plan 9 at
> this point. You get the same shit in C on Plan 9 as you do Go plus
> it's more stable and has better support. At this point I would say
> keep using C unless you have some specific need to use Go on Plan 9.

if you rewrote a kernel in go, i don't think you'd want something that
is exactly plan 9.

- erik

Skip Tavakkolian

unread,
May 17, 2013, 1:28:27 PM5/17/13
to
Go's is a great language that makes it easy to write applications of all sizes well, but its greatest benefit to Plan 9 is the plethora of packages that make it possible to deal with the numerous Web standards. 

lamg

unread,
May 17, 2013, 1:53:00 PM5/17/13
to
What about lack of makefiles and fast compilation times?, I don´t want
to "remove" that. The point is making a more practical C, not a
Go--. Go´s grammar is designed for being easy to parse (and is
different), so it wouldn´t be C without punctuation symbols; and Go´s
package system makes the compilation faster. What about the
preprocessor? Can we get rid of that?
If think if we can make better our lives, why wouldn´t do we? About
the support, well is difficult to break our links with the past, but
as a parallel long term project changing one thing at the time when it
is ready would be possible to achieve stability and to write programs
more easy.

2013/5/17, Skip Tavakkolian <skip.tav...@gmail.com>:

Bakul Shah

unread,
May 17, 2013, 2:45:06 PM5/17/13
to
On May 17, 2013, at 9:07 AM, Nemo <nemo...@gmail.com> wrote:

> If you remove the features that make go interesting you'd get C without
> punctuation symbols.

Agreed.

I don't see what's the big deal about doing GC In an OS kernel. And the features that make Go interesting can be useful at the kernel level too.

On the other hand, may be the kernel can be made much more minimal and where most everything is done by user level services. But as Erik says it wouldn't be plan9. In Go it might be more natural to have a syschannel instead of syscalls (actual syscalls might end up being just send and receive).

On the other other hand, to really dethrone C, there needs to be a Go compiler in Go and an OS in Go! We know both can be done but actually doing so can throw up a bunch of surprises.

hiro

unread,
May 17, 2013, 3:23:35 PM5/17/13
to
> On the other other hand, to really dethrone C, there needs to be a Go
> compiler in Go and an OS in Go!

I also want my microwave and wristband to run GO code first.

Charles Forsyth

unread,
May 17, 2013, 4:29:40 PM5/17/13
to

On 17 May 2013 18:53, lamg <gort.an...@gmail.com> wrote:
What about the
preprocessor? Can we get rid of that?

The Plan 9 C compiler does the preprocessor actions during lexical analysis. It isn't a separate pass.

Kurt H Maier

unread,
May 17, 2013, 4:31:43 PM5/17/13
to
On Fri, May 17, 2013 at 11:45:06AM -0700, Bakul Shah wrote:
>
> I don't see what's the big deal about doing GC In an OS kernel.
>


This is a fantastic troll.

khm

erik quanstrom

unread,
May 17, 2013, 4:37:06 PM5/17/13
to
i don't see the troll here. there is nothing magic about user space.

- erik

Bakul Shah

unread,
May 17, 2013, 4:42:40 PM5/17/13
to
On Fri, 17 May 2013 16:31:43 EDT Kurt H Maier <kh...@intma.in> self referentially wrote:
>
> This is a fantastic troll.

In response to
> On Fri, May 17, 2013 at 11:45:06AM -0700, Bakul Shah wrote:
> >
> > I don't see what's the big deal about doing GC In an OS kernel.

See http://en.wikipedia.org/wiki/Genera_(operating_system)
Look under the Features section.

Matthew Veety

unread,
May 17, 2013, 4:46:25 PM5/17/13
to
Oh lord this is degenerating to lisp machines.

Bakul Shah

unread,
May 17, 2013, 5:05:19 PM5/17/13
to
On Fri, 17 May 2013 16:46:25 EDT Matthew Veety <mve...@gmail.com> wrote:
> Oh lord this is degenerating to lisp machines.

And the problem with that is?

Kurt H Maier

unread,
May 17, 2013, 5:53:42 PM5/17/13
to
you are a master troll this is awesome

erik quanstrom

unread,
May 17, 2013, 11:17:45 PM5/17/13
to
> See http://en.wikipedia.org/wiki/Genera_(operating_system)
> Look under the Features section.

hey, that's cool. thanks for the reference.

- erik

0 new messages