Use the trigram tokenizer: https://www.sqlite.org/fts5.html#the_trigram_tokenizer
HN user
ers35
Eric R. Schulz (ers35)
https://www.ers35.com/
Maybe Cosmopolitan could be used with luastatic[1] to compile a Lua program to an "Actually Portable Executable":
CC="" luastatic main.lua
# Compile main.luastatic.c with Cosmopolitan Libc
[1] https://github.com/ers35/luastaticMirror: http://archive.is/ewDJq
I've been focusing on reading, but it looks like there is interest in writing too. The HN API doesn't support writing, so the username and password has to be stored. It's important that reading keeps working even if HN changes their backend in a way that breaks writing. I'll think about it.
You can search previous comments: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
HN itself is fast, but the comparison I'm making is with readers that use the HN API. See how getting each comment requires an additional API request: https://hacker-news.firebaseio.com/v0/item/22481199.json?pri...
It's more about the consistency of operating on data local to the user. For example, see this comment referencing how HN paginates threads at 250 comments for performance reasons: https://news.ycombinator.com/item?id=22231055 A local database does not have that issue.
There have been many HN related websites posted over the years, but a lot end up as dead links. A self-hosted version does not depend on a third party. Another reason is to minimize the round trip latency of contacting a central server. Consider users without a good connection to the server.
That reminds me of how https://forum.dlang.org works: https://github.com/CyberShadow/DFeed It also uses SQLite.
You might find this interesting: https://github.com/donnemartin/haxor-news
Great idea. This could also be useful to post a mirror for other users if the site ends up going down.
I prototyped this in Qt 2 years ago: https://ers35.com/files/hackernews-qt.png
1) It is possible to keep the whole site offline. A database from 2017 is 9 GB: https://archive.org/details/hackernews-2017-05-18.db I think a 2020 DB could be less than 20 GB.
2) My focus is on reading, not writing. Local favorites make sense. Maybe with importing public favorites. A user can set their name without logging in.
3/4) SQLite does the heavy lifting here.
My DB covers from https://hacker-news.firebaseio.com/v0/item/1.json?print=pret... (10/09/2006 at 6:21pm UTC) to https://hacker-news.firebaseio.com/v0/item/14372035.json?pri... (05/18/2017 at 11:58pm UTC)
The dump posted claims to cover from 1 to 14566367 (06/16/2017 at 3:03am UTC)
7.27 GB.
You can see the size of the download by clicking show all: https://archive.org/download/14566367HackerNewsCommentsAndSt...
See also: A dump of the stories, comments, and users from the Firebase API as a SQLite database with a full text search index: https://archive.org/details/hackernews-2017-05-18.db
I'm working on a tool that maintains an up to date archive of Hacker News and a companion tool to browse and search it. I'm not ready to release yet, but here is a dump of the stories, comments, and users from the Firebase API as a SQLite database with a full text search index: https://archive.org/details/hackernews-2017-05-18.db
If you're a fan of demoscene music, see Nectarine Demoscene Radio at https://www.scenemusic.net/.
Yes. One can identify the IP address of the origin server behind a reverse proxy if the server responds to direct requests in a way that identifies itself. See: https://cloudpiercer.org/
Two steps towards obscuring the origin server include requiring that the HTTP Host header is set and only responding to Cloudflare IP ranges: https://www.cloudflare.com/ips/
I used Censys to search for the IPv4 addresses of servers serving matching TLS certificates: https://censys.io/ipv4?q=443.https.tls.certificate.parsed.na...
Hacker News uses Cloudflare: http://bgp.he.net/dns/news.ycombinator.com#_ipinfo
Add the following to your hosts file to bypass Cloudflare and access HN directly:
50.22.90.248 news.ycombinator.comSee also "A BeagleBone on a Chip" for discussion about the Octavo Systems OSD3358 system-in-package used on this board: https://news.ycombinator.com/item?id=11697719
You may be interested in a tool I wrote that builds standalone executables: https://github.com/ers35/luastatic
For the following program:
iup.Message('test', 'hello world')
Build the program to a standalone executable: luastatic example.lua /usr/lib/x86_64-linux-gnu/liblua5.2.a -I/usr/include/lua5.2 libiup.a libiuplua52.a libiupcontrols.a `pkg-config --cflags --libs gtk+-3.0` -lX11Bindings are included: https://github.com/ers35/modserver/tree/master/src/api
The Python module does not require one to use an FFI: https://github.com/ers35/modserver/blob/master/src/example/p...
More idiomatic wrappers can be written later, but the FFI based bindings have to come first.
I updated the readme to make this more clear.
Here is a list of the 11 supported languages: C, C++, CGI, D, Go, Haskell, Lua, Nim, Python, Ruby, and Rust.
See the original: https://ptrthomas.wordpress.com/2006/06/06/java-call-stack-f...
See also from 17 days ago: "Symantec Issues Intermediate CA Certificate for Blue Coat Public Services" https://news.ycombinator.com/item?id=11781915
See also: The Hurricane Electric BGP Toolkit shows the ISP based on the AS number from which the IP address is announced: http://bgp.he.net/
Example: http://bgp.he.net/ip/104.196.27.39