<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: pdkl95</title><link>https://news.ycombinator.com/user?id=pdkl95</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 09 Apr 2026 05:25:25 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=pdkl95" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by pdkl95 in "Diagnosing Mental Health Disorders Through AI Facial Expression Evaluation"]]></title><description><![CDATA[
<p>> a crappy but cost-effective approach with a high margin of error may rise to prominence.<p>The tech startup that eventually creates that will call this "efficiency". This type of 'solution' is exactly what capitalism creates.<p>> I would love to have a real-time dashboard/HUD with measures of disorganized speech patterns or affective intensity<p>> It would be hard to make it not distracting<p>Not only would it be distracting, it could also bias you in unexpected ways.<p>> I would love to have a real-time dashboard/HUD with measures of disorganized speech patterns or affective intensity,<p>I already don't trust a lot of the mental health industry because of the very bad experiences[1] I've had in the past. The easiest/fastest way to guarantee I never visit a psychiatrist again is to start using that kind of "AI" tech without first showing me the source code. "Magic" hidden algorithms are already a problem in other medical situations like pacemakers[2] and CPAP[3] devices.<p>> make up for the trade-off of not being in the room<p>Maybe what you need isn't some sort of "AI" or other tech buzzword. It sounds like you need better <i>communication technology</i> that doesn't lose as much information.<p>--<p>On the more general topic of "AI in psychiatry", I strongly encourage you to play the visual novel <i>Eliza</i>[4] by Zachtronics. It's about your fear of a cheap, high error rate system with an additional twist: the same system also optimizes <i>your</i> role into a "gig economy" job.<p>[1] a brief description of one of those experiences: <a href="https://news.ycombinator.com/item?id=26035775" rel="nofollow">https://news.ycombinator.com/item?id=26035775</a><p>[2] <a href="https://www.youtube.com/watch?v=k2FNqXhr4c8" rel="nofollow">https://www.youtube.com/watch?v=k2FNqXhr4c8</a><p>[3] <a href="https://www.vice.com/en/article/xwjd4w/im-possibly-alive-because-it-exists-why-sleep-apnea-patients-rely-on-a-cpap-machine-hacker" rel="nofollow">https://www.vice.com/en/article/xwjd4w/im-possibly-alive-bec...</a><p>[4] <a href="https://www.zachtronics.com/eliza/" rel="nofollow">https://www.zachtronics.com/eliza/</a></p>
]]></description><pubDate>Wed, 03 Aug 2022 18:34:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=32335269</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=32335269</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32335269</guid></item><item><title><![CDATA[New comment by pdkl95 in "The Dhall Configuration Language"]]></title><description><![CDATA[
<p>> What practical advantages are there?<p>The major advantage of a language that isn't Turing complete is not having the major <i>risk</i> inherent to Turing complete languages: asking if any non-trivial program will produce <i>any</i> given result or behavior is <i>undecidable</i>[1].<p>> write a program that runs until the heat death of the universe even in a Turing-incomplete language.<p>The Halting Problem is just a simple example of program behavior. The undecidability extends to any other behavior. Asking if a given program will behave maliciously is still undecidable even if we only consider the set of programs that <i>do</i> halt in a reasonable amount of time.<p>When you are using a regular language or deterministic pushdown automata, questions about the behavior or even asking if two implementations are equivalent is <i>decidable</i>. It is at lest <i>possible8 to create software/tools to help answer the question "is this input safe." When you use a non-deterministic pushdown automata or stronger, you problem becomes provably </i>undecidable*,<p>I highly recommend the talk "The Science of Insecurity"[2].<p>[1] <a href="https://en.wikipedia.org/wiki/Rice%27s_theorem" rel="nofollow">https://en.wikipedia.org/wiki/Rice%27s_theorem</a><p>[2] video: <a href="https://archive.org/details/The_Science_of_Insecurity_" rel="nofollow">https://archive.org/details/The_Science_of_Insecurity_</a> slides: [pdf] <a href="https://langsec.org/insecurity-theory-28c3.pdf" rel="nofollow">https://langsec.org/insecurity-theory-28c3.pdf</a></p>
]]></description><pubDate>Fri, 15 Jul 2022 04:06:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=32104508</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=32104508</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32104508</guid></item><item><title><![CDATA[New comment by pdkl95 in "FEMA Planning Guidance for Response to a Nuclear Detonation [pdf]"]]></title><description><![CDATA[
<p>Sun Ra, "Nuclear War"<p><pre><code>    It's a motherfucker
    don't you know

    If they push that button
    Your ass got to go

    What you gonna do
    Without your ass
</code></pre>
<a href="https://www.youtube.com/watch?v=lsPrINajncU" rel="nofollow">https://www.youtube.com/watch?v=lsPrINajncU</a></p>
]]></description><pubDate>Wed, 13 Jul 2022 01:00:05 +0000</pubDate><link>https://news.ycombinator.com/item?id=32077794</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=32077794</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32077794</guid></item><item><title><![CDATA[New comment by pdkl95 in "Police CyberAlarm Uses Alarming Cryptography"]]></title><description><![CDATA[
<p>> The problem is that the people using said libraries don't know what they're doing.<p>I would like to suggest that the problem is that the skilled people that understand how to write crypto systems are providing <i>libraries</i> that are easy to misuse. Instead of providing a library that is likely to be used incorrectly without a lot of specialized knowledge, provide <i>infrastructure</i> that manages the crypto so the average developer doesn't <i>need</i> to become an expert on crypto systems.<p>HTTPS is a useful example. Instead of providing webapp authors a library of cypher/hash functions and warning that they shouldn't roll their own transport layer security and then acting shocked when those authors try to use that library and make a lot of mistakes, we instead separate the crypto step into a separate layer of infrastructure so the average webapp author can easily <i>use</i> crypto without having to learn a lot of specialized knowledge. Someone writing a Ruby on Rails app shouldn't have to write functions like pervade_encrypt($data)/pervade_decrypt($data) to move out of the plaintext world of HTTP and utilize encrypted transport. They only need to buy/LetsEncrypt a cert they can install in their webserver. They can even delegate that to their hosting provider.<p>"If it's possible for a human to hit the wrong button and [cause a catastrophic failure] by accident [or inexperience], then maybe the problem isn't with the human - it's with that button. [...] People make mistakes, and all of our systems need to be designed to be ready for that."<p>>> Tom Scott, <a href="https://www.youtube.com/watch?v=dabnx8VSdkE" rel="nofollow">https://www.youtube.com/watch?v=dabnx8VSdkE</a></p>
]]></description><pubDate>Mon, 04 Jul 2022 19:31:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=31980832</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31980832</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31980832</guid></item><item><title><![CDATA[New comment by pdkl95 in "What will a Chromium-only Web look like?"]]></title><description><![CDATA[
<p>A single-browser web, like any monoculture, dramatically increases the potential damage of common mode failure. With everything - even important infrastructure and services - becoming directly or transitively dependent on the the web, we should be <i>diversifying</i> the browser ecosystem to limit the scope of a class break[1].<p>[1] <a href="https://www.schneier.com/blog/archives/2017/01/class_breaks.html" rel="nofollow">https://www.schneier.com/blog/archives/2017/01/class_breaks....</a></p>
]]></description><pubDate>Wed, 22 Jun 2022 12:02:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=31834916</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31834916</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31834916</guid></item><item><title><![CDATA[New comment by pdkl95 in "Bunny fonts – privacy respecting drop-in replacement for Google Fonts"]]></title><description><![CDATA[
<p>> is relatively high entropy at <= 13-bits<p>That is only true <i>if-and-only-if</i> we pretend those 13 bits are the only identifying information being sent to Google when requesting a font. The HTTP request is almost certainly being sent to Google wrapped inside an IP protocol packet. For most[1] requests, there are <i>at least</i> 24 additional bits (why 24? see: [3]) of very-identifying data in the IPv4 Source Address field. More fingerprinting can be probably done on other protocol fields, and IPv6 obviously adds an additional 96 bits. Yes, IP addresses are not unique, but ~13 bits is easily sufficient to disambiguate most hosts on a private network behind a typical NAT. Correlating the tuple {IPv4 Src Addr, x-client-data} received on a font request is trivial: it only requires a user to login to any Google webpage that includes a font request.<p>>> re: your [1]<p><pre><code>    A given Chrome installation may be participating in a number
    of different variations (for different features) at the
    same time. These fall into two categories:

       Low entropy variations, which are randomized based
         on a number from 0 to 7999 (13 bits) that's randomly
         generated by each Chrome installation on the first run.

       High entropy variations, which are randomized using
         the usage statistics token for Chrome installations
         that have usage statistics reporting enabled.
</code></pre>
How many users have 'usage statistics reporting' enabled, and are there for a "High entropy variation"? Is it enabled by default and thus will only be disabled by the minority of people that know how to opt-out?<p>[1] Google reports[2] they currently see about a 60%/40% ratio of IPv4/IPv6.<p>[2] <a href="https://www.google.com/intl/en/ipv6/statistics.html" rel="nofollow">https://www.google.com/intl/en/ipv6/statistics.html</a><p>[3] my previous posts on this topic - re: x-client-data <a href="https://news.ycombinator.com/item?id=23562285" rel="nofollow">https://news.ycombinator.com/item?id=23562285</a> re: 24-bits-per-IPv4 <a href="https://news.ycombinator.com/item?id=15167059" rel="nofollow">https://news.ycombinator.com/item?id=15167059</a></p>
]]></description><pubDate>Sun, 19 Jun 2022 17:51:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=31801622</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31801622</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31801622</guid></item><item><title><![CDATA[New comment by pdkl95 in "Shimano Forces Hammerhead to Remove All Di2 Related Functionality From Karoo"]]></title><description><![CDATA[
<p>The solution to this type of intentionally incompatible product is to return to a legal and cultural environment that respects <i>adversarial interoperability[1]</i>. If a company doesn't want to implement the features people want[2], some other company should be able to provide their own (possibly reverse engineered) implementation.<p>Trying to restrict competitors from making interoperable products is admitting you don't want to participate in a well-running competitive market and instead deserve monopoly power.<p>[1] <a href="https://www.eff.org/deeplinks/2019/10/adversarial-interoperability" rel="nofollow">https://www.eff.org/deeplinks/2019/10/adversarial-interopera...</a><p>[2] including features like interoperability with a competitor's product.</p>
]]></description><pubDate>Fri, 03 Jun 2022 08:51:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=31605835</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31605835</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31605835</guid></item><item><title><![CDATA[New comment by pdkl95 in "Welcome to the era of the hyper-surveilled office"]]></title><description><![CDATA[
<p>> based on their facial expression<p>Phrenology is still pseudo=scientific bullshit even when the calipers[1] are replaced with an "AI" black box of software.<p>> Just need software that punishes employees who aren't happy enough at work, then we'll have a proper nightmare.<p>"RSA ANIMATE: Smile or Die"[2]<p>[1] <a href="https://images1.bonhams.com/image?src=Images/live/2006-06/16/94302055-1-2.jpg&width=960" rel="nofollow">https://images1.bonhams.com/image?src=Images/live/2006-06/16...</a><p>[2] <a href="https://www.youtube.com/watch?v=u5um8QWWRvo" rel="nofollow">https://www.youtube.com/watch?v=u5um8QWWRvo</a></p>
]]></description><pubDate>Tue, 10 May 2022 13:15:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=31326712</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31326712</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31326712</guid></item><item><title><![CDATA[New comment by pdkl95 in "Your phone may soon replace many of your passwords"]]></title><description><![CDATA[
<p>Sci-fi is often a <i>metaphorical</i> representation of society. However, it's shocking how many episodes of Max Headroom have become <i>literally</i> true.</p>
]]></description><pubDate>Sun, 08 May 2022 03:00:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=31300860</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31300860</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31300860</guid></item><item><title><![CDATA[New comment by pdkl95 in "Your phone may soon replace many of your passwords"]]></title><description><![CDATA[
<p>> I could not enter my own apartment because my phone was dead<p>Whenever I hear about "smart" devices as a replacement for something that is safety/security critical (like a lock), the question of what happens when the internet and/or power fails is rarely even considered. Does the lock fail open or closed? Does the door open if there is a fire in the building that damages the internet/power wiring? If it fails open, does that mean someone can bypass the lock by simply cutting the network/power cables <i>outside</i> the building?<p>There might be reasonable answers to these questions at a large business building that can afford fallback options, but I'm not sure there are good answers for e.g. residential situations.</p>
]]></description><pubDate>Sun, 08 May 2022 02:56:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=31300838</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31300838</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31300838</guid></item><item><title><![CDATA[New comment by pdkl95 in "Your phone may soon replace many of your passwords"]]></title><description><![CDATA[
<p><i>Max Headroom</i>, Episode ABC.1.3: "Body Banks":<p><pre><code>    Paula: "...what's that?"
    Blank Reg: "It's a book!"
    Paula: "Well, what's that?"
    Blank Reg: "It's a non-volatile storage medium.
                It's very rare. You should have one."
</code></pre>
<a href="https://www.youtube.com/watch?v=KIWR-b42lU0" rel="nofollow">https://www.youtube.com/watch?v=KIWR-b42lU0</a></p>
]]></description><pubDate>Sun, 08 May 2022 02:33:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=31300706</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31300706</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31300706</guid></item><item><title><![CDATA[New comment by pdkl95 in "Why Ruby Has Symbols"]]></title><description><![CDATA[
<p>While other comments have discussed the technical utility of symbols, I believe symbols can also be seen as useful syntactic sugar that helps communicate <i>intent</i>. Strings used for indexes. named args, and other structural purposes can be represented in a way that is visually distinct from strings used as text.<p>The technical benefits are nice, but this type of ergonomic feature is why ruby has remained my favorite language for over a decade.</p>
]]></description><pubDate>Thu, 14 Apr 2022 16:03:21 +0000</pubDate><link>https://news.ycombinator.com/item?id=31028768</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31028768</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31028768</guid></item><item><title><![CDATA[New comment by pdkl95 in "Automate Public Certificates Lifecycle Management via RFC 8555 (ACME)"]]></title><description><![CDATA[
<p>> first they become the dominant acme provider<p>The traditional way a big tech company becomes the dominant provider is to <i>embrace</i> an open interoperable protocol to minimize the friction of switching from another provider. Later, when they have captured enough of the market, they <i>extend</i> the protocol to gradually reduce the <i>de facto</i> interoperability with other providers to increase the friction of switching to any other provider.<p><a href="https://en.wikipedia.org/wiki/Embrace%2C_extend%2C_and_extinguish" rel="nofollow">https://en.wikipedia.org/wiki/Embrace%2C_extend%2C_and_extin...</a></p>
]]></description><pubDate>Tue, 12 Apr 2022 09:19:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=31000334</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=31000334</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31000334</guid></item><item><title><![CDATA[New comment by pdkl95 in "Daniel Gross: Why Energy Is the Best Predictor of Talent"]]></title><description><![CDATA[
<p>Using language like "fire fast" might presuppose a situation where someone is going to be "hired" - possibly involving a lot of work, life changes, and moving/other expenses - only to have their effort/money wasted when they are "fired fast".<p>What if instead of "fire fast", the idea was re-framed/restructured into the new employee initially working as some sort of consultant with a short term contract? Use telecommuting/work-from-home or other temporary workarounds to defer expensive/disruptive things like moving to live near the company until <i>after</i> the defined "trial" period. Instead of "firing fast", you either let the temporary consulting contract expire or you proceed with the actual hiring process and the deferred tasks.<p>Maybe this isn't possible in practice, but it seems like we could design a workaround to this problem if were sufficiently creative.<p>> think about the effects it has on others<p>Unfortunately, that takes proactive effort. Unless there is a mechanism to actively incentivize spending time and energy to protect others, most of the time that effort will be spent on "more important" things. ~sigh~</p>
]]></description><pubDate>Sat, 02 Apr 2022 01:38:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=30885138</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=30885138</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30885138</guid></item><item><title><![CDATA[New comment by pdkl95 in "Circumventing Deep Packet Inspection with Socat and Rot13"]]></title><description><![CDATA[
<p><a href="http://www.ranum.com/security/computer_security/editorials/dumb/" rel="nofollow">http://www.ranum.com/security/computer_security/editorials/d...</a><p>"The Six Dumbest Ideas in Computer Security"<p>> #1) Default Permit<p>> #2) Enumerating Badness</p>
]]></description><pubDate>Sun, 27 Feb 2022 17:33:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=30490487</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=30490487</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30490487</guid></item><item><title><![CDATA[New comment by pdkl95 in "Amazon Pip Horror Story"]]></title><description><![CDATA[
<p><a href="http://web.mnstate.edu/alm/humor/ThePlan.htm" rel="nofollow">http://web.mnstate.edu/alm/humor/ThePlan.htm</a><p><pre><code>  In the beginning, there was a plan, 
  And then came the assumptions,
  And the assumptions were without form, 
  And the plan without substance,

  And the darkness was upon the face of the workers,
  And they spoke among themselves saying,
  "It is a crock of shit and it stinks."

  And the workers went unto their Supervisors and said,
  "It is a pile of dung, and we cannot live with the smell."

  And the Supervisors went unto their Managers saying,
  "It is a container of excrement, and it is very strong, 
  Such that none may abide by it."

  And the Managers went unto their Directors saying,
  "It is a vessel of fertilizer, and none may abide by its strength."

  And the Directors spoke among themselves saying to one another,
  "It contains that which aids plants growth, and it is very strong."

  And the Directors went to the Vice Presidents saying unto them,
  "It promotes growth, and it is very powerful."

  And the Vice Presidents went to the President, saying unto him,
  "This new plan will actively promote the growth and vigor 
  Of the company With very powerful effects."

  And the President looked upon the Plan 
  And saw that it was good,
  And the Plan became Policy.

  And this, my friend, is how shit happens.</code></pre></p>
]]></description><pubDate>Fri, 04 Feb 2022 12:34:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=30205981</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=30205981</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30205981</guid></item><item><title><![CDATA[New comment by pdkl95 in "Naomi Wu video demonetized on YouTube"]]></title><description><![CDATA[
<p>While some people certainly seem to subscribe to "feeling their masculinity/world-view is threatened" interpretation, the fundamental problem that q lot of people don't seem to understand is that the internet changed the mechanics of <i>fame</i>.<p>The best explanation I've seen - and possibly the most important video on youtube - is "This Is Phil Fish"[1] by Innuendo Studios. It's not <i>really</i> about Phil Fish; it's about everyone who <i>isn't</i> Phil Fish acted when they decided he became "famous". In the past, being "on tv" or "in a band" or other traditional examples of fame required some amount of <i>buying into</i> fame. Becoming famous required <i>media access</i> that was controlled by gatekeepers. You had to work with those gatekeepers if you wanted to be "on tv" or whatever, and because you had to <i>choose</i> to participate, people often see the decision to become famous as also accepting some amount of <i>responsibility</i> to "act like famous people are supposed to act".<p>This internet fundamentally changed the mechanics of fame, because the <i>internet IS media access</i>. Now it is possible to become famous - to become a "celebrity" with a "responsibility" to act in a certain way - simply by being yourself in your normal everyday life.<p>[1] <a href="https://www.youtube.com/watch?v=PmTUW-owa2w" rel="nofollow">https://www.youtube.com/watch?v=PmTUW-owa2w</a></p>
]]></description><pubDate>Thu, 27 Jan 2022 11:55:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=30099400</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=30099400</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30099400</guid></item><item><title><![CDATA[This Is Phil Fish (2014) [video]]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=PmTUW-owa2w">https://www.youtube.com/watch?v=PmTUW-owa2w</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=30099077">https://news.ycombinator.com/item?id=30099077</a></p>
<p>Points: 2</p>
<p># Comments: 0</p>
]]></description><pubDate>Thu, 27 Jan 2022 11:18:18 +0000</pubDate><link>https://www.youtube.com/watch?v=PmTUW-owa2w</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=30099077</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30099077</guid></item><item><title><![CDATA[2D projection of a 3D cube in Poly Bridge 2]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=_HN1Q29F2Zg">https://www.youtube.com/watch?v=_HN1Q29F2Zg</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29894987">https://news.ycombinator.com/item?id=29894987</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 11 Jan 2022 17:54:20 +0000</pubDate><link>https://www.youtube.com/watch?v=_HN1Q29F2Zg</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=29894987</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29894987</guid></item><item><title><![CDATA[New comment by pdkl95 in "Show HN: A pure bash web server. No netcat, socat, etc."]]></title><description><![CDATA[
<p>Regarding the creation and removal of a tempfile (line 72 & 85):<p><pre><code>    local tmpFile="${TMPDIR:-/tmp/bash-web-server.$$}"

    # ...

    rm "$tmpFile"
</code></pre>
To avoid collisions when the PID is reused, and to clean up0 the tempfile on errors, I recommend using mktemp and trap:<p><pre><code>    local tmpfile="$(mktemp --tmpdir="${TMPDIR:-/tmp}" bash-web-server.XXXXXX)"
    trap "rm -f \"${tmpfile}\"" RETURN EXIT

    # ...

    # Do nothing at the end of the function; trap will
    # remove the file at RETURN automatically.
</code></pre>
Otherwise, I like the implementation! It's nice to see good bash techniques like parsing with "IFS='&' read -ra data" and rewriting variables with %%/etc.</p>
]]></description><pubDate>Tue, 04 Jan 2022 15:47:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=29796002</link><dc:creator>pdkl95</dc:creator><comments>https://news.ycombinator.com/item?id=29796002</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29796002</guid></item></channel></rss>