Well, the point is to self-study, so I'm reluctant to share my code because people will wind up crippling themselves if they fall back on whatever solutions I came up with. If they read my code before attempting their own solution, then they risk overlooking a simpler solution or one better suited for their own purposes. But... I guess I'll share a side-by-side go/arc comparison of lab 1. Lab 1 itself is pretty simple; most of the work was to port some of go's primitives to arc, like channels.
(Note: These html pages are rendered incorrectly on mobile. In particular, the spacing is wrong due to vimscreenshot not inserting instead of actual spaces. Sorry about that. Try viewing these links from a desktop computer instead.)
I was interested in seeing how much code can be eliminated by using Arc instead of Go. Turns out: quite a lot. The server is almost 200 lines of Go code, but about 65 of Arc. The client is almost 120 lines of Go, about 35 of Arc. The unit tests are pretty similar in length (~480 vs ~410) but the Arc version is easier for me to read since there's less visual noise.
(Note: These html pages are rendered incorrectly on mobile. In particular, the spacing is wrong due to vimscreenshot not inserting instead of actual spaces. Sorry about that. Try viewing these links from a desktop computer instead.)
https://dl.dropboxusercontent.com/u/231528979/arc/html/index...
Lab 1 in Go:
client.go https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
server.go https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
tests https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
output https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
Lab 1 in Arc:
client.arc https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
server.arc https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
tests https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
output https://dl.dropboxusercontent.com/u/231528979/arc/html/locks...
Git commit log: https://dl.dropboxusercontent.com/u/231528979/arc/html/log.h...
All diffs between my local codebase and the stock arc 3.1: https://dl.dropboxusercontent.com/u/231528979/arc/html/all-d...
I was interested in seeing how much code can be eliminated by using Arc instead of Go. Turns out: quite a lot. The server is almost 200 lines of Go code, but about 65 of Arc. The client is almost 120 lines of Go, about 35 of Arc. The unit tests are pretty similar in length (~480 vs ~410) but the Arc version is easier for me to read since there's less visual noise.
Anyway it was fun.