Russ Cox | 09fe283 | 2009-10-22 00:13:36 -0700 | [diff] [blame] | 1 | <!-- The Go Programming Language --> |
| 2 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 3 | <script> |
| 4 | // On the frontpage we hide the header and navigation elements that other |
| 5 | // pages have. |
| 6 | document.getElementById('generatedHeader').style.display = 'none'; |
| 7 | document.getElementById('nav').style.display = 'none'; |
| 8 | </script> |
| 9 | |
Andrew Gerrand | 7190fdd | 2010-03-20 11:42:57 +1100 | [diff] [blame] | 10 | <!-- begin blog post widget JS/styles --> |
Andrew Gerrand | cd5191f | 2010-04-27 10:24:17 +1000 | [diff] [blame] | 11 | <script src="http://www.google.com/jsapi" type="text/javascript"></script> |
Andrew Gerrand | 7190fdd | 2010-03-20 11:42:57 +1100 | [diff] [blame] | 12 | <script type="text/javascript"> |
Andrew Gerrand | 28c6305 | 2010-04-27 19:27:32 +1000 | [diff] [blame] | 13 | function loadFeed() { |
| 14 | var url = "http://blog.golang.org/feeds/posts/default"; |
| 15 | var divId = "blogFeed"; |
| 16 | var feed = new google.feeds.Feed(url); |
| 17 | feed.setNumEntries(8) |
| 18 | feed.load(function (result) { |
| 19 | var container = document.getElementById(divId) |
| 20 | if (result.error) { |
| 21 | container.innerHTML = "Error loading feed."; |
| 22 | return; |
| 23 | } |
| 24 | container.innerHTML = ""; |
| 25 | var entries = result.feed.entries; |
Andrew Gerrand | bab711b | 2010-07-30 10:36:13 +1000 | [diff] [blame] | 26 | console.log(entries); |
Andrew Gerrand | 28c6305 | 2010-04-27 19:27:32 +1000 | [diff] [blame] | 27 | for (var i=0; i<entries.length; i++) { |
| 28 | var a = document.createElement("a"); |
| 29 | a.setAttribute("href", entries[i].link); |
| 30 | a.appendChild(document.createTextNode(entries[i].title)); |
| 31 | container.appendChild(a); |
| 32 | } |
Andrew Gerrand | 7190fdd | 2010-03-20 11:42:57 +1100 | [diff] [blame] | 33 | }); |
| 34 | } |
| 35 | google.load("feeds", "1"); |
Andrew Gerrand | 28c6305 | 2010-04-27 19:27:32 +1000 | [diff] [blame] | 36 | google.setOnLoadCallback(loadFeed); |
Andrew Gerrand | 7190fdd | 2010-03-20 11:42:57 +1100 | [diff] [blame] | 37 | </script> |
| 38 | <!-- end blog post widget JS/styles --> |
| 39 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 40 | <table style="padding-top: 1em; padding-bottom: 2em;"> |
| 41 | <tr> |
| 42 | <td> |
Adam Langley | 51c1bd2 | 2009-11-05 12:18:54 -0800 | [diff] [blame] | 43 | <img style="padding-right: 1em;" src="/doc/go-logo-black.png"> |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 44 | </td> |
| 45 | <td> |
Robert Griesemer | 3a94e8c | 2009-11-06 12:52:04 -0800 | [diff] [blame] | 46 | <div><span style="font-size: 2em; font-weight: bold;">a systems programming language</span><br><span style="font-size: 1.5em;">expressive, concurrent, garbage-collected</span></div> |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 47 | </td> |
| 48 | </tr> |
| 49 | </table> |
| 50 | |
Andrew Gerrand | bab711b | 2010-07-30 10:36:13 +1000 | [diff] [blame] | 51 | <div id="fp-videos"> |
| 52 | <h1>Go videos</h1> |
| 53 | <div class="video"> |
| 54 | <a href="http://www.youtube.com/watch?v=jgVhBThJdXc"><img src="/doc/video-snap-io.jpg"></a> |
| 55 | <div class="title">"Go Programming"</div> |
| 56 | <div class="subtitle">Google I/O Tech Talk</div> |
| 57 | </div> |
| 58 | <div class="video"> |
| 59 | <a href="http://www.youtube.com/watch?v=wwoWei-GAPo"><img src="/doc/video-snap-fastcompiles.jpg"></a> |
| 60 | <div class="title">"Fast Compiles"</div> |
| 61 | <div class="subtitle">Go Promotional Video</div> |
| 62 | </div> |
| 63 | <div class="video"> |
| 64 | <a href="http://www.youtube.com/gocoding"><img src="/doc/video-snap-gocoding.jpg"></a> |
| 65 | <div class="title">Go Youtube Channel</div> |
| 66 | <div class="subtitle">Screencasts and more</div> |
| 67 | </div> |
| 68 | <a class="more" href="/doc/go_learning.html#videos_talks">More videos and talks.</a> |
| 69 | </div> |
| 70 | |
| 71 | <div id="frontpage"> |
| 72 | |
| 73 | <div id="blog"> |
| 74 | <h1>From the <a href="http://blog.golang.org">Go Blog</a>:</h1> |
| 75 | <div id="blogFeed">Loading...</div> |
| 76 | </div> |
| 77 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 78 | <p style="font-size: 1.5em; font-weight: bold;">Go is …</p> |
| 79 | |
| 80 | <h3>… simple</h3> |
| 81 | <pre class="code"> |
| 82 | package main |
| 83 | |
| 84 | import "fmt" |
| 85 | |
| 86 | func main() { |
Rob Pike | d5717d2 | 2009-11-05 13:39:00 -0800 | [diff] [blame] | 87 | fmt.Printf("Hello, 世界\n") |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 88 | }</pre> |
| 89 | |
Andrew Gerrand | bab711b | 2010-07-30 10:36:13 +1000 | [diff] [blame] | 90 | <p>Go has a small, simple feature set, making it easy to learn.</p> |
| 91 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 92 | <h3>… fast</h3> |
| 93 | |
Rob Pike | d5717d2 | 2009-11-05 13:39:00 -0800 | [diff] [blame] | 94 | <p> |
| 95 | Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code. |
| 96 | </p> |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 97 | |
Andrew Gerrand | bab711b | 2010-07-30 10:36:13 +1000 | [diff] [blame] | 98 | <h3>… concurrent</h3> |
| 99 | |
| 100 | <p> |
| 101 | Go promotes writing systems and servers as sets of lightweight communicating |
| 102 | processes, called goroutines, with strong support from the language. Run |
| 103 | thousands of goroutines if you want—and say good-bye to stack overflows. |
| 104 | </p> |
| 105 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 106 | <h3>… safe</h3> |
| 107 | |
Rob Pike | d5717d2 | 2009-11-05 13:39:00 -0800 | [diff] [blame] | 108 | <p>Go is type safe and memory safe. Go has pointers but no pointer arithmetic. |
| 109 | For random access, use slices, which know their limits.</p> |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 110 | |
Rob Pike | d5717d2 | 2009-11-05 13:39:00 -0800 | [diff] [blame] | 111 | <h3>… fun</h3> |
| 112 | |
| 113 | <p> |
| 114 | Go has fast builds, clean syntax, garbage collection, |
| 115 | methods for any type, and run-time reflection. |
| 116 | It feels like a dynamic language but has the speed and safety of a static language. |
| 117 | It's a joy to use. |
| 118 | </p> |
| 119 | |
Rob Pike | c765c09 | 2009-11-06 22:48:05 -0800 | [diff] [blame] | 120 | <h3>… open source</h3> |
| 121 | |
| 122 | <p> |
Rob Pike | d10f154 | 2009-11-08 22:02:15 -0800 | [diff] [blame] | 123 | <a href="/doc/install.html">Go for it</a>. |
Rob Pike | c765c09 | 2009-11-06 22:48:05 -0800 | [diff] [blame] | 124 | </p> |
| 125 | |
Adam Langley | b9ec2ad | 2009-11-03 19:59:45 -0800 | [diff] [blame] | 126 | </div> |