http://www.cbo.gov/sites/default/files/cbofiles/attachments/...
1,967 karma · joined December 30, 2010
http://www.cbo.gov/sites/default/files/cbofiles/attachments/...
(For Java, that is)
For example, this works:
var x Foo
x, err := doSomething()
if err != nil {
...
}
this does not: var x Foo
if x, err := doSomething(); err != nil {
...
}
This pattern (or some variant) introduces more bugs in my code than I would like to admit.Out of curiosity, why do you prefer Mustache to Go templates? They seem extremely similar, with Go templates being slightly more powerful due to easy-to-add template funcs. Both are essentially data-driven though.
It provides in-memory and file-backed implementations.
// Devweb is a simple environment for developing a web server.
// It runs its own web server on the given address and proxies
// all requests to the http server program named by importpath.
// It takes care of recompiling and restarting the program as needed.
And, he uses "go build" to build the program: out, err := exec.Command("go", "build", "-o", "prox.exe", rootPackage).CombinedOutput()
It appears to do more than Revel does, though -- I will look at it more closely to see what extra it provides. Wish I had seen this before!Will certainly repost when it gets a little further along.
Here is a description of how it works: http://robfig.github.com/revel/manual/howrevelworks.html
Basically: In development mode, it runs a proxy (called the "harness") that watches your source for changes and recompiles/restarts your server on the next request, if necessary, using the "go build" tool. The go build process is incremental, so in theory should only recompile packages that have changed (and those that depend on them)
(I've never used the "rev" unix command before, so I didn't think much of it)
You can fix it manually with:
go get github.com/mattn/go-sqlite3
Also, I believe that the go command line figures out the dependencies for you, so this should get everything you need: go get github.com/robfig/revel/samples/booking bin/rev run github.com/robfig/revel/samples/booking
Changed in last two commits and I was a laggard in updating the site. Updating now, thanks.I chose Play! (1.x) because it is by far the most productive development environment I have ever used (especially for boring business admin pages). (Out of Django, JSP, Lift, GSE/GXP, Jetty, etc).
I think that GORP is the current leader (https://github.com/coopernurse/gorp), and it is pretty easy to make a plugin/interceptor that initializes it and starts/ends transactions before / after requests.
I am planning on adding an example of this to the samples in the near future.
It needs the source directories since templates and assets are kept within them. Also, it is frequently useful to have access to the source in production, e.g. for sending exception emails.
The goal is to make deployment to a server without a Go environment very easy.
EDIT: To answer your original question: in the current version, you must have a working Go installation to run your Revel app. Then: "rev run import/path/to/app prod". I am pretty sure that it will not work on GAE -- I realize this is an important/valuable use case and will investigate it in the future.
Just wanted to alert people that this is not ready for prime time yet. I have a sizable list of items to get through before I was planning to publicize. For example, the packaging/deployment is not there yet (working on that presently). Also, I have only tested it on OSX (in theory, it should be cross platform, but I'm sure there are bugs to smoke out).
That said, please feel free to give it a try and open issues for anything you find.
Remap Control to Caps Lock and there are no ergo issues at all.
I remain skeptical.
In short, this would have happened if it was in anyone's interest. The employee wants to work more to earn more. The employer gets value out of consolidating production to the most productive.
I have to admit surprise that they would put so much effort into something that is not their product, though.
Or is the point that disabling cookies is not sufficient to avoid being tracked? Everyone has cookies enabled (or many sites don't work), so if that's all it is, nbd..
Thinking about how the cloud model (collaborating services via RPC) maps to a single machine -- I guess that looks like a actor / message passing model where each process gets its own core or something.
Plenty of programming languages make this sort of thing straightforward -- (I'm most familiar with Go, where it is absolutely trivial).
To me, it looks like the industry is actually very well poised to handle to multi-core onslaught, without requiring some kind of fundamental rethink like nondeterminism.
public static void myEndpoint() {
HttpResponse resp = WS.url("url-of-file").get();
InputStream is = resp.getStream();
renderBinary(is);
}
Or am I missing something?(EDIT: This doesn't do the zipping or multiple files -- I guess I need a ZipOutputStream to take it the rest of the way)
Personally I would much prefer writing over texting a random number (with a follow-up text for my email), but I guess an advantage is that it avoids queues at the sign-in sheet.