Live data from Hacker News

Mill: Go-style concurrency in C

millc.org

41–50 of 54 posts

Re: Mill: Go-style concurrency in C

#41

I suppose "choose" was used for multiplexing channel reads to avoid clashing with select(2) ( ) on BSD/POSIX systems..?

Yep. Same way "case" and "default" cannot be used because they clash with C keywords. I was thinking of using "elect" initially, but that looks too much like a typo.

Re: Mill: Go-style concurrency in C

#43
post #34

Earlier quoted context omitted.

Is this how the term OO got degenerated? In Communicating Sequential Processes, you only communicate via messages (C) & the processes (P) sequentially (S) run to completion. Go is not CSP. It is fair to say it was inspired by CSP. Go has a preemptive scheduler, and passing shared memory references is idiomatic and at times unavoidable.

Go-the-language does not have a preemptive scheduler, just guarantees about how various means of synchronization interact. In fact, Go-the-implementation is only partially preemptive, I believe: in addition to calls into the runtime, calling any function can now be a scheduling event. But if you have a tight loop with no function calls (just arithmetic, perhaps), that goroutine will not yield control. A true preempti…

Not so. http://golang.org/doc/go1.2#preemption

[edit: hmm. Possibly I've mis-parsed that.]

Re: Mill: Go-style concurrency in C

#44
post #22

Earlier quoted context omitted.

it's CSP as extended by golang, i.e. with channels rather than named processes.

Is this how the term OO got degenerated? In Communicating Sequential Processes, you only communicate via messages (C) & the processes (P) sequentially (S) run to completion. Go is not CSP. It is fair to say it was inspired by CSP. Go has a preemptive scheduler, and passing shared memory references is idiomatic and at times unavoidable.

"Is this how the term OO got degenerated?"

I have a theory that there exists no software engineering term that is unambiguously understood by all language communities to be the same thing. If there is one, it won't be for long.

Another recent fun one: "Continuation". Used to mean something very specific in the programming language theory community, it is now nearly indistinguishable from "thread" in many communities.

Re: Mill: Go-style concurrency in C

#46
post #44

Earlier quoted context omitted.

Is this how the term OO got degenerated? In Communicating Sequential Processes, you only communicate via messages (C) & the processes (P) sequentially (S) run to completion. Go is not CSP. It is fair to say it was inspired by CSP. Go has a preemptive scheduler, and passing shared memory references is idiomatic and at times unavoidable.

"Is this how the term OO got degenerated?" I have a theory that there exists no software engineering term that is unambiguously understood by all language communities to be the same thing. If there is one, it won't be for long. Another recent fun one: "Continuation". Used to mean something very specific in the programming language theory community, it is now nearly indistinguishable from "thread" in many communities.

I agree and it is not good, at all. There is a serious impedance mismatch between industry and academia. The former wants them young and barefoot and the latter hasn't figured out how to convey the (at this point in time) substantial body of work in the field to those that elect for a 4 year (!) CS degree.

Compare to state of affairs in medicine, as an example.

Re: Mill: Go-style concurrency in C

#47
post #15

Finally, something that purports to have Go-style concurrency that actually provides the equivalent of select{}! Lots of things just provide chans, which are fancy thread-safe queues and are fairly easy to implement. Getting select{} right is the tricky (and powerful) part.

It exists, it's just not always called "select": http://blog.drewolson.org/clojure-go-comparison/#selectandal...

Re: Mill: Go-style concurrency in C

#48
post #15

Finally, something that purports to have Go-style concurrency that actually provides the equivalent of select{}! Lots of things just provide chans, which are fancy thread-safe queues and are fairly easy to implement. Getting select{} right is the tricky (and powerful) part.

[deleted]

Re: Mill: Go-style concurrency in C

#49
post #15

Finally, something that purports to have Go-style concurrency that actually provides the equivalent of select{}! Lots of things just provide chans, which are fancy thread-safe queues and are fairly easy to implement. Getting select{} right is the tricky (and powerful) part.

Getting the stacks right is also quite difficult. As is moving the goroutines to different threads to allow other goroutines in the same thread to continue running.

Re: Mill: Go-style concurrency in C

#50
post #34

Earlier quoted context omitted.

Go-the-language does not have a preemptive scheduler, just guarantees about how various means of synchronization interact. In fact, Go-the-implementation is only partially preemptive, I believe: in addition to calls into the runtime, calling any function can now be a scheduling event. But if you have a tight loop with no function calls (just arithmetic, perhaps), that goroutine will not yield control. A true preempti…

Not so. http://golang.org/doc/go1.2#preemption [edit: hmm. Possibly I've mis-parsed that.]

I'm pretty sure you parsed that wrong :)
Post reply on HN