Hacker News new | past | comments | ask | show | jobs | submit | dahlia's comments login

Better Solution: Combine things that do their own jobs.

It actually is what Flask does.


The one of the biggest advantages of PostgreSQL is GiST (Generalized Search Tree) which is based on the theory of indexability.

> One advantage of GiST is that it allows the development of custom data types with the appropriate access methods, by an expert in the domain of the data type, rather than a database expert.

http://www.postgresql.org/docs/9.1/static/gist-intro.html

> Traditionally, implementing a new index access method meant a lot of difficult work. It was necessary to understand the inner workings of the database, such as the lock manager and Write-Ahead Log. The GiST interface has a high level of abstraction, requiring the access method implementer only to implement the semantics of the data type being accessed. The GiST layer itself takes care of concurrency, logging and searching the tree structure.

> [...]

> So if you index, say, an image collection with a PostgreSQL B-tree, you can only issue queries such as "is imagex equal to imagey", "is imagex less than imagey" and "is imagex greater than imagey". Depending on how you define "equals", "less than" and "greater than" in this context, this could be useful. However, by using a GiST based index, you could create ways to ask domain-specific questions, perhaps "find all images of horses" or "find all over-exposed images".

http://www.postgresql.org/docs/9.1/static/gist-extensibility...

If you are already using PostgreSQL though have not known about this fact, I highly recommend you to learn about GiST. It is the most powerful feature of PostgreSQL as I know.


http://www.pythonmeme.com/about

> I’m a 11 years programer, and I’m a python new guy.

I am impressed.


May I know what packages do you use to build the site?


It's on the google app engine.


me too, seriously!


+1


It reminds me of the truth that speed is the best user experience.


> Node sucks for general web apps because you have to program everything asynchronously.

To be fair, the exact problem is not async itself, but forcing CPS (continuation-passing style) for serial routines. For example, gevent and eventlet use greenlets (coroutines for Python) to avoid unnecessary callbacks in serial routines.


I'm curious -- how would the author's example look using greenlets?


No. What Katz really needs is not blocks, but RAII. See Python’s with statement or C#’s using statement.


You can do RAII using `with` or `using` blocks, but you can't control execution with those like you can with blocks - the body of the `with` or `using` statement will always execute once. You can't prevent it from executing (unless you throw an exception), and you can't re-execute it with different values in the `as` clause.


What advantage would we get by only having RAII over full block syntax? (Not sure, you can do using(some-other-method(file)) in C#?)


It reminds me again that Dropbox is hard to beat.


It’s an evil thing originated from JavaScript. PHP always has borrowed evil things from other languages. As a result, PHP keeps getting more evil by the version.


I really love Bitbucket (over GitHub!), but it seems too late for me.


BitBucket makes it super easy to migrate from GitHub to them.


The most strange (but interesting) static site generator I’ve ever seen is: http://mearie.org/about/mearie#technical-detail . It uses Apache’s mod_negotiation very well to support internationalized contents. (That site provides English, Korean and Japanese version for most contents.) You can read the source code from here: http://hg.mearie.org/mearie.org/current


I am the author of that website, and I must say that that's basically a huge mess with Makefile, Apache, Mako, Pandoc and Mercurial. ;) They served me well however, and with services like Disqus I think most personal websites can be made of static contents entirely. (Well, I do not use Disqus but I do use Tumblr with a theme synchronized to my main website.) Someday I'll try to package my solution, but that is an another story...


wow that is strange. i like the mako teplating though.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: