HNHacker News
TopNewBestAskShowJobs

coleifer

2,485 karma · joined November 3, 2009

submissionscomments
coleifer··on Abricotine – WYSIWYM Markdown editor – open source and cross platform
Too bad it's electron. I'm working on a just-for-fun markdown editor using GtkSourceView and GtkWebkit and, despite a slight learning curve getting familiar with gtk, it's been a pleasure to work on. Ugh...electron? Really??
coleifer··on Python’s Weak Performance Matters
Sad not to see Cython getting a mention in this post. It is a superset of Python, so your vanilla code will run just fine, and you can optimize slow parts to native-speed. It's a fantastic tool.
coleifer··on ​Pipenv: One Year Later and a Call for Help
I find it very straightforward and obvious to use virtualenvs, which support everything this project purports to do. What is this, then? Some porcelain and convention around virtualenvs? Why do I need this?
coleifer··on Just 8 men own same wealth as half the world
For that reason we should all be grateful that money doesn't buy happiness.
coleifer··on Show HN: On-disk B+ tree for Python 3
Why is this not mentioned very clearly in the README? Seems like willful misrepresentation.

You might also mention that, if replacing large values that use overflow pages, the file has the potential to grow without bounds as it looks like overflow pages are not collected?

coleifer··on Show HN: On-disk B+ tree for Python 3
This is pretty cool. As I was reading the code I really wished for an explanation or simple ASCII diagram of the serialization formats for the various node/record types, as well as for the frames/wal format. Given that the poster is the author of the project, I hope you'll consider filling in these kinds of details, as they'd presumably be of interest to the people you're "Show"-ing this to.
coleifer··on Show HN: On-disk B+ tree for Python 3
Thanks for sharing, I've been interested in finding pure python implementations of storage engines. Another one I came across is whoosh: https://bitbucket.org/mchaput/whoosh/src/a16ebacb47191afaf2d...
coleifer··on A Life Hearing Voices: How I Manage Auditory Hallucinations
My youngest brother is schizophrenic. He describes it like hearing someone invisible talking. Not in a voice he recognizes as his own internal monologue.
coleifer··on Spamnesty – A Bot to waste spammers' time
Same... I think they need a service status page
coleifer··on Show HN: Dramatiq – An alternative to Celery
Thanks so much. You're right, I think some people have written storage engines for rabbit (as well as mongo) but you might have to search for them. The storage api is simple enough you could write your own in an hour or two.
coleifer··on History of AOL Warez
vbwfind.dll, vbmsg.vbx
coleifer··on Work on SQLite4 has concluded
I'm jealous you got to hear Dr. Hipp, that sounds cool. Would love to hear more about the circumstances :)

Regarding the LSM engine, you can find all the relevant implementation details here: https://sqlite.org/src4/doc/trunk/www/lsm.wiki#summary

> The in-memory tree is an append-only red-black tree structure used to stage user data that has not yet flushed into the database file by the system. Under normal circumstances, the in-memory tree is not allowed to grow very large.

coleifer··on Work on SQLite4 has concluded
There's an easy workaround: rename the table, create new table, insert into/select from.
coleifer··on Work on SQLite4 has concluded
Check out the changelog...they've added a ton of new stuff. Native json support, completely new full-text search extension, lsm key/value extension, performance improvements. I think they're looking at some changes to locking in the near future as well. Lots of stuff to find if you look.
coleifer··on Work on SQLite4 has concluded
The source tree for sqlite3 now contains an extension named lsm1 that contains both the standalone lsm kv database as well as a virtual table extension which allows you to use it directly from sqlite3. Some info on python integration can be found here:

http://charlesleifer.com/blog/using-sqlite4-s-lsm-storage-en...

In peewee 3.0a I've also added built-in support for using the lsm1 virtual table if you're interested.

coleifer··on Getting the Most Out of Sqlite3 with Python
You might also like this library, which allows you to create virtual tables using a very simple API (2 functions).

https://github.com/coleifer/sqlite-vtfunc

coleifer··on Getting the Most Out of Sqlite3 with Python
The docs cover all this and much more. Do yourself a favor and read them. Sqlite is a very capable library and this post is just the tip of the iceberg.

https://docs.python.org/2/library/sqlite3.html

coleifer··on The Depression Thing
I can't even express how much these simple things have changed my life (and the lives of those around me).
coleifer··on K-Means Clustering in Python from Scratch
Home-grown implementation using PIL to find dominant colors in images: http://charlesleifer.com/blog/using-python-and-k-means-to-fi...
coleifer··on Implementing faceted search with Django and PostgreSQL
I'd imagine you could accomplish very similar results using SQLite and the full-text-search extension (FTS3, 4 or 5). I believe the SQLite FTS modules support a porter-stemming tokenizer, though you may need to remove stop-words yourself. Before FTS5 you also need to write a user-defined function to rank results, but there are numerous libraries which provide good implementations (BM25, e.g.).
coleifer··on Top medical experts say we should decriminalize all drugs (2016)
I don't see a lot of clinically depressed people sticking guns in people's faces. Nor do I think lack of morality has anything to do with addiction.

Rather than treat the mind, I believe in treating the spirit.

coleifer··on Top medical experts say we should decriminalize all drugs (2016)
Alcohol is illegal here until you're 21, and then there are rules like no driving after drinking. We even tried to make it illegal but it wasn't tenable. Gambling is also illegal or very regulated in my state. And opiates are a controlled substance, you can't get them without an Rx.

I think we're talking at cross-purposes. I'm talking about the ravages of drug addiction on society. It's not about protecting you, it's about protecting society from you.

coleifer··on Top medical experts say we should decriminalize all drugs (2016)
That's patently absurd. You're not likely to see a gamer out there ripping and robbing to support a habit. Do people get addicted to games? Food? Sex? Whatever? Yeah sure. But by far drugs lead to more crime.
coleifer··on Top medical experts say we should decriminalize all drugs (2016)
Dope costs money. When you've got a habit and no job, how are you going to pay? People steal to support their habits. Little children have their childhood stolen because their parents were addicts. People crash cars and kill people. That's why drugs are illegal.
coleifer··on Show HN: Dynamic image size generator
Nginx has a module for this which you can tie into your cache: http://charlesleifer.com/blog/nginx-a-caching-thumbnailing-r...
coleifer··on Two days in an underwater cave running out of oxygen
I race motorcycles and also ride on the street most days, so this is a familiar topic of discussion with my wife, especially considering that we have a two-year-old son. What I can say on the subject is that there's a big difference between taking every precaution to minimize risk and being careless or reckless. What stood out to me when reading this article was "why the fuck would you use a guideline that could break so easily?" and also "why wouldn't you give yourself more margin with regards to your air supply?" That's just stupid, in my opinion.
coleifer··on Medium and the Scourge of Persistent Sharing Bars
Along with these complaints, I wish there was a greater sense of urgency among publishers to reduce page bloat. Some news sites require megabytes of javascript, video, and god-knows-what to display a couple kilobytes of text. It's crazy out there.
coleifer··on Ask HN: How do I dress better?
Buy nicer jeans and designer hoodies.
coleifer··on SQL Notebook
SQLite definitely presents some unique challenges, despite it generally being the "simplest" relational database. I've written a web-based SQLite database browser, which you can find here: https://github.com/coleifer/sqlite-web -- importantly, it supports all the `ALTER TABLE` statements you'd expect (add column, drop column, rename column, etc). This is done by renaming the table temporarily, creating a new table with the desired changes, then copying the data into the new table. Kinda clunky, but it works :)
coleifer··on A critique of trends in tech
I made a recurring google calendar alert to solve this problem...
← PreviousPage 12 of 17Next →