HNHacker News
TopNewBestAskShowJobs

coleifer

2,485 karma · joined November 3, 2009

submissionscomments
coleifer··on Python Patterns (2013)
I'm the author of Peewee and I've been running my blog with Flask, Peewee, gevent and sqlite. It's a very low-impact combination, lightweight and fun to use, although I'm a bit biased.
coleifer··on The origins of the class Meta idiom in python
Nice post! I think to put it concisely, you could say it provides namespacing. Unfortunately, when your classes have inheritance, you end up hand-implementing inheritance for the Meta attributes. I've gone back and forth on what's better, but Meta seems here to stay.
coleifer··on Hacking Infix Operators into Python with Decorators
2005: http://code.activestate.com/recipes/384122-infix-operators/
coleifer··on How to Use Varnish Cache as Secured AWS S3 Gateway
Lame of you not to link my post from yesterday about putting nginx in front of s3. This post seems clearly to be in response to mine.

http://charlesleifer.com/blog/nginx-a-caching-thumbnailing-r...

coleifer··on How to Use Varnish Cache as Secured AWS S3 Gateway
Not at all, I would bet that it was written in response to my post.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
Yeah, I'm pretty sure I linked to your post. I was going to use your script before I realized I could do everything with plain old nginx.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
That's a good point. The nginx module can rotate, but I don't know of any built-in support for rotation with respect to exif. You could also use lua and the lua imagemagick bindings and probably see much better performance though.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
If all you need is crop or resize, might as well use nginx in my opinion.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
Exactly, thanks frank! :P
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
Thank you, I've updated the post.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
Thanks, I've updated my post to append the secret key.
coleifer··on Nginx: a caching, thumbnailing, reverse proxying image server
I stopped using varnish because, after all, my site is just a blog and Nginx is just fine for my needs. It has a single backend server, so there's no load-balancing. Basically, I was already using Nginx to serve static files, and my caching logic was so simple it was actually easier to move it into Nginx.
coleifer··on Sqlite browser
I wrote a little web based sqlite database manager: https://github.com/coleifer/sqlite-web
coleifer··on RocksDB vs. the world
I'd be very interested in seeing a comparison between storage engines like rocks, wiredtiger, leveldb, sqlite4-lsm, heck even kyotocabinet and berkeleydb. The comparison would describe what workload each storage engine optimizes for, what tradeoffs were made, and a basic feature matrix (multiple process? transactions / nested transactions? etc).

There are a lot of options out there but beyond pure speed or latency measures, its hard to get a high level understanding of what distinguishes one storage engine from the next.

coleifer··on Dataset: databases for lazy people
This exists for peewee orm as well:

http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#d...

coleifer··on Records: Python library for making raw SQL queries to Postgres databases
Thanks for the kind words!
coleifer··on Records: Python library for making raw SQL queries to Postgres databases
Peewee orm supports json, jsonb, hstore, arrays, full text search, server side cursors...
coleifer··on Records: Python library for making raw SQL queries to Postgres databases
Since he's not using server side cursors, I believe all rows are pulled into ram when the query executes.
coleifer··on Desktop Neo – rethinking the desktop interface for productivity
What is the pretentious fappery?! Use a tiling window manager and get over it.
coleifer··on How to choose an in-memory NoSQL solution: Performance measuring
Sqlite is always a good option if you want in-memory and SQL. Kyotocabinet supports a number of in-memory database types, as does its networked counterpart kyototycoon. BerkeleyDB can be effectively run in memory if you size your cache right, and as a bonus you can build bdb with a sqlite frontend.

Anyway, cool post. For more lua, there's openresty (nginx and lua), and kyototycoon supports lua scripts as well.

coleifer··on Show HN: Braindump, a simple note platform to organize your life
I use it all the time, something like 3000 notes now! I integrated a bookmarking app with it (search for bookmarking on my blog if you're curious) so it's a mix of bookmarked pages, notes, to do lists, reminders, and recently I've been tracking my dreams with it. Fun stuff!
coleifer··on Show HN: Braindump, a simple note platform to organize your life
This looks very similar to the app I blogged about in a series of "Saturday morning hacks" posts. That app did notes, tags, to do lists, email reminders, and used sqlites full text search extension to provide high quality search. Also used markdown and oembed for rich media magic!

http://charlesleifer.com/blog/saturday-morning-hack-a-little...

coleifer··on LittleD – SQL database for IoT, can run queries in 1KB
This looks like a very cool project. I cloned it and generated the docs, and while the code is certainly well-document, I didn't see any type of high-level narrative or public APIs. Was hoping to see at least a "littleD.h" or something, but it seems you have to do some source diving or look at the tests to figure out how to use this library.
coleifer··on Ahmed Mohamed: 'Clock boy' seeks $15m from city and school
Schools are already hurting so badly from frivolous lawsuits and oversensitive, opportunistic people. Schools are one of the few institutions trying to actually do some good. Don't kick them when they're already down.
coleifer··on Reasons to love SQLAlchemy
A lot of folks may not know, but Peewee has a large "contrib" package full of db-specific extension modules and other neat things called `playhouse`. If you use `pip` to install peewee or clone it from GitHub, the `playhouse` modules are included. So while yes, Peewee is a single module, there are lots of extension modules that add a ton of functionality [1].

1: http://docs.peewee-orm.com/en/latest/peewee/playhouse.html

coleifer··on Reasons to love SQLAlchemy
Thanks!
coleifer··on JSONlite – A self-contained, serverless, zero-configuration, JSON document store
I took a look at EJDB recently and thought it looked like a pretty neat project. One potential gotcha is that it is built on TokyoCabinet which AFAIK is no longer maintained. Looks like they have plans to build a v2, though.
coleifer··on JSONlite – A self-contained, serverless, zero-configuration, JSON document store
I commented above, but UnQLite is basically SQLite for JSON documents. If you're brave, SQLite has a new JSON extension as well, which looks pretty awesome.
coleifer··on JSONlite – A self-contained, serverless, zero-configuration, JSON document store
If you want a real self-contained, serverless, zero-config JSON document store, try UnQLite or the new SQLite JSON extension. I've written about both of them on my blog if you're curious:

* http://charlesleifer.com/blog/introduction-to-the-fast-new-u...

* http://charlesleifer.com/blog/using-the-sqlite-json-extensio...

coleifer··on WebXray
Seems like a great opportunity to use SQLite, then folks could share around database files. Why the hell don't more people use SQLite for things like this?
← PreviousPage 15 of 17Next →