I rewrote my blog in Go
41–50 of 77 posts
Re: I rewrote my blog in Go
#42"I am now loading less static assets. I removed the Disqus comments and the many many lines of CSS from the old site and replaced it with only a couple of lines of CSS alongside a CDN-hosted copy of Twitter Bootstrap. Finally, the Go site is deployed to a free instance of Heroku and the MongoDB hosted on a developer version of Mongolab, while the old Django site was hosted on a Webfaction shared server." So...the Pyt…
Did you read the next sentence? "All these things influence the validity of a direct speed comparison between the two versions, but the speed improvement is nevertheless too overwhelming to attribute only to these small changes. And in fact, many of these changes might even have negatively impacted the speed of the new version in exchange for saving on the monthly bills."
Without showing how many seconds were spent loading Disqus, we don't know how much of the load time improvement was based on eliminating Disqus vs. the switch to Go.
Based on experience I'm guessing the lion's share of the gain is due to eliminating Disqus.
Re: I rewrote my blog in Go
#43"I am now loading less static assets. I removed the Disqus comments and the many many lines of CSS from the old site and replaced it with only a couple of lines of CSS alongside a CDN-hosted copy of Twitter Bootstrap. Finally, the Go site is deployed to a free instance of Heroku and the MongoDB hosted on a developer version of Mongolab, while the old Django site was hosted on a Webfaction shared server." So...the Pyt…
>"All these things influence the validity of a direct speed comparison between the two versions"
I hope the author wasn't trying to say, "Go is better always forever." I read it more as, "hey I rebuilt my site in Go, and it's fast." Go has potential - I'll be excited to see what people come up with.
Re: I rewrote my blog in Go
#44 func getRoutes() map[string]customHndlrFnc {
r := make(map[string]customHndlrFnc)
//routes
r["/route_to_url"] = handler
r["/route_to_url2"] = handler2
return r
}
for key, value := range getRoutes() {
http.HandleFunc(key, handlerWrapper(value))
}
All of my routes for this sample were get requests but it could easily be extended.Re: I rewrote my blog in Go
#45"I am now loading less static assets. I removed the Disqus comments and the many many lines of CSS from the old site and replaced it with only a couple of lines of CSS alongside a CDN-hosted copy of Twitter Bootstrap. Finally, the Go site is deployed to a free instance of Heroku and the MongoDB hosted on a developer version of Mongolab, while the old Django site was hosted on a Webfaction shared server." So...the Pyt…
Why not just measure/compare the response time of the single request that fetches the (presumably) HTML response, and leave all of the ancillary asset delivery and script execution as an aside? If this is about Go versus Python, all I care about is the portion where those are actually involved. And it would be easy to see in the network panel of the developer tools window in Chrome or Firefox.
Of course, the hosting environment also changed, so... there's that still.
Re: I rewrote my blog in Go
#46Earlier quoted context omitted.
Or Ruby on Rails, Arc, or whatever is the flavour of the year. Additionally it is funny to see the usual comparisons of young developers discovering execution and compilation speeds already possible in 16 bit systems.
I was surprised at how amazed people on one of the recent Go threads was with Go compilation speeds, given that gcc delivers similar compilation speeds for C code per line of code for me on my old, slow home server. As for 16 bit systems, I'd love to see a comparison with the Turbo Pascal compiler, for example, on modern hardware. Maybe my memory is deceiving me and the program sizes just weren't comparable, but it s…
I'm not sure about C, but it's definitely the case that Go compiles magnitudes faster than C++, for any reasonable sized project. For example, the ~200k lines of Go standard library compiles in about 14 seconds on my workstation, while random C++ libraries frequently take much longer (just my anecdotal impression from waiting on "brew install").
Re: I rewrote my blog in Go
#47How did you achieve a 16 second response time for your blog ? What the heck were you doing?
Re: I rewrote my blog in Go
#48Earlier quoted context omitted.
I was surprised at how amazed people on one of the recent Go threads was with Go compilation speeds, given that gcc delivers similar compilation speeds for C code per line of code for me on my old, slow home server. As for 16 bit systems, I'd love to see a comparison with the Turbo Pascal compiler, for example, on modern hardware. Maybe my memory is deceiving me and the program sizes just weren't comparable, but it s…
Is this true? I'm not sure about C, but it's definitely the case that Go compiles magnitudes faster than C++, for any reasonable sized project. For example, the ~200k lines of Go standard library compiles in about 14 seconds on my workstation, while random C++ libraries frequently take much longer (just my anecdotal impression from waiting on "brew install").
Re: I rewrote my blog in Go
#49Earlier quoted context omitted.
I thought the flavor this week was Julia. or Elixir. We are so fickle.
Neither has had many posts on HN. Nothing compared to Go or Node or RoR back in the day, anyway.
Re: I rewrote my blog in Go
#50OT but please don't put the solutions for Project Euler problems on GitHub, it is directly against the rules ( http://projecteuler.net/about , section "I learned so much solving problem XXX so is it okay to publish my solution elsewhere?"). You can put the solutions in the dedicated thread on the site though if you want to share :)
First, just a note, you can only see that section if you're logged in. Second, I disagree that it is 'directly against the rules' - no where there does it say specifically that you must not post solutions elsewhere. I think the intent is there - but if someone simply cribs off another answer somewhere, they're not really learning anyway and are really robbing themselves. Project Euler is altruistic anyway and there's…