Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Pablo Rozas Larraondo
This is awesome, thank you all very much for the background information and great examples that you've provided. I think it is quite clear now what the difference is between these two runtimes. Cheers, Pablo On Thursday, September 6, 2018 at 3:16:59 AM UTC+10, Michael Jones wrote: > > These

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Michael Jones
These are all great! If Pablo gets these points across to students, they will be well-informed. There is an interesting parallel to human languages. When I was a boy my father told me "you don't know a word if you can't define it." Sometimes people are comfortable with words they understand

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
Please give my seemingly redundant post. I got stiffled by the moderation process, and by the time my post was approved, others had said pretty much everything I had. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
\0, Pablo, IMHO although the runtime and VM both provide facilities such as garbage collection, scheduling ect they are not alike at all. Actually that is the ONLY way they are alike. VM run compiled bytcode like others stated, but the VM is a whole program on its own, which is run, and

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Christopher Nielsen
Michael, I agree that this is probably more useful in the long-term. Thank you for adding the detail. Cheers, Chris On Tue, Sep 4, 2018, 21:08 Michael Jones wrote: > I might tell students step by step: > > machine code is understood and executed by a machine. > -> the intel instruction to

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread andrey mirtchovski
> most languages offer programs at least some operating system like services > via a runtime service layer > -> in C, this was initially "crt0" the thin c runtime > -> in Go, the service layer is richer, offering thread management and > goroutine multiplexing, garbage collection, and more. > >

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread Michael Jones
I might tell students step by step: machine code is understood and executed by a machine. -> the intel instruction to increment a register is decoded and executed by the CPU's hardware. virtual code is understood and executed by a program that pretends to be some virtual CPU. -> a Java VM might

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread Volker Dobler
On Wednesday, 5 September 2018 01:57:33 UTC+2, Pablo Rozas Larraondo wrote: > > If I understand it correctly we could say then that Go's runtime has > things in common with a VM's runtime (I'm thinking mostly in Java's) such > as GC, goroutine (thread) scheduling, etc. However, Go's runtime

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread Christopher Nielsen
Hi Pablo, Yes, that sounds like a reasonable differentiation for students. Of course, it is more complex than that, but it's a good first principles introduction. Cheers, Chris On Tue, Sep 4, 2018, 16:57 Pablo Rozas Larraondo < p.rozas.larrao...@gmail.com> wrote: > Thanks for the answers. I

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread Pablo Rozas Larraondo
Thanks for the answers. I asked this question because I'm preparing some tutorials to explain Go to students and I'm thinking about potential questions and discussions. If I understand it correctly we could say then that Go's runtime has things in common with a VM's runtime (I'm thinking

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread jake6502
There are a lot of differences, and for the answer to be complete, you would need to specify which language you wanted to compare it to. But on a really simple level, thwd's answer is more or less correct. A VM language is usually compiled into an instruction set for that VM. The VM then

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-04 Thread thwd
A virtual machine has its own instruction set. Go compiles to machine code for a given target (which could be a virtual machine). On Tuesday, September 4, 2018 at 12:27:49 PM UTC+2, Pablo Rozas Larraondo wrote: > > The Go documentation provides some explanation about the difference > between