Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
phiresky
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
13 ms
·
91.
▲
by
phiresky
5y ago
Git does actually diff binaries and stores them very efficiently :) If you do a single small UPDATE in your db file git will only store the changed information. It's just kinda slow, and for most binary files the effort git spends to
92.
▲
by
phiresky
5y ago
Since random accesses across the internet are really slow, for this kind of fairly small table (where SQLite stores the row data inline within the B-Tree of the table) it basically fetches the whole content for each row - so even if you que
93.
▲
by
phiresky
5y ago
Huh, that's actually kind of a worst case I didn't think about: Since you're doing a reverse table scan my "sequential access" detection doesn't kick in. If you do the same query but with a forward scan it shou
94.
▲
by
phiresky
5y ago
Yeah, that was one of the inspirations for this. That one does not work in the browser though, would be a good project to do that same thing but with sqlite in wasm and integrated with WebTorrent instead of a native torrent program. I actua
95.
▲
by
phiresky
5y ago
The main restriction is that the DB really needs well fitting indexes, otherwise querying is really slow and fetches a lot of data. Regarding writing: You could of course implement a writing API with POST requests for changing pages of the
96.
▲
Hosting SQLite databases on GitHub Pages or any static file hoster
(phiresky.github.io)
1812 points
by
phiresky
5y ago
|
244 comments
97.
▲
by
phiresky
6y ago
Note that Frink is proprietary, and that data file is directly taken from the GNU Units project in violation of its GPL license, including many of the textual descriptions.
98.
▲
by
phiresky
6y ago
I'm working on a time tracking tool inspired by Arbtt, written in Rust, that also tracks visited websites including metadata (e.g. YouTube video category), tracks shell directories etc, and also is able to import data from your phone a
99.
▲
by
phiresky
6y ago
> I don't know why dd remains the standard for so many tutorials You can also do something like dd if=file.iso of=/dev/disk/by-id/ata-Samsung_SSD_840_EVO_120GB Where the last part is basically the brand
100.
▲
by
phiresky
6y ago
Since Pg12, even adding a column with a default doesn't lock the table anymore - that only happens if you later change or remove the default
101.
▲
by
phiresky
6y ago
I'm actually working on a sqlite addon right now that allows to transparently compress tables in sqlite using zstd dictionaries and the preliminary results are really promising! One DB I have compresses down from 1GB to 80MB and random
102.
▲
by
phiresky
6y ago
> As an aside, the Rust code could also be written like this Sadly it can't really, because Rust doesn't have control-flow based type refinement like TypeScript.. In TS the type of `file` after the throw is File. In Rust it sta
103.
▲
by
phiresky
6y ago
Yes, scrypt-kdf works great: const scryptParams = { logN: 15, r: 8, p: 1 }; async function hashPassword(password: string): Promise<string> { const password_hash: Buffer = await scrypt.kdf(password, scryptParams); ret
104.
▲
by
phiresky
6y ago
Yeah, In my opinion poppler should be a dependency of rga in homebrew (since it's kinda useless without having the default adapters), but I don't maintain that package.
105.
▲
by
phiresky
6y ago
> If you file an issue against ripgrep proper with code links and some more details Sorry, I don't think I explained my issue very well. In general it has nothing to do with the interaction with ripgrep, that works fine. It's t
106.
▲
by
phiresky
6y ago
pdfgrep has a --cache option since a while ago :) Not sure why they don't enable it by default. Still, this is much faster.
107.
▲
by
phiresky
6y ago
rga uses pdftotext (from poppler) internally for pdfs, except wraps it in parallelization and a very fast cache layer, since you usually want to do multiple queries per file :)
108.
▲
by
phiresky
6y ago
Scanned PDFs only work well if they already have an OCR layer. There's some optional integration of rga with tesseract, but it's pretty slow and less good than external OCR tools. ripgrep-all can do the same regexes as rg on any f
109.
▲
by
phiresky
6y ago
Developer of the tool here :) Glad to see it posted here, I still actively use it myself. Also check out the fzf integration in the README: https://github.com/phiresky/ripgrep-all/blob/master/doc/rga
110.
▲
by
phiresky
6y ago
Yeah, filters are great. Writing filters is easy: Pandoc basically converts the input document into a universal AST (json), and a filter is just any program that takes this json as an input and outputs a modified json AST. I wrote a filter
111.
▲
by
phiresky
6y ago
Yes, by default all websites hosted with cloudflare are completely insecure. Even if both the client connects via https, AND the server supports https, cloudflare uses an unencrypted http connection. Even the encryption: "full" se
112.
▲
by
phiresky
6y ago
Yeah, I meant both the ByteRecord/read_byte_record API, as well as using Serde with a struct containing &str or &[u8] references.
113.
▲
by
phiresky
6y ago
It would be great if a comparison to the rust csv library or xsv [1] could be added - it's single threaded, but it has a zero copy option as far as I know. I've used it to parse / filter large PostgreSQL log files (20GB+) wit
114.
▲
by
phiresky
6y ago
This is not true, since in JS promises are dispatched as soon as they are created. So as long as you call the fetch function, it doesn't matter that you are calling `await` sequentially.
115.
▲
by
phiresky
6y ago
You could have found a better example. The package you referenced literally just does `Number.isInteger` unless you are on decade old versions of nodejs
116.
▲
by
phiresky
6y ago
Looks pretty good. Looks like a good compromise between Prisma [1] and pure pg. Also the way you show examples is one of the best I've seen so far, with the output right below, optionally showing imports imports and the option to show
117.
▲
by
phiresky
6y ago
... this thing literally just downloads .exe files and then executes them. There's no dependency management. Look at the firefox "package": https://github.com/microsoft/winget-pkgs/blob/master&#
118.
▲
by
phiresky
6y ago
> Yeah, my computer is fast enough that I can just do "find . -name '*.pdf' -exec pdftotext {} \; | grep -i someSearchTerm" and come back later. You may be interested in my ripgrep-all [1] tool, it should allow you to
119.
▲
by
phiresky
6y ago
You're really misunderstanding the GDPR. Cookies are not mentioned anywhere in the law and it's actually really simple to understand: 1. You can do whatever you need to do to provide the service you're providing. (login cooki
120.
▲
by
phiresky
6y ago
Alternative take: An Open API is good, but Microsoft and Nvidia are too powerful to allow it http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-an...
More ›