Live data from Hacker News

Grappling with Go

blog.ntpsec.org

1–10 of 118 posts

Re: Grappling with Go

#3
> I checked this by writing loccount as a parallelized tree traversal. Each file in the tree gets a goroutine spawned to count its lines; the threads run in parallel and as each finishes its work it stuffs a statistics block into a channel.

In the past, this approach would blow up because Go would spawn a kernel thread for each blocking system call that was performed. I had to use a rate limiting channel to constrain the number of kernel threads. Is that still the state of affairs?

Re: Grappling with Go

#4

> I checked this by writing loccount as a parallelized tree traversal. Each file in the tree gets a goroutine spawned to count its lines; the threads run in parallel and as each finishes its work it stuffs a statistics block into a channel. In the past, this approach would blow up because Go would spawn a kernel thread for each blocking system call that was performed. I had to use a rate limiting channel to constrain…

Yes, that is still the case. Cgo calls work the same. Note that the most common syscalls get special treatment though: file and network I/O use a thread pool and epoll/kqueue respectively.

Re: Grappling with Go

#5
> It’s unprecedented for a language to be both garbage-collected and as squarely aimed at systems programming as Go is, because systems programmers have trouble tolerating the stop-the-world pauses that happen when the GC runs.

Only for those that never heard of Mesa/Cedar, Algol-68, CPL, Ada, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Oberon-07, C+@, Sing#, System C#, D.

Re: Grappling with Go

#6
post #5

> It’s unprecedented for a language to be both garbage-collected and as squarely aimed at systems programming as Go is, because systems programmers have trouble tolerating the stop-the-world pauses that happen when the GC runs. Only for those that never heard of Mesa/Cedar, Algol-68, CPL, Ada, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Oberon-07, C+@, Sing#, System C#, D.

What's the most successful operating system created in one of those languages?

Re: Grappling with Go

#7
post #6
post #5

> It’s unprecedented for a language to be both garbage-collected and as squarely aimed at systems programming as Go is, because systems programmers have trouble tolerating the stop-the-world pauses that happen when the GC runs. Only for those that never heard of Mesa/Cedar, Algol-68, CPL, Ada, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Oberon-07, C+@, Sing#, System C#, D.

What's the most successful operating system created in one of those languages?

Probably Oberon, which was used during several years at ETHZ across the IT department of the university, including the secretary personal.

Was also the source for many of Plan 9 UI ideas.

What is most successful operating system created in Go or Rust?

Re: Grappling with Go

#9
post #7
post #6

Earlier quoted context omitted.

What's the most successful operating system created in one of those languages?

Probably Oberon, which was used during several years at ETHZ across the IT department of the university, including the secretary personal. Was also the source for many of Plan 9 UI ideas. What is most successful operating system created in Go or Rust?

For Rust, probably Redox (https://www.redox-os.org/). Then there's http://os.phil-opp.com/ and https://intermezzos.github.io/book/

For Go, I don't know any (but might be wrong, googling did not turn up anything).

Re: Grappling with Go

#10
post #5

> It’s unprecedented for a language to be both garbage-collected and as squarely aimed at systems programming as Go is, because systems programmers have trouble tolerating the stop-the-world pauses that happen when the GC runs. Only for those that never heard of Mesa/Cedar, Algol-68, CPL, Ada, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Oberon-07, C+@, Sing#, System C#, D.

Ada is (usually) not garbage-collected, precisely due to the unpredictable pauses.
Post reply on HN