Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
aljarry
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
31.
▲
by
aljarry
3y ago
I've played Noita ( https://noitagame.com/ ) for quite a bit, and lately it clicked to me, that the core mechanics of the player and environment come from Liero. Though Noita is a single player rouge-lite, it has wands i
32.
▲
by
aljarry
3y ago
TIL :) thanks, I misunderstood that part.
33.
▲
by
aljarry
3y ago
Interesting note on the NOW() (or CURRENT_TIMESTAMP), they are equivalent to transaction_timestamp(), which means - start time of the current transaction. So, if you'd insert multiple items in a single transaction, all of them would en
34.
▲
by
aljarry
3y ago
> time goes backwards is DST Only if you deal with timestamps that don't contain timezone information. With TIMESTAMPTZ in postgres it's transparent, you don't have to do anything specifically to manage DST.
35.
▲
by
aljarry
3y ago
> Have you ever refactored working code into working code and had a slew of tests fail anyway? That's the child of test driven design. I had this problem, when either testing too much implementation, or relying too much on implement
36.
▲
by
aljarry
3y ago
Depends on the usage. Commonly available "legit" PRNGs have uniform distribution, even over long range of numbers. Wikipedia has a list of interesting tests you could do to confirm you PRNG: https://en.wikipedia.org
37.
▲
by
aljarry
3y ago
What's wrong with using UUIDs for things that are commonly used every nanosecond? It's still improbable to get 2 UUIDs for identifier for the same "thing" in the system, even if you generate billions of them per second.
38.
▲
by
aljarry
3y ago
I'm not looking at the keyboard, but I often move my right hand to click brackets or comma with index/middle finger. Takes muscle memory.
39.
▲
by
aljarry
3y ago
The rant in the middle is very dismissive over voices against in the discussion, and that makes me agree with OP.
40.
▲
by
aljarry
3y ago
But that's on a single RAID in a single location. You'd probably need at least one failover, and backups for that as well, if you'd like to target higher availability / durability. S3 keeps multiple copies in multiple ge
41.
▲
by
aljarry
3y ago
That's a pretty nice solution to a gripe I have with programming and typing. This year I've practiced touch typing for the first time in 10 years, and turns out it's such a chore to use touch-typing while programming! My righ
42.
▲
by
aljarry
3y ago
IIS (Microsoft / Windows Server HTTP server) supports a technology rival to CGI called ISAPI, which was deployed using .dll files. .dll is a Microsofts' dynamic library standard, commonly produced by e.g. C/C++, but also by .
43.
▲
by
aljarry
3y ago
I've got 2 external HDDs in ZFS mirror, cheap consumer disks. One of them is perfectly fine, second one started having occasional read or write errors, which is not great. With regular weekly scrub I hadn't had any data issues ov
44.
▲
by
aljarry
3y ago
I had similar idea, but in the end I've gone a different path: I've got a USFF PC with 2 external HDDs as NAS, and raspberry pi to keep always on stuff. I used to keep the PC up most of the day, and get it to sleep on schedule dur
45.
▲
by
aljarry
4y ago
Though you don't need most of the OS - you may run bare bones containers with just a statically built binary inside the image, e.g. it's possible in Go.
46.
▲
by
aljarry
4y ago
Interesting note - there's already standard representation for truncated sha2 - SHA-512/224 and SHA-512/256, but unfortunately no with output length of sha1. Even more interesting thing is that those truncated representations
47.
▲
by
aljarry
4y ago
That's a very good point!
48.
▲
by
aljarry
4y ago
Yes, but the REST vs SQL forces a specific API for changes. REST - update/delete a specific record. SQL - update/delete based on a filter, or a query result. I can do `set a = b` for all rows in the table, which may be needed inte
49.
▲
by
aljarry
4y ago
That's only if you use immutable strings. In C# or js (and probably in others as well) you can use some form of byte arrays / buffers, and overwrite their content after use.
50.
▲
by
aljarry
4y ago
There's a pretty important note in the remarks, that you should not use SecureString in new code, as it only shortens the lifespan of the plaintext in memory.
51.
▲
by
aljarry
4y ago
Why not just accept SQL? It's a matter of contract. With REST APIs you specify a contract, it gets robust with time, and other software can expect only what's in the contract. SQL allows you to run arbitrary functions over data in
52.
▲
by
aljarry
4y ago
You can configure ZFS to use sha256 or sha512 for checksums. Sha256 is the default for datasets with deduplication.
53.
▲
by
aljarry
4y ago
It looks like you're sorting the whole file, while python implementation sorts only unique values.
54.
▲
by
aljarry
4y ago
If you fix commonly occurring bugs, you're left with rare bugs - and there may be tons of them in mature codebase. For legacy systems with dedicated operators, it may make more financial sense to teach users a workaround to a bug, than
55.
▲
by
aljarry
4y ago
That's exactly my problem today - I have some old PCs repurposed as homelab, and they require some cron jobs to keep them in check - like forcing modules, or keeping the fans from whining. Without any MTA, it's such a chore to lea
56.
▲
by
aljarry
4y ago
This might be an overkill, but you can host internal domain using public DNS. I've got a domain, and I've added multiple A records pointing to IPs of servers in my 192.168.X.Y NAT. This has a downside thought, that with short enou
57.
▲
by
aljarry
4y ago
At my $dailyjob we (kinda unfortunately) went with tons of repositories and libraries upon libraries, and the only sane way for me to make changes across multiple repos is combining them into single build locally. In .NET it's not that
58.
▲
by
aljarry
4y ago
It's not only that debugger is closed-source - if you try to run non-MS provided build of VS Code, the .Net debugger would decline to start. That was very surprising, after installing VS Code on ubuntu from some default package.
59.
▲
by
aljarry
4y ago
This is pretty fun! Thanks for sharing :)
60.
▲
by
aljarry
4y ago
Disclaimer: I may be absolutely in the wrong here, as I may be missing some fundamental economics knowledge. From my understanding, inflation is not really a property of the currency, but a property of market in which given currency is used
More ›