On Thursday, November 23, 2017 at 9:15:27 AM UTC-7, Haddock wrote:
>
> Concurrency in Rust and Go are completely different things. In Rust a 
> thread has its own memory space and hence a thread cannot reference data by 
> reference of some other thread. The rational behind that is security. Also, 
> a thread in Rust is not lightweight, but a full-blown OS thread. So there 
> is no CSP in Rust as in Go and therefore there is little to compare between 
> Rust and Go concerning concurrency. AFAIK, there is some crate in Rust that 
> adds some minimal support for coroutines, but I don't think its used in 
> Servo.
>

I've read about both Rust and Go, but I'm not very familiar with either. I 
am more interested in Go because it has lightweight threads, which seem to 
take better advantage of a multi-core system.
I don't know what CSP or "crate"  mean.

In my processor I support a Forth that has "quotations." These are 
anonymous nested functions defined inside of a parent function.
The quotation's xt (execution token) can be passed as a parameter to a HOF 
(higher-order function) that can EXECUTE it (typically inside of a loop).
Typically the HOF will traverse a data-structure and execute the quotation 
for every node in the data-structure.
The cool thing is that the quotation has access to the parent function's 
local variables --- it can read or write to them --- this is despite the 
fact that the HOF has local variables of its own.

Do either Rust or Go have anything comparable to my quotations?
Note that my quotations are not like Scheme closures --- they can only be 
executed so long as the parent function is in scope --- 
in Scheme the parent function can exit and the closure is still valid, 
because the local-frame is in the heap and doesn't get GC'd until all the 
closures have been killed.
I don't have GC in my system --- I have a simpler system that supports 
general-purpose data-structures --- my processor is intended to be a 
micro-controller.

I have something called rquotations that are almost like quotations, with 
the minor limitation that the xt can't be determined at compile-time (so 
they can't be used in my <SWITCH construct).
These are not ANS-Forth, but they have been implemented in both VFX and 
SwiftForth, and could easily be implemented in any ANS-Forth system (given 
some carnal knowledge).

Has Go been implemented for use on any micro-controller? Or is it purely a 
desktop-computer language?
My multi-core Forth processor will obviously be programmed in Forth. It may 
be possible for a language such as Go to generate Forth code that runs on 
my processor though.
Each core has its own zero-page that includes the data-stack and 
return-stack. The rest of the memory is shared.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to