<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: faho</title><link>https://news.ycombinator.com/user?id=faho</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 10 Jun 2026 09:00:43 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=faho" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by faho in "Fish 4"]]></title><description><![CDATA[
<p>The rust cygwin target has been merged (in a different attempt): <a href="https://github.com/rust-lang/rust/pull/134999">https://github.com/rust-lang/rust/pull/134999</a></p>
]]></description><pubDate>Thu, 27 Feb 2025 14:06:27 +0000</pubDate><link>https://news.ycombinator.com/item?id=43194490</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=43194490</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43194490</guid></item><item><title><![CDATA[New comment by faho in "Fish 4.0: The Fish of Theseus"]]></title><description><![CDATA[
<p>No, they work in zsh, with one extremely small change: The referenced variable needs to exist.<p>Try this (tested with zsh 5.9 on archlinux):<p><pre><code>    foo='PWD[$(echo hahaha >&2)0]+42'
    [[ "$foo" -eq 5 ]]
</code></pre>
In bash, this would also print "hahaha" with "a" (or any other possible variable name) instead of "PWD", that's why many think it doesn't work <i>at all</i> in zsh.<p>I'm pretty sure zsh has an optimization where it skips the indexing if the variable doesn't exist, which happens to sometimes stop this. But since you can just reference variables like PWD, that you know exist, it's not really a security improvement.</p>
]]></description><pubDate>Sun, 29 Dec 2024 19:54:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=42542488</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=42542488</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42542488</guid></item><item><title><![CDATA[New comment by faho in "Fish 4.0: The Fish of Theseus"]]></title><description><![CDATA[
<p>Fish has always used utf-32 codepoints stored in wchar_t, from the first git commit in 2005.<p>Unfortunately it's pervasive throughout the entire codebase (which does a lot of string shuffling).<p>So it's a historical mistake, but not something to be fixed in the same step as switching the implementation language.<p>bstr was mentioned as a direction and is a possibility.</p>
]]></description><pubDate>Sun, 29 Dec 2024 18:42:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=42541907</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=42541907</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42541907</guid></item><item><title><![CDATA[New comment by faho in "Matrix 2.0: How we’re making Matrix go voom"]]></title><description><![CDATA[
<p>>Matrix's moderation should be at least as good as Gitter<p>Well, yes and no. The moderation features might be the same, but:<p>1. It's a lot easier to make matrix accounts, especially if you run your own server.<p>2. The user interface for blocking an entire server is basically missing? The only thing I can find has you run a bot to do it?<p>So if someone with their own homeserver wants to troll you, you end up playing wack-a-mole unless you self-host a bot. At least that's the best I can find so far.</p>
]]></description><pubDate>Mon, 13 Feb 2023 21:07:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=34780503</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=34780503</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34780503</guid></item><item><title><![CDATA[New comment by faho in "Unravelling 'if' statements"]]></title><description><![CDATA[
<p>The idea behind this series of posts is to see how much of <i>python</i>, concretely, is syntactic sugar and how much is necessary. How much could you do with e.g. doing macro transformation on top of a minimal core?<p>The last post before this was titled: "MVPy: Minimum Viable Python".<p>So, since python doesn't <i>have</i> goto, you can't replace while with an if with two gotos (without adding a goto to the language).<p>You can replace an `if` with a while tho, easily.</p>
]]></description><pubDate>Mon, 31 Oct 2022 21:18:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=33413335</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=33413335</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=33413335</guid></item><item><title><![CDATA[New comment by faho in "You Shouldn't Use Manjaro"]]></title><description><![CDATA[
<p>Arch already has the nvidia drivers in the normal repos. You can just install them.<p>This isn't something Manjaro adds.</p>
]]></description><pubDate>Thu, 18 Aug 2022 06:01:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=32505852</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32505852</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32505852</guid></item><item><title><![CDATA[New comment by faho in "Dotfiles being hidden is a UNIXv2 mistake (2012)"]]></title><description><![CDATA[
<p>Depends on your echo. Zsh's interpretes escape sequences by default unless the "BSD_ECHO" option is used, bash's doesn't unless "xpg_echo" is on.<p>And xpg_echo is on by default for bash on macOS, so for users on macOS it looks like echo interprets escapes by default.<p>This is one of the reasons why echo is hopelessly unportable.<p>See <a href="https://unix.stackexchange.com/a/65819/55665" rel="nofollow">https://unix.stackexchange.com/a/65819/55665</a></p>
]]></description><pubDate>Fri, 12 Aug 2022 06:44:51 +0000</pubDate><link>https://news.ycombinator.com/item?id=32435316</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32435316</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32435316</guid></item><item><title><![CDATA[New comment by faho in "A Tutorial on Portable Makefiles (2017)"]]></title><description><![CDATA[
<p>One issue is that make will default to only using one job (i.e. one cpu), and you need to pass `-j NUMBER` to make it use more, while Ninja is parallel by default.<p>For my uses, I've not found `ninja` to be much faster than `make -j8` on an 8-core machine.<p>Not that the defaults don't matter, of course.</p>
]]></description><pubDate>Mon, 01 Aug 2022 10:28:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=32304063</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32304063</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32304063</guid></item><item><title><![CDATA[New comment by faho in "What happens when you press a key in your terminal?"]]></title><description><![CDATA[
<p>Bash also turns off the bracketed paste, because it can't know if the command it is about to launch supports it. So that command would have to re-enable it itself. Something like emacs or vim might do so (or another bash, you can nest shells).<p>And yes, then bash starts ls, which is an external program. It might be /usr/bin/ls.<p>And then ls quits, and bash re-enables bracketed paste because the command might have not enabled it or enabled it and disabled it before quitting. So you get this weird bracketed paste sandwich.</p>
]]></description><pubDate>Thu, 21 Jul 2022 17:52:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=32182528</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32182528</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32182528</guid></item><item><title><![CDATA[New comment by faho in "What happens when you press a key in your terminal?"]]></title><description><![CDATA[
<p>"\r", "carriage return", is what the return/enter key sends (either that or "\n", it's configurable).<p>So what's being sent from the terminal to bash here is "ls" (which is echoed back) and then the return/enter key, which bash interprets as "run the command".<p>So it sends "\r\n" to the terminal (this is "recv" in that notation), which moves the cursor to the beginning of the line and then to a new line to get the cursor off of the prompt line, and then "\x1b[?2004l", which is the sequence to turn off bracketed paste.<p>Then ls runs and prints "file\r\n", which is the filename "file" on its own line.<p>Then bash takes over again, reenables bracketed paste and prints the prompt. Notably it does <i>not</i> move the cursor to get the prompt on its own line, so when the command didn't end in a newline the prompt hangs in a weird spot - try `printf '%s' foobar`, it'll show your prompt like "foobarbork@kiwi:/play$". There are tricks to get around this.</p>
]]></description><pubDate>Thu, 21 Jul 2022 08:39:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=32177056</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32177056</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32177056</guid></item><item><title><![CDATA[New comment by faho in "How efficient can cat(1) be?"]]></title><description><![CDATA[
<p>The original performance claim was about <a href="https://vimuser.org/cat.c.txt" rel="nofollow">https://vimuser.org/cat.c.txt</a>.<p>Which just does read/write - so it's the same as the "cat-simple" example, which is the slowest listed.<p>GNU cat [0] does copy_file_range if it can and falls back to a read/write loop otherwise, so it's unlikely to be much slower (possibly some overhead from argument parsing, but that's just a constant).<p>So the performance claims are wrong.<p>[0]: <a href="https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/cat.c" rel="nofollow">https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/cat...</a></p>
]]></description><pubDate>Mon, 18 Jul 2022 12:13:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=32137355</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32137355</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32137355</guid></item><item><title><![CDATA[New comment by faho in "How efficient can cat(1) be?"]]></title><description><![CDATA[
<p>First of all: Your code is missing braces around the `if` blocks - the `goto out` would be run unconditionally.<p>But anyway, the case for `goto` here is that it jumps immediately to the cleanup that needs to happen always.<p>If you put something between the loop and that, `break` would jump before that and also execute that.<p>Yes, this is a workaround for C's lack of automatic cleanup (RAII, garbage collection, python's `with` or whatever).</p>
]]></description><pubDate>Mon, 18 Jul 2022 11:17:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=32136877</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32136877</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32136877</guid></item><item><title><![CDATA[New comment by faho in "Postgres 15 improves UNIQUE and NULL"]]></title><description><![CDATA[
<p>>This change prohibits nothing, it allows specifying something (which was a bit complicated to enforce before).<p>It allows specifying a <i>constraint</i> - that you can't have two rows with the same values even if one of the values is a NULL. That's prohibiting duplicate NULLs. The change allows you to prohibit duplicate NULLs.<p>Say you have a table (EmployeeName, CarID). You could do a UNIQUE constraint on those two attributes, but that would still allow:<p>EmployeeName | CarID<p>Jeff         | 2<p>Kim          | NULL<p>Kim          | NULL<p>Here, "Kim" is car-less (NULL in the CarID field) <i>twice</i>, which makes no sense.<p>Hence the new constraint.</p>
]]></description><pubDate>Mon, 11 Jul 2022 09:26:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=32053948</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32053948</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32053948</guid></item><item><title><![CDATA[New comment by faho in "Postgres 15 improves UNIQUE and NULL"]]></title><description><![CDATA[
<p>But an employee can't be car-less twice!<p>That's what this change prohibits.</p>
]]></description><pubDate>Mon, 11 Jul 2022 09:16:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=32053872</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32053872</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32053872</guid></item><item><title><![CDATA[New comment by faho in "The Unix API is more than just system calls or Posix (2018)"]]></title><description><![CDATA[
<p>>But... "the shell and standard utilities and files that are in known locations and standard capabilities and various other things" are also specified by POSIX.<p>Unfortunately, it doesn't specify those known locations. It explicitly declines specifying that /bin/sh exists.<p><a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html" rel="nofollow">https://pubs.opengroup.org/onlinepubs/9699919799/utilities/s...</a> says:<p>> Applications should note that the standard PATH to the shell cannot be assumed to be either /bin/sh or /usr/bin/sh, and should be determined by interrogation of the PATH returned by getconf PATH, ensuring that the returned pathname is an absolute pathname and not a shell built-in.<p>and it doesn't specify the location of getconf either, so you have a chicken-and-egg problem where you need the standard $PATH to find getconf to get the standard $PATH.</p>
]]></description><pubDate>Mon, 11 Jul 2022 06:28:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=32052886</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=32052886</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32052886</guid></item><item><title><![CDATA[New comment by faho in "What's New in Python 3.11?"]]></title><description><![CDATA[
<p>These files <i>are already in toml</i>, so it's only "unnecessary" if you ask for them to switch the file format.<p>Otherwise, adding tools to the standard library to read file formats required by the ecosystem is a good idea, regardless of whether you agree with the particular format.</p>
]]></description><pubDate>Mon, 27 Jun 2022 11:53:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=31893256</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=31893256</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31893256</guid></item><item><title><![CDATA[New comment by faho in "What's New in Python 3.11?"]]></title><description><![CDATA[
<p>The first two lines are setup, real code would already have done that.<p>You could <i>maybe</i> count the import, but you'd have to do that once and could do multiple bisections, so it's amortized.<p>Setting the variable doesn't count because you do, of course, need a variable to perform an operation on a variable. Sorting the array also wouldn't count because you can't use binary search if the array isn't sorted.</p>
]]></description><pubDate>Mon, 27 Jun 2022 09:04:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=31892144</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=31892144</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31892144</guid></item><item><title><![CDATA[New comment by faho in "What's New in Python 3.11?"]]></title><description><![CDATA[
<p>Or you can implement a binary search in your type's __contains__ and just use `"foo" in c`</p>
]]></description><pubDate>Mon, 27 Jun 2022 09:03:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=31892138</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=31892138</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31892138</guid></item><item><title><![CDATA[New comment by faho in "Cross-compiling binaries for Windows is easier than building natively"]]></title><description><![CDATA[
<p>CentOS 7 may have been released in 2014, but the software it shipped was already quite old then.<p>As a datapoint, CentOS Stream 9 [0], which was released in 2021, and which RHEL 9 (released in May 2022) is based on, is already ~60% out of date according to repology: <a href="https://repology.org/repository/centos_stream_9" rel="nofollow">https://repology.org/repository/centos_stream_9</a>.<p>Also: In computer time, 8 years <i>is</i> "very old". That's longer than the "mainstream support" window for Windows 7 was (from 2009 to 2015), and about as long as the mainstream support window for Windows XP (from 2001 to 2009).<p>[0]: CentOS "Stream" has a different release model and appears to be a bit of a rolling release as I understand it? But that would cause it to be <i>more</i> up-to-date, not less.</p>
]]></description><pubDate>Mon, 20 Jun 2022 09:30:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=31808131</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=31808131</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31808131</guid></item><item><title><![CDATA[New comment by faho in "Fish Shell 3.5.0"]]></title><description><![CDATA[
<p>Fish also enables bracketed paste and does smart escaping when you paste inside single-quotes.<p>(I'm a fish developer)</p>
]]></description><pubDate>Thu, 16 Jun 2022 18:51:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=31769570</link><dc:creator>faho</dc:creator><comments>https://news.ycombinator.com/item?id=31769570</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31769570</guid></item></channel></rss>