<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: smitherfield</title><link>https://news.ycombinator.com/user?id=smitherfield</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Tue, 07 Apr 2026 08:07:53 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=smitherfield" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by smitherfield in "Replacements for existing software written in Rust"]]></title><description><![CDATA[
<p><i>> because you don't have a reason to reinvent the wheel [in Rust]</i><p>This is a somewhat comical statement in a thread about "Rewrite it in Rust."</p>
]]></description><pubDate>Fri, 28 May 2021 15:26:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=27316514</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=27316514</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27316514</guid></item><item><title><![CDATA[New comment by smitherfield in "Preparing Rustls for Wider Adoption"]]></title><description><![CDATA[
<p>No evidence? We know for a fact that US, Russian, Chinese, British, Israeli etc. intelligence agencies are looking for crypto vulnerabilities, and we know for a fact that they do not publicize the vulnerabilities they find.</p>
]]></description><pubDate>Wed, 21 Apr 2021 18:18:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=26893447</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26893447</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26893447</guid></item><item><title><![CDATA[New comment by smitherfield in "Preparing Rustls for Wider Adoption"]]></title><description><![CDATA[
<p>That's if you look at major PUBLICIZED attacks on TLS endpoints. It's quite plausible that the people who've found (i.e. are looking for) attacks based on incorrect crypto aren't publicizing them.</p>
]]></description><pubDate>Wed, 21 Apr 2021 02:49:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=26884880</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26884880</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26884880</guid></item><item><title><![CDATA[New comment by smitherfield in "We need to know the origin of Covid-19"]]></title><description><![CDATA[
<p>But it wasn't an adverse inference in that case, at least not from Saddam's perspective. He <i>wanted</i> the world to believe he had WMDs, because he believed, not unreasonably (c.f. North Korea), that this would deter military action by the U.S. and his other enemies (Iran, Syria, Israel, Saudi Arabia).</p>
]]></description><pubDate>Tue, 20 Apr 2021 15:35:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=26876033</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26876033</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26876033</guid></item><item><title><![CDATA[New comment by smitherfield in "[dead]"]]></title><description><![CDATA[
<p>Mondale proposed some interesting ideas during his Presidential campaign, in particular a national industrial policy, that I think we would have done well to take heed of.</p>
]]></description><pubDate>Tue, 20 Apr 2021 15:05:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=26875657</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26875657</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26875657</guid></item><item><title><![CDATA[New comment by smitherfield in "We need to know the origin of Covid-19"]]></title><description><![CDATA[
<p>I would (and do) consider it very suspicious.</p>
]]></description><pubDate>Tue, 20 Apr 2021 14:41:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=26875316</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26875316</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26875316</guid></item><item><title><![CDATA[New comment by smitherfield in "We need to know the origin of Covid-19"]]></title><description><![CDATA[
<p>This is more like if the police come to search your house, and find that you've burned it down, or you've barricaded yourself inside with guns and hostages.<p>But, let's assume for the sake of argument that your analogy is the correct one. You know where they assume that if you don't let the police search your house, or if you don't answer police questions, you must be guilty? China.<p>So, we can just as easily judge the Chinese government by another heuristic: The Golden Rule</p>
]]></description><pubDate>Tue, 20 Apr 2021 13:33:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=26874412</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26874412</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26874412</guid></item><item><title><![CDATA[New comment by smitherfield in "We need to know the origin of Covid-19"]]></title><description><![CDATA[
<p>I think a useful concept with this is the legal doctrine of <i>adverse inference.</i>[1] If one of the parties to a lawsuit conceals or destroys important evidence, it is assumed that that evidence would have been unfavorable to the party which concealed or destroyed it.<p>So, while we may not be able to know for sure how COVID-19 originated, we can certainly draw an adverse inference from the behavior of the Chinese government.<p>[1] <a href="https://en.wikipedia.org/wiki/Adverse_inference" rel="nofollow">https://en.wikipedia.org/wiki/Adverse_inference</a></p>
]]></description><pubDate>Tue, 20 Apr 2021 12:48:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=26873840</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=26873840</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26873840</guid></item><item><title><![CDATA[New comment by smitherfield in "Chrome 77 Breaking Drag and Drop Events"]]></title><description><![CDATA[
<p><i>"Or have everything you do on the web be phoned to Google, to improve your advertising experience."</i><p>Chrome <i>already</i> does this.</p>
]]></description><pubDate>Fri, 11 Oct 2019 15:13:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=21225142</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=21225142</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=21225142</guid></item><item><title><![CDATA[New comment by smitherfield in "Makefiles – Best Practices"]]></title><description><![CDATA[
<p>Speaking of, why both -ansi and -std=99 [<i>sic</i>[1]]?<p>[1] should be -std=c99</p>
]]></description><pubDate>Fri, 01 Feb 2019 19:52:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=19057812</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19057812</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19057812</guid></item><item><title><![CDATA[New comment by smitherfield in "A proposed API for full-memory encryption"]]></title><description><![CDATA[
<p>All the discussion ITT so far has been about the concept or hardware implementation of full-memory encryption. I'm wondering if anyone has thoughts about the proposed API.</p>
]]></description><pubDate>Thu, 31 Jan 2019 18:15:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=19047158</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19047158</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19047158</guid></item><item><title><![CDATA[New comment by smitherfield in "Benchmarks of Cache-Friendly Data Structures in C++"]]></title><description><![CDATA[
<p>Yeah, that's one of my biggest pet peeves when looking at other people's code (along with unnecessary dynamic allocations in general). One of the reasons I perhaps irrationally still prefer C++ to Rust is the pervasive use of dynamic arrays of known static size in the latter's documentation, and how it makes fixed-size arrays much less ergonomic to use than dynamic arrays.</p>
]]></description><pubDate>Wed, 30 Jan 2019 20:12:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=19038942</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19038942</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19038942</guid></item><item><title><![CDATA[New comment by smitherfield in "Benchmarks of Cache-Friendly Data Structures in C++"]]></title><description><![CDATA[
<p>Why wouldn't an implementation along these lines be performant?<p><pre><code>  template<typename... Ts>
  class SoA : public tuple<vector<Ts>...> {
          // ...
          template<size_t... Is>
          tuple<Ts&...> subscript(size_t i, index_sequence<Is...>) {
                  return {get<Is>(*this)[i]...};
          }
  public:
          // ...
          auto operator[](size_t i) {
                  return subscript(i, index_sequence_for<Ts...>{});
          }
  };</code></pre></p>
]]></description><pubDate>Wed, 30 Jan 2019 19:22:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=19038321</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19038321</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19038321</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p>Here's my second reply to him, where I myself point out that idealized Von Neumann machines don't exist in real life, and certain idealized O(n) operations (such as memcpy) may in real life for any possible "n" be cheaper than some baseline constant C (such as the cost of a Ruby method call): <a href="https://news.ycombinator.com/item?id=18988075#19001585" rel="nofollow">https://news.ycombinator.com/item?id=18988075#19001585</a></p>
]]></description><pubDate>Fri, 25 Jan 2019 19:42:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=19001682</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19001682</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19001682</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p><i>> "Technically" O(n) is the only O(n).</i><p>In idealized algorithmic analysis, but not necessarily real life. "Amortized O(1)," which I assume you concede is a commonly-used, meaningful and legitimate term, means "technically" an idealized O(>1) but O(1) in practice.<p>Calling memcpy inside a Ruby method call is amortized O(1) because for any "n" that fits within available memory, it will always be <i>much</i> faster than the other things in a Ruby method call, which involve dozens of locks, hash table lookups with string keys, dynamic type checks, additional Ruby method calls and so forth.<p>Likewise, computational complexity on an idealized Von Neumann machine isn't always the same on a real computer, in both directions. Dynamic allocations are theoretically O(n) but may be O(1) if the program never exceeds the preallocated space. Or suppose there were a loop over an array of pointers which dereferenced each pointer; the dereferences are theoretically O(1) but may be O(n) if they evict the parent array from the cache.<p><i>> What is the common case in your view?</i><p>Such as an array small enough that it can be copied with 10 or fewer vector load/stores.<p><i>> O(3n) = O(2n) = O(n)</i><p>Yes, that's my point. It's impossible to implement the example in less than idealized O(n) time, so O(n) and O(1) operations are equivalent complexity-wise WRT the entire method.</p>
]]></description><pubDate>Fri, 25 Jan 2019 19:33:18 +0000</pubDate><link>https://news.ycombinator.com/item?id=19001585</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19001585</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19001585</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p>See my reply to boomlinde: <a href="https://news.ycombinator.com/item?id=18988075#19000005" rel="nofollow">https://news.ycombinator.com/item?id=18988075#19000005</a></p>
]]></description><pubDate>Fri, 25 Jan 2019 17:36:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=19000248</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19000248</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19000248</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p><i>>No, you still need to copy the old array to the new array.</i><p>That's just a lock (nontrivial but O(1)) and a memcpy (technically O(n) but trivial, and O(1) for the common case if it's implemented with vector instructions), plus in any event the sums-of-neighbors method has to be at least O(n) on an idealized Von Neumann machine because it must read every element of the source array and also write every element of the destination.</p>
]]></description><pubDate>Fri, 25 Jan 2019 17:14:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=19000005</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=19000005</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=19000005</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p>Prepending would be O(1) because it's creating a new array instead of prepending in place. Still bugs me (seems inelegant, even if not necessarily inefficient) so I wrote my own version: <a href="https://news.ycombinator.com/item?id=18988075#18998572" rel="nofollow">https://news.ycombinator.com/item?id=18988075#18998572</a></p>
]]></description><pubDate>Fri, 25 Jan 2019 15:32:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=18998764</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=18998764</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=18998764</guid></item><item><title><![CDATA[New comment by smitherfield in "Special Cases Are a Code Smell"]]></title><description><![CDATA[
<p>Yeah, a little OCD but I couldn't stand the first example (and some of the others). Here's a more reasonable implementation that doesn't special case (or more precisely wraps the special-casing in a standard library method):<p><pre><code>  class Array
    def neighbor_sums
      map.with_index do |_, i|
        fetch(i - 1 & 0xFF_FF_FF_FF, 0) + fetch(i + 1, 0)
      end
    end
  end

  [1, 1, 1, 1].neighbor_sums # [1, 2, 2, 1]</code></pre></p>
]]></description><pubDate>Fri, 25 Jan 2019 15:10:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=18998572</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=18998572</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=18998572</guid></item><item><title><![CDATA[New comment by smitherfield in "Is C++ fast?"]]></title><description><![CDATA[
<p>Yes, but only if you first call<p><pre><code>  ios::sync_with_stdio(false);</code></pre>
<a href="https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdio" rel="nofollow">https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdi...</a></p>
]]></description><pubDate>Fri, 18 Jan 2019 19:34:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=18942201</link><dc:creator>smitherfield</dc:creator><comments>https://news.ycombinator.com/item?id=18942201</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=18942201</guid></item></channel></rss>