HNHacker News
TopNewBestAskShowJobs

robfig

1,967 karma · joined December 30, 2010

[ my public key: https://keybase.io/robfig; my proof: https://keybase.io/robfig/sigs/g9mGTjjKb-jpdl5oFPjHuGZfkPfsJwVoHy2AIXRia5Q ]
submissionscomments
robfig··on California To Hit Startup Founders with Big Retroactive Tax Bills
I was not under the impression that public sector employees are paid significantly less than private sector. This seems to be the most reputable source I could find:

http://www.cbo.gov/sites/default/files/cbofiles/attachments/...

robfig··on Unveiling Play 2.1 JSON API Bonus: JSON Inception with Scala 2.10 macros
What does Play 2 enable that was not possible or straightforward in Play 1?

(For Java, that is)

robfig··on Go is PHP for the Backend
My least favorite feature is block scoping combined with the := operator.

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.
robfig··on dl.google.com now served by Go
Care to contribute some of those to Revel? :)

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.

robfig··on dl.google.com now served by Go
LevelDB in Go: http://code.google.com/p/leveldb-go/

It provides in-memory and file-backed implementations.

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
It looks like he takes the same approach as Revel. From the comments:

    // 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!
robfig··on Revel, high-productivity Go web framework modeled on Play Framework
AGREED!

Will certainly repost when it gets a little further along.

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Done
robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Yep, having the hot-compile functionality was a major point of this.

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)

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Makes sense, thanks.

(I've never used the "rev" unix command before, so I didn't think much of it)

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Ah, this is because the app uses go-sqlite3, which you haven't gotten in your local repo yet. I need to fix the command line to download all dependencies first.

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
robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Apologies -- the right command is now:

    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.
robfig··on Revel, high-productivity Go web framework modeled on Play Framework
I am definitely looking to develop a good story for ORM. However, I don't think it has to be in the very core of the framework -- allowing people to plug a different one (or not use one at all) is important.

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).

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
I did not package an "official" ORM with Revel because I did not feel like there was a clear choice yet. (And making an ORM is too big a challenge to bite off in addition :)

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.

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
I'm working on adding a "rev package" command to the command-line tool. It will create a zip file of the app and revel source directories, along with a script to run the app.

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.

robfig··on Revel, high-productivity Go web framework modeled on Play Framework
Revel author here.

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.

robfig··on Who inherits your iTunes library when you die?
Buy CDs and rip them.
robfig··on Octane minus V8
Based on that reasoning, seems like IE should fall into that category too.
robfig··on The Tablet Problem
Google already classifies sites as porn or not-porn. They could make a simple API or data file available and the browsers could use it.
robfig··on My biggest problem with Vim
I can't help feeling sorry for all these poor people that use Emacs with their control key in the wrong spot (bottom left).

Remap Control to Caps Lock and there are no ergo issues at all.

robfig··on Meteor – The next Ruby-on-Rails?
So they are betting that enterprises are going to start using Node.js and Mongo for their applications?

I remain skeptical.

robfig··on Let’s Be Less Productive
I could be mistaken, but part of the assumption here seems to be that everyone is equally good at their job. It seems far better to have the incredible teachers leveraged as far as possible (to teach the most number of students while still remaining effective) rather than having everyone chip in their 21 hours and go home. Since this applies in every industry, it seems to explain why businesses prefer to have fewer (but more highly paid) employees.

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.

robfig··on Coursekit is now Lore
Really impressive!! Looks like it's done entirely in HTML/CSS/Coffeescript.

I have to admit surprise that they would put so much effort into something that is not their product, though.

robfig··on The Underpants Project
Can anyone explain what use-case this technique enables that is not served by cookie tracking?

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..

robfig··on Why Node.js streams are awesome
Play! uses Apache HttpClient under the covers. I haven't tried it experimentally, but the documentation explicitly says that it's streaming.
robfig··on Everything You Know (about Parallel Programming) Is Wrong
I was wondering the same thing. Clearly Google et al has some success with parallel computation without giving up determinism.

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.

robfig··on No matter how much "karate" you know, someone else will always know more.
I think this is just supply-demand of the current labor market. There are enough lawyers to go around, but not even close to enough good developers. I think it will continue to be that way for a long time
robfig··on Why Node.js streams are awesome
Using the Play! Framework (Java):

  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)

robfig··on Why Node.js streams are awesome
What is the connection between evented and streaming? It seems like a thread-per-request server would have to do exactly the same thing (except, they would not have to worry about giving back their event loop thread).
robfig··on How I built a business in a weekend (Or, the benefits of shared workspaces)
Is texting really easier for people than hand writing on a sheet of dead tree? Kids these days..

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.

← PreviousPage 2 of 4Next →