<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: marvy</title><link>https://news.ycombinator.com/user?id=marvy</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Mon, 06 Apr 2026 04:40:29 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=marvy" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by marvy in "Advanced Python Features"]]></title><description><![CDATA[
<p>the full story is in the language reference, but the short answer is: __radd__ (unless it's more complicated than I realize)</p>
]]></description><pubDate>Wed, 23 Apr 2025 13:18:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=43771817</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=43771817</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43771817</guid></item><item><title><![CDATA[New comment by marvy in "Beeper Mini is back"]]></title><description><![CDATA[
<p>you can choose; there's an option buried in settings somewhere</p>
]]></description><pubDate>Mon, 11 Dec 2023 21:13:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=38605553</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=38605553</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38605553</guid></item><item><title><![CDATA[New comment by marvy in "Breaking java.lang.String"]]></title><description><![CDATA[
<p>Clever!  I like this!  I feel a bit jealous that I didn't think of it :)<p>It's not quite as easy as it seems, because these methods are "intrinsics".  That is, the pure Java code you see is not always the one that gets used; instead, the JIT compiler can use a faster implementation that uses vectorized assembly or whatever.  (That's why you see "@IntrinsicCandidate" on compress() and toBytes() in StringUTF16.java)<p>But I think your idea would also be possible to implement in vectorized assembly, so it still works!<p>The rule for most things (such as ArrayList) in the JDK is: "if you use race conditions to break this thing, that's your problem, not ours".  But String is different: it's one of the few things meant to be "rock-solid, can't break it even if you try", so I think this bug in String would qualify as a potential security issue in their mind: there are many places in Java that trust Strings not to act weird, and some of them are even in native code deep in the guts of the VM.<p>On the other hand, String is used all over the place so having to introduce a performance regression to fix this bug would be quite painful.  All of the other proposed solutions in this thread introduce an extra copy, and an extra pass over the string.  Your fix is basically no extra cost, and as a bonus, can be tweaked so each char in the array is read only once.<p>Which means that the bug can now be fixed "guilt-free", if anyone from the JDK team is reading this thread.  Though they have some pretty clever people there too, so they might have thought of it eventually for all I know.</p>
]]></description><pubDate>Wed, 12 Jul 2023 03:42:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=36690243</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=36690243</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36690243</guid></item><item><title><![CDATA[New comment by marvy in "When “free forever” means “free for the next 4 months”"]]></title><description><![CDATA[
<p>I feel like there's two sides to this.  On one hand, I agree with Zulip: don't make promises you're not sure can keep.  On the other, you also shouldn't believe promises if the person making them is obviously not in a position to guarantee.<p>Example: suppose I offer you free email hosting "forever".  Should you believe me?  What if I go out of business?  Well, in that case, I can at least ensure that your email address gets transferred to a different provider, so I'll still have kept my promise.  So maybe this particular promise is believable.<p>But that only works because email is more or less a standard so there are many providers.  Suppose I offer something that no one else does.  Can you trust my promise that it will be "free forever"?  Clearly, if I go out of business, then no.<p>Can I at least make a conditional promise that it will be free "as long as I'm in business"?  But suppose I'm a month from bankruptcy, and my accountant tells me that getting rid of my free tier would save me.  Surely, it's better for my free users to lose service rather than ALL my users losing service.  So, unless you're sure I'd never be in that situation, you shouldn't believe me when I say "as long as I'm business this will be free".<p>Okay, how about a vague promise like "this service will keep its free tier around unless the business is in a desperate situation of some kind"?  That's a promise that I could indeed keep, if I decide it's important enough... unless... how sure are you that I'll remain in full control of what is currently "my" business?  What if I take my company public?  I might then be kicked out by the board.  (It happened to Steve Jobs, right?)  So either my "free forever" promise means I'm not allowed to go public, or at least I need to do some very careful legal acrobatics to ensure that the board can't go back on my promise, even if they kick me out.<p>Still, if you find yourself needing to break a promise you made about "forever" a mere month after you made it, you should probably at least apologize instead of just hoping that no one remembers that you ever made such a promise.  Chances are, they will indeed remember.  If "it's the right thing to do" is not enough motivation, then do it for the brownie points, you'll get more of them this way.  ("Who cares about brownie points?" you ask?  Well, clearly, if they weren't worried about brownie points then they wouldn't be playing this weird game of "let's pretend we never said the forever".)</p>
]]></description><pubDate>Sat, 06 May 2023 03:25:54 +0000</pubDate><link>https://news.ycombinator.com/item?id=35837668</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=35837668</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=35837668</guid></item><item><title><![CDATA[New comment by marvy in "Don't believe ChatGPT – we do not offer a "phone lookup" service"]]></title><description><![CDATA[
<p>Thanks for the above.  (nice self-restraint in the last paragraph.)  Things almost make sense now.  Except one problem ... this implies that there are software developers who think to themselves "given a cell phone number, how can I get the phone's location?".<p>And it further implies that these people don't immediately follow that thought with: "That's surely impossible, since it would be a privacy nightmare if literally everyone in the world could track everyone else in the world's every move".<p>Or perhaps with this alternative thought, which would lead to the same conclusion: "let's not worry about privacy, how would this even work?  Does every phone company in the world pro-actively send every customer's location data to OpenCage, just in case someone queries it?  Or does OpenCage wait until it gets a query, and only then query the cell phone company 'just-in-time'?  Both of these sound like a lot of work for each phone company to support ... what's the incentive?"<p>Honestly, I'm a bit surprised that the OpenCage blog post is so calm about this, instead of just yelling incoherently "why WHY why would anyone think like this?!?"</p>
]]></description><pubDate>Sun, 26 Feb 2023 00:56:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=34942022</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=34942022</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34942022</guid></item><item><title><![CDATA[New comment by marvy in "Epochalypse"]]></title><description><![CDATA[
<p>sorry I meant it was an UNSIGNED integer back then</p>
]]></description><pubDate>Thu, 12 Jan 2023 02:20:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=34348305</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=34348305</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34348305</guid></item><item><title><![CDATA[New comment by marvy in "Epochalypse"]]></title><description><![CDATA[
<p>I thought it was settled in Version 4.  Compare:<p><a href="https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time.2" rel="nofollow">https://www.tuhs.org/cgi-bin/utree.pl?file=V3/man/man2/time....</a><p>vs<p><a href="https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/time.2" rel="nofollow">https://www.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/time....</a><p>EDIT: note that back then, it was a signed integer.  Turns out that people wanted to be able to represent dates from before 1970 so we lost one bit.</p>
]]></description><pubDate>Sat, 07 Jan 2023 20:19:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=34292267</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=34292267</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34292267</guid></item><item><title><![CDATA[New comment by marvy in "The road to success is paved with rejection letters"]]></title><description><![CDATA[
<p>Thanks for explaining.  I guess if you ever decide to become a foreign spy, you can point to this as "relevant experience" in THAT job interview.  Or something.</p>
]]></description><pubDate>Sun, 06 Mar 2022 03:37:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=30574812</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=30574812</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30574812</guid></item><item><title><![CDATA[New comment by marvy in "The road to success is paved with rejection letters"]]></title><description><![CDATA[
<p>How would a boyfriend or lack thereof even come up in an interview?  Let alone so often as to be worth practicing such a thing?  (I'm single, but I don't remember ever mentioning it in an interview.  Though my memory is bad at this stuff so for all I know I've mentioned it every single time.)</p>
]]></description><pubDate>Wed, 02 Mar 2022 04:49:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=30523868</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=30523868</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30523868</guid></item><item><title><![CDATA[New comment by marvy in "Employers who violate Colorado’s non-compete laws face stiff new penalties"]]></title><description><![CDATA[
<p>New York presumably</p>
]]></description><pubDate>Wed, 02 Mar 2022 04:33:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=30523769</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=30523769</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30523769</guid></item><item><title><![CDATA[New comment by marvy in "Employers who violate Colorado’s non-compete laws face stiff new penalties"]]></title><description><![CDATA[
<p>Why does it need a champion?  Suppose some legislator is drunk one night and decides to introduce a bill banning non-competes.  Who would vote against it?</p>
]]></description><pubDate>Wed, 02 Mar 2022 04:28:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=30523738</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=30523738</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30523738</guid></item><item><title><![CDATA[New comment by marvy in "Why the Covid Vaccines Aren’t Dangerous"]]></title><description><![CDATA[
<p>isn't it?</p>
]]></description><pubDate>Sun, 29 Aug 2021 22:27:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=28351060</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=28351060</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28351060</guid></item><item><title><![CDATA[New comment by marvy in "Lambdas, Nested Functions, and Blocks, oh my"]]></title><description><![CDATA[
<p>Amazing.  A real, live, credible proposal for lambdas in ISO standard C.</p>
]]></description><pubDate>Sun, 18 Jul 2021 02:00:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=27870259</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=27870259</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27870259</guid></item><item><title><![CDATA[New comment by marvy in "An efficient way to make hash maps with insertion ordering"]]></title><description><![CDATA[
<p>Ooh nice!  I didn't think of that!  Since appending to an array is cheap, you can just move-to-end instead of move-to-front, and then iterate in "reverse" order, so from the outside everything seems to Just Work.</p>
]]></description><pubDate>Sat, 03 Jul 2021 02:46:47 +0000</pubDate><link>https://news.ycombinator.com/item?id=27718970</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=27718970</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27718970</guid></item><item><title><![CDATA[New comment by marvy in "An efficient way to make hash maps with insertion ordering"]]></title><description><![CDATA[
<p>I think LRU does NOT work with this trick, because there's no easy way to "move-to-front" in O(1) time.<p>The article mentions Java's LinkedHashMap, which actually can do LRU.  But as the name implies, they rely on a linked list, where move=to-front is natural.<p>But this superpower does not come for free: a Java-style linked hash map will use more memory than the technique described in the article.</p>
]]></description><pubDate>Fri, 02 Jul 2021 04:41:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=27707861</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=27707861</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27707861</guid></item><item><title><![CDATA[New comment by marvy in "Not Growing a Language"]]></title><description><![CDATA[
<p>they got rid of that in Python 3, I think</p>
]]></description><pubDate>Sun, 04 Apr 2021 18:24:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=26691682</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=26691682</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26691682</guid></item><item><title><![CDATA[New comment by marvy in "Java 1.0 Turns 25"]]></title><description><![CDATA[
<p>Okay now I'm curious: what IDE do you use that makes this a non-issue?</p>
]]></description><pubDate>Sat, 23 Jan 2021 23:23:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=25887071</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=25887071</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25887071</guid></item><item><title><![CDATA[New comment by marvy in "Java 1.0 Turns 25"]]></title><description><![CDATA[
<p>Consider the following two cases:<p>1. MyClass has 10 private fields, each with a trivial getter and setter.<p>2. YourClass has 10 private fields, of which 9 have a trivial getter and setter.  The last one has a trivial getter but the setter is non-trivial.<p>If you use your IDE to write your getters and setters, than the two classes above will look the same at glance.<p>If you use Lombok, the "special" field will stick out at once.<p>Personally, I prefer to avoid Lombok and just use public fields.  That way, the field with a nontrivial setter will also stick out, and no need for bytecode magic.</p>
]]></description><pubDate>Sat, 23 Jan 2021 18:16:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=25884713</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=25884713</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25884713</guid></item><item><title><![CDATA[New comment by marvy in "Rust is now overall faster than C in benchmarks"]]></title><description><![CDATA[
<p>I think mh7 did not mean to hard-code intcmp into qsort.  The idea is to move the definition of qsort directly into the stdlib.h header file.  That way, the compiler can see the definition of qsort and intcmp at the same time.<p>In that case, the compiler could make a specialized qsort using intcmp automatically.</p>
]]></description><pubDate>Sun, 03 Jan 2021 21:43:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=25625538</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=25625538</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25625538</guid></item><item><title><![CDATA[New comment by marvy in "On the expressive power of programming languages (2019)"]]></title><description><![CDATA[
<p>You can tweak the definition to take advantage of whatever your language DOES allow.  He alludes to this during the Q&A at the end.  For instance: two expression are equal if (and only if), for all possible contexts C, you have C[e1] and C[e2] send the same bytes to standard output.</p>
]]></description><pubDate>Sun, 15 Nov 2020 14:50:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=25101603</link><dc:creator>marvy</dc:creator><comments>https://news.ycombinator.com/item?id=25101603</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=25101603</guid></item></channel></rss>