HNHacker News
TopNewBestAskShowJobs

bremac

229 karma · joined December 19, 2010

submissionscomments
bremac··on PostgreSQL Data Migration Tips
I'm not sure I understand the purpose of the loop in the last example. AFAIK top-level plpgsql statements (including DO blocks run in psql) execute in a single transaction, so it seems like you end up slowly locking the entire table, as the transaction won't commit until the loop completes. (I learned this the hard way by trying to "batch"-update a table with tens of millions of rows in production.)

The normal way to handle batch updates is to perform the loop outside of postgresql, so that each batch is in its own transaction.

bremac··on Replicated PostgreSQL with pgpool2
Master / slave replication also has a synchronous mode, so lack of consistency isn't an issue. Either way, you still need to do some work on top of replication in order to get automatic failover.
bremac··on LibreSSL at BSDCan
It should be available from https://www.youtube.com/user/osbootcamp/videos at some point in the next few days.
bremac··on I Was Just Told “You would not have made it through the weekend”
As someone who has had an infection requiring dental care: dental surgery is covered by the Canadian provinces if it is medically necessary. On the other hand, preventative care and cosmetic surgeries are not covered.
bremac··on New extension to Haskell -- data types and polymorphism at the type level
Interesting. The extensions to the type system remind me of Ωmega (http://code.google.com/p/omega/), though without higher-order kinds.

EDIT: Turns out "Programming in Omega" is cited by the section on related work. No wonder the mention of proving red-black trees using type-level computation seemed familiar...

bremac··on printf("goodbye, Dennis");
Adding a newline into a line buffer (which is a user-space buffer) flushes the buffered data up to and including the newline. fflush also flushes a user space buffer. Also, the "for those" implies I'm talking about someone else, not myself.
bremac··on printf("goodbye, Dennis");
printf prints to standard output, which is line-buffered by default when reading from a tty on UNIX variants. This can lead to strange problems for those who try to use it to track which parts of a program are being executed, as demonstrated by the following program with an infinite loop:

  #include <stdio.h>
  int main(int c, char **v) {
    printf("Hello\nJello");
    while(1) ;
    return 0;
  }
bremac··on A preview of Gmail’s new look
It's closer, but it still increases the screen real-estate used by some elements significantly - for example, the line item for each email displayed in the inbox has grown from 23px tall to 29px tall in the redesign. Maybe I'm in the minority, but I prefer higher information density.
bremac··on C'mon, stop writing Java for Android
Perhaps http://ropas.snu.ac.kr/~bruno/papers/TypeClasses.pdf is the paper that you're looking for?
← PreviousPage 2 of 2