<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: pmahoney</title><link>https://news.ycombinator.com/user?id=pmahoney</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sat, 23 May 2026 16:49:57 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=pmahoney" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by pmahoney in "Can Bundler be as fast as uv?"]]></title><description><![CDATA[
<p>I wrote some code to do almost this many years ago (if I recall correctly, it doesn’t cache anything to disk, but builds the hash fresh each time, which can still result in massive speed up).<p>Probably obsolete and broken by now, but one of my favorite mini projects.<p>(And I just realized the graph is all but impossible to read in dark mode)<p><a href="https://github.com/pmahoney/fastup" rel="nofollow">https://github.com/pmahoney/fastup</a></p>
]]></description><pubDate>Fri, 02 Jan 2026 01:21:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=46460287</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=46460287</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46460287</guid></item><item><title><![CDATA[New comment by pmahoney in "Are Apple gift cards safe to redeem?"]]></title><description><![CDATA[
<p>> Plus they get to keep the balance that people forget to redeem<p>I'm not an expert here, but this is not generally true. See "giftcard escheatment laws". I think these vary by state, but see e.g. <a href="https://legalclarity.org/when-do-gift-cards-become-subject-to-escheat/" rel="nofollow">https://legalclarity.org/when-do-gift-cards-become-subject-t...</a> The value of abandoned cards goes to the state.</p>
]]></description><pubDate>Thu, 18 Dec 2025 17:40:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=46315945</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=46315945</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46315945</guid></item><item><title><![CDATA[New comment by pmahoney in "Our Paint – A featureless but programmable painting program"]]></title><description><![CDATA[
<p>If that phrase "for individuals" means "for individuals only", then it isn't GPLv3, but some bespoke non-free license.<p>My speculation: it was intended to mean: use it under terms of GPLv3 (for commercial purposes or not), OR contact to negotiate different terms.<p>But there's a built-in assumption that no commercial entity would _want_ to use it under GPLv3 terms.</p>
]]></description><pubDate>Sat, 18 Oct 2025 19:15:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=45629699</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=45629699</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45629699</guid></item><item><title><![CDATA[New comment by pmahoney in "OCaml as my primary language"]]></title><description><![CDATA[
<p>I tried to like OCaml for a few years. The things that hold me back the most are niggling things that are largely solved in more "modern" langs, the biggest being the inability to "print" arbitrary objects.<p>There are ppx things that can automatically derive "to string" functions, but it's a bit of effort to set up, it's not as nice to use as what's available in Rust, and it can't handle things like Set and Map types without extra work, e.g. [1] (from 2021 so situation may have changed).<p>Compare to golang, where you can just use "%v" and related format strings to print nearly anything with zero effort.<p>[1] <a href="https://discuss.ocaml.org/t/ppx-deriving-implementation-for-pretty-printing-sets-maps/9004" rel="nofollow">https://discuss.ocaml.org/t/ppx-deriving-implementation-for-...</a></p>
]]></description><pubDate>Wed, 13 Aug 2025 22:43:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=44894751</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=44894751</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44894751</guid></item><item><title><![CDATA[New comment by pmahoney in "GNOME and Red Hat Linux eleven years ago (2009)"]]></title><description><![CDATA[
<p>Could be xscavenger?<p>> Scavenger is a cool arcade/thinking game very much like Lode Runner. You've got to run around and collect objects while avoiding enemies. Some objects are buried and you've got to dig down to get at them. It's an addictive game and some of the levels are devilishly (cruelly) complicated to solve.<p><a href="https://linuxmotors.com/linux/scavenger/index.html" rel="nofollow">https://linuxmotors.com/linux/scavenger/index.html</a></p>
]]></description><pubDate>Tue, 17 Jun 2025 15:35:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=44300425</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=44300425</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44300425</guid></item><item><title><![CDATA[New comment by pmahoney in "A receipt printer cured my procrastination"]]></title><description><![CDATA[
<p>Just to add, 'pass' has an otp extension to simplify this a bit [1]<p>With that, you can do<p><pre><code>    $ zbarimg -q --raw qrcode.png | pass otp insert <some-name>
    $ pass otp <some-name>  # or pipe to xsel
</code></pre>
[1] <a href="https://github.com/tadfisher/pass-otp">https://github.com/tadfisher/pass-otp</a></p>
]]></description><pubDate>Thu, 12 Jun 2025 14:37:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=44258335</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=44258335</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44258335</guid></item><item><title><![CDATA[New comment by pmahoney in "What Is the Difference Between a Block, a Proc, and a Lambda in Ruby? (2013)"]]></title><description><![CDATA[
<p>Can you explain further? I'm not sure I follow.<p>> How do you as a method author opt in to distinguishing between [break and next] after yielding to a block?<p>I don't use Ruby much lately, but if I yield to a block which calls break, control will pass to the code following the block (and not back to my method). If the block calls next or simply finishes, control passes back to me though I cannot know if next was called or not (but do I care? I can go ahead and yield the next element of a collection either way)</p>
]]></description><pubDate>Thu, 22 May 2025 00:02:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=44057472</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=44057472</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44057472</guid></item><item><title><![CDATA[New comment by pmahoney in "Cats are (almost) liquid"]]></title><description><![CDATA[
<p>Calvin vindicated<p><a href="https://www.gocomics.com/calvinandhobbes/1993/04/20" rel="nofollow">https://www.gocomics.com/calvinandhobbes/1993/04/20</a></p>
]]></description><pubDate>Thu, 17 Oct 2024 14:58:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=41870287</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=41870287</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41870287</guid></item><item><title><![CDATA[New comment by pmahoney in "Exposure to the Sun's UV radiation may be good for you"]]></title><description><![CDATA[
<p>This paper, "Insufficient Sun Exposure Has Become a Real Public Health Problem" [1] states "thus, serum 25(OH)D as an indicator of vitamin D status may be a proxy for and not a mediator of beneficial effects of sun exposure".<p>That is, while vitamin D can be used to deduce someone's amount of sun exposure, the benefits of sun exposure are not coming from the vitamin D.<p>[1] <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7400257/" rel="nofollow">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7400257/</a></p>
]]></description><pubDate>Tue, 20 Aug 2024 17:15:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=41301902</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=41301902</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41301902</guid></item><item><title><![CDATA[New comment by pmahoney in "Curvature consistency in Apple hardware and software products (2017)"]]></title><description><![CDATA[
<p>See also "Why roller coaster loops aren’t circular anymore"<p><a href="https://news.ycombinator.com/item?id=32005421" rel="nofollow">https://news.ycombinator.com/item?id=32005421</a></p>
]]></description><pubDate>Sat, 24 Dec 2022 21:17:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=34121160</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=34121160</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34121160</guid></item><item><title><![CDATA[New comment by pmahoney in "Flutter is the most popular cross-platform mobile SDK"]]></title><description><![CDATA[
<p>Used "in anger" means "professionally" or "for real" or "where working or not really matters" vs. using it for hobby projects or experimentation.</p>
]]></description><pubDate>Tue, 22 Feb 2022 16:19:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=30429730</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=30429730</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30429730</guid></item><item><title><![CDATA[New comment by pmahoney in "Benchmarking CRuby, MJIT, YJIT, JRuby, and TruffleRuby"]]></title><description><![CDATA[
<p>Many years ago (2011 or so?), I worked on a Rails app that used JRuby. The driving force was a small part of the app needing a Java library. I think we did see some performance benefit, or at least benefit from using multi-threaded web servers instead of process-per-request servers (like Unicorn).<p>However, we also ran into many problems that felt like we were the first to encounter them (few or no similar reports on project bug lists or StackOverflow etc.) which is never fun if you're under any kind of pressure to deliver.<p>In hindsight, if I had something small and reasonably isolated (a microservice?), it could make sense to use JRuby or Truffle (if you need some JVM lib; if it's purely for performance reasons I'd just grab a different language for that microservice).  But for a larger app that pays the bills, I'd stick with the well-trod path (at the time that was MRI, Unicorn, single-threaded).</p>
]]></description><pubDate>Thu, 06 Jan 2022 20:25:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=29829538</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=29829538</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29829538</guid></item><item><title><![CDATA[New comment by pmahoney in "Robotic Kitchen Automation Levels"]]></title><description><![CDATA[
<p>> Coupled with an increase in food delivery efficiency, kitchenless flats could become the norm in densely populated areas.<p>Sounds dystopian. Hustle and bustle of life aside, physically cooking things can be enjoyable. On the other hand, when I cook "from scratch", I'm buying conveniently packaged ingredients (I don't grow or grind my own flour for example), so maybe I'm happy with my current level of effort from simple familiarity.</p>
]]></description><pubDate>Mon, 29 Nov 2021 23:34:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=29386789</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=29386789</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29386789</guid></item><item><title><![CDATA[New comment by pmahoney in "Bar-tailed Godwits regularly travel more than 7,000 miles non-stop"]]></title><description><![CDATA[
<p>There's Cliff Young's win in the 875km Westfield Sydney to Melbourne Ultramarathon.<p>> While the other competitors stopped to sleep for six hours, Young kept running. He ran continuously for five days, taking the lead during the first night and eventually winning by 10 hours<p><a href="https://en.wikipedia.org/wiki/Cliff_Young_(athlete)" rel="nofollow">https://en.wikipedia.org/wiki/Cliff_Young_(athlete)</a></p>
]]></description><pubDate>Mon, 15 Nov 2021 16:22:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=29229156</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=29229156</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29229156</guid></item><item><title><![CDATA[New comment by pmahoney in "I switched from macOS to Linux after 15 years of Apple"]]></title><description><![CDATA[
<p>For 1., it's possible (easy even? I've never tried this in a cross-compiling situation) to build packages on one system and push them to another via SSH.<p>I suppose an upgrade would still result in two copies of everything, at least temporarily, but at least the target system doesn't need source code, compilers, etc.<p><a href="https://nixos.org/manual/nix/unstable/command-ref/nix-copy-closure.html" rel="nofollow">https://nixos.org/manual/nix/unstable/command-ref/nix-copy-c...</a></p>
]]></description><pubDate>Thu, 26 Aug 2021 22:40:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=28321962</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=28321962</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28321962</guid></item><item><title><![CDATA[New comment by pmahoney in "Implement unprivileged chroot"]]></title><description><![CDATA[
<p>For what it's worth, Linux 5.6 introduced openat2 [1] which accepts some additional flags controlling path resolution.<p>For example, RESOLVE_IN_ROOT "is as though the calling process had used chroot(2) to (temporarily) modify its root directory (to the directory referred to by dirfd)".<p>[1] <a href="https://man7.org/linux/man-pages/man2/openat2.2.html" rel="nofollow">https://man7.org/linux/man-pages/man2/openat2.2.html</a></p>
]]></description><pubDate>Thu, 22 Jul 2021 16:57:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=27921366</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=27921366</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27921366</guid></item><item><title><![CDATA[New comment by pmahoney in "The “Granny Knot”"]]></title><description><![CDATA[
<p>Not sure if this would help, and I'm not exactly sure I'm understanding you correctly, but when I tie hockey stakes, instead of a single "left-over-right starting knot" (using terminology from the post), I wrap around two or even three times. This provides enough friction for that first knot to stay put while I tie the loops of the standard shoelace knot (not the Ian knot, with which I'm unfamiliar).</p>
]]></description><pubDate>Mon, 19 Apr 2021 20:53:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=26867863</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=26867863</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26867863</guid></item><item><title><![CDATA[New comment by pmahoney in "Elegant Bash Conditionals"]]></title><description><![CDATA[
<p>I stopped using `set -e`. It is disabled if the function you're running is part of an `if` statement, for example:<p><pre><code>    thingThatCanFail() {
      echo "step one succeeded"
      echo "step two failed"
      false
      echo "step three was run too"
    }

    if ! thingThatCanFail; then
      echo "thingThatCanFail failed!"
    fi
</code></pre>
With or without `set -e`, step three is run, and the function returns success, even though you might expect the failure of step two to prevent step three from running.<p>If "thingThatCanFail" is called _outside_ of an if statement, then `set -e` causes different behavior (i.e. step three _is_ skipped).<p>I instead use lots of chaining with && (as in the article), or explicit checks after each command. I have two utility functions I define in nearly every script:<p><pre><code>    warn() { >&2 printf "%s\\n" "$*"; }
    abort() { warn "$@"; exit 1; }
</code></pre>
Then I do lots of:<p><pre><code>    stepOne || abort "step one failed"
    stepTwo || abort "step two failed"
    ...
</code></pre>
It can get a little verbose, but much better than trying to reason about `set -e` in my opinion.</p>
]]></description><pubDate>Tue, 02 Mar 2021 20:37:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=26320300</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=26320300</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26320300</guid></item><item><title><![CDATA[New comment by pmahoney in "Super-expressive – Write regex in natural language"]]></title><description><![CDATA[
<p>Here is (I think) the example regex ported to OCaml's Re library [1]<p><pre><code>    let my_regex =
      let open Re in
      seq [
          bos;
          opt (str "0x");
          repn (
              alt [
                  rg 'A' 'F';
                  rg 'a' 'f';
                  rg '0' '9';
              ]
          ) 4 None |> group;
          eos;
      ]
      |> compile
</code></pre>
I'm familiar with standard (compact) regex syntax, but I've been using the above syntax recently in a couple small places. I'm a bit on the fence as to which is "better". The compact syntax is, of course, more compact. I think it's a very similar comparison between APL (which I've not used) and most other common programming languages.<p>One advantage of the expanded syntax is that it's a bit nicer to incorporate a string variable, e.g. "str some_string" vs. "/#{Regexp.escape(some_string)}/" (to borrow Ruby's syntax).<p>[1] <a href="https://github.com/ocaml/ocaml-re" rel="nofollow">https://github.com/ocaml/ocaml-re</a></p>
]]></description><pubDate>Thu, 21 Jan 2021 17:03:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=25861154</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=25861154</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25861154</guid></item><item><title><![CDATA[New comment by pmahoney in "CVE-2021-24122 Apache Tomcat Information Disclosure"]]></title><description><![CDATA[
<p>Note that Apache Tomcat is an implementation of Java Servlets, not to be confused with Apache httpd, the venerable web server.</p>
]]></description><pubDate>Fri, 15 Jan 2021 22:07:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=25797171</link><dc:creator>pmahoney</dc:creator><comments>https://news.ycombinator.com/item?id=25797171</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25797171</guid></item></channel></rss>