<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: NightMKoder</title><link>https://news.ycombinator.com/user?id=NightMKoder</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 28 Jul 2026 06:12:46 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=NightMKoder" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by NightMKoder in "Stinkpot: SQLite-backed shell history"]]></title><description><![CDATA[
<p>FWIW I use atuin (<a href="https://atuin.sh/" rel="nofollow">https://atuin.sh/</a>) and am reasonably happy with it, especially the infinite capacity & snapiness. Ignoring the sync features, I believe it's also sqlite backed when running in local-only mode.</p>
]]></description><pubDate>Sun, 26 Jul 2026 07:35:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=49055642</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=49055642</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49055642</guid></item><item><title><![CDATA[New comment by NightMKoder in "Alice is impatient"]]></title><description><![CDATA[
<p>When you measure latency, you’re measuring it based on requests. So in some bucket if you had a request take 2s and a request take 10s, you would say the average is 6s. This answers the question “how long should I expect a single request to take”.<p>But the articles point is that to the people - it’s not the number of requests that matters - it’s how often they are waiting for them. The question is “how much time am I sitting here waiting?” In that case the 10s request is 5x worse than a 2s request - it takes 5x of the “time spent”.<p>So you can change the weighing to 1 / 2 2s 1 / 2 10s to 1 * 2/12 & 1 * 10/12 - that gives us 17% and 83%. And the average there is 9.04s.<p>The difference is the question. If you think about it as road segments, let’s say you have a group of road segments with different lengths. You can ask the “average length of segment” - or you can ask “if you pick a random point among all the segments, how long is the segment that I landed in?” You’re picking very differently there - the second is proportional to the length!<p>Technically IMO the blog is slightly off - you want to use “mean residual life”. Ie if I pick a random TIME how long do I have to wait for my request to finish. But it’s reasonably close.</p>
]]></description><pubDate>Sun, 21 Jun 2026 05:15:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=48615889</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=48615889</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48615889</guid></item><item><title><![CDATA[New comment by NightMKoder in "Alice is impatient"]]></title><description><![CDATA[
<p>This is standard statistics terminology - E(X) is <a href="https://en.wikipedia.org/wiki/Expected_value" rel="nofollow">https://en.wikipedia.org/wiki/Expected_value</a> . E_a is presumably Alice's perceived expected value. Var(X) is <a href="https://en.wikipedia.org/wiki/Variance" rel="nofollow">https://en.wikipedia.org/wiki/Variance</a> . The law of large numbers says the arithmetic average of observations becomes E(X) with enough samples.<p>I'm pretty sure what the author is saying is:<p>E(X) =:= \sum_t(t * P(X = t)) is the definition<p>another important note is P(X^2 = t^2) = P(X = t) - because it's the same distribution.<p>E_a(X) is a bit sloppy, but consider X_a aka Alice's latency "experience" distribution. The argument is:<p>P(X_a = t) = t * P(X = t) / \sum_u(u * P(X = u)) - i.e. scale the probability up by t but make it sum to 1.<p>Then<p>E(X_a) = \sum_t(t * P(X_a = t)) = \sum_t(t * t * P(X = t) / \sum_u(u * P(X = u))<p>aka<p>E(X^2) / E(X)<p>Then (from wikipedia)<p>Var(X) = E(X^2) - (E(X))^2<p>And we get<p>E(X_a) = (Var(X) + (E(X))^2) / E(X) = E(X) + Var(X) / E(X)</p>
]]></description><pubDate>Sat, 20 Jun 2026 23:12:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=48613915</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=48613915</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48613915</guid></item><item><title><![CDATA[New comment by NightMKoder in "The fix for a segfault that never shipped"]]></title><description><![CDATA[
<p>This might speak to the craziness of the gstreamer plugin ecosystem - good/bad/ugly might be a fun maintenance mnemonic, but `voaacenc` is actually in `bad` - not `ugly`. Most plugins you'd want to use aren't in `good`. How are you supposed to actually use "well supported plugins" with gstreamer? Is it just to not use gstreamer at all?</p>
]]></description><pubDate>Tue, 20 Jan 2026 22:50:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=46698740</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=46698740</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46698740</guid></item><item><title><![CDATA[New comment by NightMKoder in "Show HN: Attempt – A CLI for retrying fallible commands"]]></title><description><![CDATA[
<p>I was recently in the market for one of these! I ended up going with <a href="https://github.com/dbohdan/recur" rel="nofollow">https://github.com/dbohdan/recur</a> due to the nice stdout and stdin handling. Though this has stdout/stderr pattern matching for failures which is nice too!</p>
]]></description><pubDate>Tue, 09 Sep 2025 03:16:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=45176982</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=45176982</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45176982</guid></item><item><title><![CDATA[New comment by NightMKoder in "Postgres LISTEN/NOTIFY does not scale"]]></title><description><![CDATA[
<p>Facebook’s wormhole seems like a better approach here - just tailing the MySQL bin log gets you commit safety for messages without running into this kind of locking behavior.</p>
]]></description><pubDate>Thu, 10 Jul 2025 20:49:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=44525446</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=44525446</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44525446</guid></item><item><title><![CDATA[New comment by NightMKoder in "Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text"]]></title><description><![CDATA[
<p>IMO mermaid is awesome, but for two somewhat indirect reasons:<p>- There’s an almost wysiwig editor for mermaid at <a href="https://www.mermaidchart.com/play" rel="nofollow">https://www.mermaidchart.com/play</a> . It’s very convenient and appropriately changes the layout as you draw arrows!<p>- Notion supports inline mermaid charts in code blocks (with preview!) It’s awesome for putting some architecture diagrams in Eng docs.</p>
]]></description><pubDate>Sat, 24 May 2025 01:25:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=44078095</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=44078095</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44078095</guid></item><item><title><![CDATA[New comment by NightMKoder in "Refactoring Clojure"]]></title><description><![CDATA[
<p>Agreed - concretely with-redefs  forces single threaded test execution. So eg you can’t use the eftest multithreaded mode.<p>Explicit dynamic bindings are better if you need something like this since those are thread local.</p>
]]></description><pubDate>Thu, 15 May 2025 23:45:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=44000459</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=44000459</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44000459</guid></item><item><title><![CDATA[New comment by NightMKoder in "Refactoring Clojure"]]></title><description><![CDATA[
<p>Usually the controversial decision for Clojure code highlighting is rainbow parens. This color scheme is horrific and unreadable (on mobile at least).</p>
]]></description><pubDate>Thu, 15 May 2025 22:43:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=44000102</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=44000102</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44000102</guid></item><item><title><![CDATA[New comment by NightMKoder in "Air pollution fell substantially as Paris restricted car traffic"]]></title><description><![CDATA[
<p>I don’t know about tires, but for brakes we already know how to make lower dust brakes - use drum brakes instead of disc brakes. The friction material is enclosed on drum brakes so much less of it just flies away.</p>
]]></description><pubDate>Sat, 12 Apr 2025 17:34:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=43666401</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43666401</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43666401</guid></item><item><title><![CDATA[New comment by NightMKoder in "Zero-Downtime Kubernetes Deployments on AWS with EKS"]]></title><description><![CDATA[
<p>So I might be putting words in your mouth, so please correct me if this is wrong. It seems like you don’t actually control the SIGTERM handler code. Otherwise you could just write something like:<p><pre><code>  sigterm_handler() {
    make_healthcheck_fail();
    sleep(20);
    stop_web_server();
    exit(0);
  }
</code></pre>
Technically the server shutdown at the end doesn’t even need to be graceful in this case.</p>
]]></description><pubDate>Tue, 11 Mar 2025 05:00:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=43329282</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43329282</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43329282</guid></item><item><title><![CDATA[New comment by NightMKoder in "Zero-Downtime Kubernetes Deployments on AWS with EKS"]]></title><description><![CDATA[
<p>Why the additional SUGUSR1 vs just doing those (failing health, sleeping) on SIGTERM?</p>
]]></description><pubDate>Tue, 11 Mar 2025 03:27:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=43328882</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43328882</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43328882</guid></item><item><title><![CDATA[New comment by NightMKoder in "Zero-Downtime Kubernetes Deployments on AWS with EKS"]]></title><description><![CDATA[
<p>Yes sorry for not qualifying - that’s right. IMO the liveness check is only rarely useful - but I've not really run any bleeding edge services on kube. I assume it’s more useful if you actually working on dangerous code - locking, threading, etc. I’ve mostly only run web apps.</p>
]]></description><pubDate>Tue, 11 Mar 2025 03:24:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=43328874</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43328874</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43328874</guid></item><item><title><![CDATA[New comment by NightMKoder in "Zero-Downtime Kubernetes Deployments on AWS with EKS"]]></title><description><![CDATA[
<p>This is actually a fascinatingly complex problem. Some notes about the article:
 * The 20s delay before shutdown is called “lame duck mode.” As implemented it’s close to good, but not perfect.
 * When in lame duck mode you should fail the pod’s health check. That way you don’t rely on the ALB controller to remove your pod. Your pod is still serving other requests, but gracefully asking everyone to forget about it.
 * Make an effort to close http keep-alive connections. This is more important if you’re running another proxy that won’t listen to the health checks above (eg AWS -> Node -> kube-proxy -> pod). Note that you can only do that when a request comes in - but it’s as simple as a Connection: close header on the response.
 * On a fun note, the new-ish kubernetes graceful node shutdown feature won’t remove your pod readiness when shutting down.</p>
]]></description><pubDate>Mon, 10 Mar 2025 21:04:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=43326082</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43326082</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43326082</guid></item><item><title><![CDATA[New comment by NightMKoder in "Optimistic Locking in B-Trees"]]></title><description><![CDATA[
<p>Talking of trees and caches, back in school I remember learning about splay trees. I’ve never actually seen one used in a production system though, I assume because of the poor concurrency. Has anyone heard of any systems with tree rebalancing based on the workload (ie reads too not just writes)?</p>
]]></description><pubDate>Sat, 08 Mar 2025 06:53:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=43298102</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=43298102</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43298102</guid></item><item><title><![CDATA[New comment by NightMKoder in "Bypassing regulatory locks, hacking AirPods and Faraday cages"]]></title><description><![CDATA[
<p>Presumably depends on the country and the laws. Keep in mind that Apple considers this a new interesting use case - not a killer feature for AirPods. They wouldn’t risk AirPod sales with a gray interpretation of the law.</p>
]]></description><pubDate>Tue, 12 Nov 2024 20:20:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=42119293</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=42119293</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42119293</guid></item><item><title><![CDATA[New comment by NightMKoder in "Debugging a memory leak in a Clojure service"]]></title><description><![CDATA[
<p>Of course you’re right and you really want to avoid getting to GC thrashing. IMO people still miss the old +UseGCOverheadLimit on the new GCs.<p>That said trying to enforce overhead limits with RSS limits also won’t end well. Java doesn’t make guarantees around max allocated but unused heap space. You need something like this: <a href="https://github.com/bazelbuild/bazel/blob/10060cd638027975480ae56b5e38dd1a0991d49c/src/main/java/com/google/devtools/build/lib/runtime/MemoryPressureOptions.java#L87">https://github.com/bazelbuild/bazel/blob/10060cd638027975480...</a> - but I have rarely seen something like that in production.</p>
]]></description><pubDate>Tue, 10 Sep 2024 04:08:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=41497073</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=41497073</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41497073</guid></item><item><title><![CDATA[New comment by NightMKoder in "Debugging a memory leak in a Clojure service"]]></title><description><![CDATA[
<p>If your clojure pods are getting OOMKilled, you have a misconfigured JVM. The code (e.g. eval or not) mostly doesn't matter.<p>If you have an actual memory leak in a JVM app what you want is an exception called java.lang.OutOfMemoryError . This means the heap is full and has no space for new objects even after a GC run.<p>An OOMKilled means the JVM attempted to allocate memory from the OS but the OS doesn't have any memory available. The kernel then immediately kills the process. The problem is that the JVM at the time thinks that _it should be able to allocate memory_ - i.e. it's not trying to garbage collect old objects - it's just calling malloc for some unrelated reason. It never gets a chance to say "man I should clear up some space cause I'm running out". The JVM doesn't know the cgroup memory limit.<p>So how do you convince the JVM that it really shouldn't be using that much memory? It's...complicated. The big answer is -Xmx but there's a ton more flags that matter (-Xss, -XX:MaxMetaspaceSize, etc). Folks think that -XX:+UseContainerSupport fixes this whole thing, but it doesn't; there's no magic bullet. See <a href="https://ihor-mutel.medium.com/tracking-jvm-memory-issues-on-kubernetes-15301407c3aa" rel="nofollow">https://ihor-mutel.medium.com/tracking-jvm-memory-issues-on-...</a> for a good discussion.</p>
]]></description><pubDate>Fri, 06 Sep 2024 21:46:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=41469955</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=41469955</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41469955</guid></item><item><title><![CDATA[New comment by NightMKoder in "Show HN: Tea-tasting, a Python package for the statistical analysis of A/B tests"]]></title><description><![CDATA[
<p>Would be great if it included sequential sampling as well: <a href="https://www.evanmiller.org/ab-testing/sequential.html" rel="nofollow">https://www.evanmiller.org/ab-testing/sequential.html</a> . Especially given how A/B tests usually get run in product companies, a peek proof method helps quite a bit.</p>
]]></description><pubDate>Mon, 29 Jul 2024 15:16:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=41101091</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=41101091</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41101091</guid></item><item><title><![CDATA[New comment by NightMKoder in "Klára Dán von Neumann"]]></title><description><![CDATA[
<p>Easier to explain with coin flips. Let’s say we do 100 flips - we know the “most likely” thing to happen is 50 heads and 50 tails. The actual probability of that is C(100, 50) / 2^100 = 0.079.<p>So about an 8% chance. You’re significantly more likely (ie 92% chance) to see _something else_. And that’s _the most_ likely outcome.<p>So tldr - it’s not so much that “you never see an all tails sequence in practice” - you’re actually unlikely to see any particular sequence. All the probabilities get astonishingly low very quickly.</p>
]]></description><pubDate>Sun, 30 Jun 2024 06:44:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=40835522</link><dc:creator>NightMKoder</dc:creator><comments>https://news.ycombinator.com/item?id=40835522</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40835522</guid></item></channel></rss>