View main.go
package main
import (
"encoding/json"
"fmt"
"io"
"log"
)
func main() {
View app.go
package markov
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"io"
"math/rand"
"net/http"
View main.go
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"strconv"
"strings"
View background.js
// TODOs:
// - manage queue of selections to read, "read to me now" or
// "read to me next"
// - highlight current word/sentence
// - intelligently detect blocks of text and ignore ads, photo
// captions, etc., https://mercury.postlight.com/web-parser/
// - stop speaking when the text's tab is closed
var currentRate = 1; // Default rate until we consult settings.
var currentText = '';
View gzip.js
/*
The MIT License
Copyright (c) 2011 T. Jameson Little
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View .gitignore
main.prof
main
*.txt
View Post.md

More Powerful Synchronization in Go, using Channels

Here's a common predicament: you have a value, e.g., some string or number or struct, that can be read and written by many goroutines, and you want to make sure readers and writers don't collide -- that readers get the most recently written value, and no other, and that writers don't write the value while a reader is reading it.

You may have an idea in your head about how you would approach this problem, and your idea may be completely correct. But I want to try to level up your Go-fu

View Privacy.md

Top9 Privacy Policy

None of your information is stored anywhere outside of the computer or phone used to create the resulting image. No authorization is shared with any other service or user.

View entries.json
[
{
"id" : "73F3F654-9EC5-4876-8BF6-474E22029A49",
"assets" : [
{
"url" : "http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/comp_GL_G004_C010_v03_6Mbps.mov",
"accessibilityLabel" : "Greenland",
"type" : "video",
"id" : "D388F00A-5A32-4431-A95C-38BF7FF7268D",
"timeOfDay" : "day"
View gist:da478771afaf82997127f9c6e5589257
if got, want := foo.Id, "expected-id"; got != want {
t.Errorf("Foo(): got %q, want %q", got, want)
}