Live data from Hacker News

Go's first commit

github.com

11–20 of 41 posts

Re: Go's first commit

#11
post #3

How is this so old? Was Go something that was brewing for a long time prior to its development and debut at Google? Also, Kernighan? Maybe I live under a rock, but I wasn't aware of his involvement.

> How is this so old?

These commits are obviously jokes, probably by Ken Thompson or Rob Pike.

> Was Go something that was brewing for a long time prior to its development and debut at Google?

Its an evolutionary descendant of Bell Labs languages: B -> NewB -> C -> Newsqueak -> Alef -> Limbo -> Go. (The channel-based concurrency model was introduced in this line with Newsqueak)

> Also, Kernighan? Maybe I live under a rock, but I wasn't aware of his involvement.

He is peripherally involved as the co-author of 'The Go Programming Language' book: http://www.gopl.io

Re: Go's first commit

#12

I don't get it. According to the github history there was a hello world commit in 1972, conversion to C in 1974, conversion to ansi-c in 1988, then the next commit was the first go specification in 2008. Git was written in 2005. What did these hello world commits have to do with go? Why are they in the git history?

I have projects on github older than git thanks to cvs2git and svn2git. They can convert history:

https://github.com/sumdog/MplayerBuddy

Re: Go's first commit

#13

I don't get it. According to the github history there was a hello world commit in 1972, conversion to C in 1974, conversion to ansi-c in 1988, then the next commit was the first go specification in 2008. Git was written in 2005. What did these hello world commits have to do with go? Why are they in the git history?

> According to the github history there was a hello world commit in 1972 > Git was written in 2005. Not sure about this specific case, but it isn't uncommon to migrate from another version control system (e.g. Subversion) to Git while maintaining the past history.

Subversion was (to my surprise) only released in 2000, so you'd have to migrate from something even older -- perhaps CVS (released in 1990)? RCS was released in 1982, so you might have migrated from that. SCCS was released in 1972, so they MIGHT have used it, and kept those migrations going. But my guess is they fudged the git history as some weird type of historical documentation of where these languages came from?

Re: Go's first commit

#14
post #8

Much more interesting (first language spec commit): https://github.com/golang/go/commit/18c5b488a3b2e218c0e0cf2a...

I wonder why they got rid of this one > - new methods can be added to a struct outside the package where the struct is declared (need to think through all implications)

I'd have to guess it would be conflict resolution. Imagine two separately imported packages for which you didn't write that add a method in on a type from a third package you didn't write, all with the same name/method signature. How does the compiler you know which of the implementations to use?

Re: Go's first commit

#15

I don't get it. According to the github history there was a hello world commit in 1972, conversion to C in 1974, conversion to ansi-c in 1988, then the next commit was the first go specification in 2008. Git was written in 2005. What did these hello world commits have to do with go? Why are they in the git history?

> According to the github history there was a hello world commit in 1972 > Git was written in 2005. Not sure about this specific case, but it isn't uncommon to migrate from another version control system (e.g. Subversion) to Git while maintaining the past history.

Well, if it was migrated to Subversion from CVS on the day Subversion came out, that gets us back to 2000.

If it was migrated to CVS from RCS on the day CVS was released, that gets us back to 1986.

If it was migrated to RCS from SCCS on the day RCS came out, that gets us back to 1982.

SCCS showed up in 1972, just in time for this commit.

Re: Go's first commit

#16
post #9
post #3

How is this so old? Was Go something that was brewing for a long time prior to its development and debut at Google? Also, Kernighan? Maybe I live under a rock, but I wasn't aware of his involvement.

it's a joke.

No, it's the change history of C, of which Go is a descendant.

Re: Go's first commit

#17
post #8

Earlier quoted context omitted.

I wonder why they got rid of this one > - new methods can be added to a struct outside the package where the struct is declared (need to think through all implications)

I'd have to guess it would be conflict resolution. Imagine two separately imported packages for which you didn't write that add a method in on a type from a third package you didn't write, all with the same name/method signature. How does the compiler you know which of the implementations to use?

Compiler warning.

--- (edit)

The example, while being possible, looks quite improbable.

If it is only a matters of conflicting names, qualified names should be able to resolve the ambiguity; here I suppose you imagine implementing the same interface for the same type differently in two packages.

That a package implements an interface for the same external method for a third-party type is already dubious. Now, you have two packages like this and you want to import them both. That's quite a corner case.

Practically, the last package that is imported could "win" (so you can decide which you want). The compiler has to register all the possible implementations anyway, so a warning is trivial to emit on redefinitions.

----

I'd guess the restriction is to allow compilation of dynamic dispatch on a package basis (think separate compilation) instead of waiting till all possible files have been processed.

Re: Go's first commit

#18
post #8

Earlier quoted context omitted.

I wonder why they got rid of this one > - new methods can be added to a struct outside the package where the struct is declared (need to think through all implications)

I'd have to guess it would be conflict resolution. Imagine two separately imported packages for which you didn't write that add a method in on a type from a third package you didn't write, all with the same name/method signature. How does the compiler you know which of the implementations to use?

Yeah, good point. Though it would be handy if you could at least within your own package add methods to types. But then I guess those methods would be uppercase but not exported, which would be weird.

You can certainly imagine schemes like specifying in the import which types to extend, but that seems complex enough that I'm not surprised a language as radically devoted to simplicity as Go left it out.

Re: Go's first commit

#19
post #3

How is this so old? Was Go something that was brewing for a long time prior to its development and debut at Google? Also, Kernighan? Maybe I live under a rock, but I wasn't aware of his involvement.

Go goes back even further than that. They started developing it on punched cards. Then the 1960s happened and... well you had to be there. Long story short, the project never got completed until 2012.

Re: Go's first commit

#20

I don't get it. According to the github history there was a hello world commit in 1972, conversion to C in 1974, conversion to ansi-c in 1988, then the next commit was the first go specification in 2008. Git was written in 2005. What did these hello world commits have to do with go? Why are they in the git history?

It's a joke.

It's a joke basically saying "First, there was B, and it looked like this. Then, there was C, and it looked like this. Finally, there was Go, a new evolution of our work".

The git dates were clearly faked and created entirely for the purpose of this joke.

If you wanna know how to edit dates, this blog does a slightly better job than the `git-commit` man page: https://alexpeattie.com/blog/working-with-dates-in-git#chang...

Post reply on HN