<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: akubera</title><link>https://news.ycombinator.com/user?id=akubera</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Mon, 06 Apr 2026 07:08:22 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=akubera" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by akubera in "TrackWeight: Turn your MacBook's trackpad into a digital weighing scale"]]></title><description><![CDATA[
<p>The smackbook pro! <a href="https://www.youtube.com/watch?v=6uvQTTPr9Rw" rel="nofollow">https://www.youtube.com/watch?v=6uvQTTPr9Rw</a></p>
]]></description><pubDate>Mon, 21 Jul 2025 16:33:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=44637156</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=44637156</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44637156</guid></item><item><title><![CDATA[New comment by akubera in "Fstrings.wtf"]]></title><description><![CDATA[
<p>The PEP: <a href="https://peps.python.org/pep-0736/" rel="nofollow">https://peps.python.org/pep-0736/</a><p>The discussion: <a href="https://discuss.python.org/t/pep-736-keyword-argument-shorthand-final-draft/58504/6" rel="nofollow">https://discuss.python.org/t/pep-736-keyword-argument-shorth...</a><p>The rejection: <a href="https://discuss.python.org/t/pep-736-shorthand-syntax-for-keyword-arguments-at-invocation/43432/222" rel="nofollow">https://discuss.python.org/t/pep-736-shorthand-syntax-for-ke...</a><p>Grammar changes, in particular things used everywhere like function invocations, have to be worth paying the price for changing/adding new rules. The benefits of fewer characters and more explicit intention weren't enough to outweigh the costs.<p>There were other considerations: Do linters prefer one syntax to another? Does the name refer to the parameter or the argument in tooling? Should users feel pressure to name local variables the same as the function's parameters? What about more shorthand for common cases like func(x=self.x, y=self.y)?<p>I personally did not like the func(x=, y=) syntax. I think their example of Ruby's func(x:, y:) would actually make more sense, since it's syntax that would read less like "x equals nothing", and more "this is special syntax for passing arguments".</p>
]]></description><pubDate>Sat, 19 Jul 2025 15:58:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=44616597</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=44616597</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=44616597</guid></item><item><title><![CDATA[New comment by akubera in "The Seven-Year Rule"]]></title><description><![CDATA[
<p>I'm reminded of the SMBC comic <a href="https://www.smbc-comics.com/?id=2722" rel="nofollow">https://www.smbc-comics.com/?id=2722</a> which resonated with me. If it takes ~7 years to master something, you should dedicate yourself to becoming good at it. Or at least you don't have to tie your identity to what you do you right now; you can reinvent yourself and experience more from of life, but you have to give yourself the time to do so.<p>It's been almost 14 years since that was published, so maybe some self-reflection is due.</p>
]]></description><pubDate>Sat, 26 Apr 2025 20:05:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=43806658</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=43806658</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43806658</guid></item><item><title><![CDATA[New comment by akubera in "My Rust experience after eight years"]]></title><description><![CDATA[
<p>As others have said, Rust's ownership model prevents data races, as it can prove that references to mutable data can only be created if there are no other references to that data. Safe Rust also prevents use-after-free, double-free, and use-uninitialized errors. 
Does not prevent memory leaks or deadlocks.<p>It's easy to write code that deadlocks; make two shared pointers to the same mutex, then lock them both. This compiles without warnings:<p><pre><code>    let mutex_a = Arc::new(Mutex::new(0_u32));
    let mutex_b = mutex_a.clone();
    
    let a = mutex_a.lock().unwrap();
    let b = mutex_b.lock().unwrap();
    println!("{}", *a + *b);</code></pre></p>
]]></description><pubDate>Fri, 04 Apr 2025 08:42:28 +0000</pubDate><link>https://news.ycombinator.com/item?id=43579717</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=43579717</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43579717</guid></item><item><title><![CDATA[New comment by akubera in "The Wobbly Table Theorem (2022)"]]></title><description><![CDATA[
<p>Mathologer has a great video covering this: <a href="https://www.youtube.com/watch?v=aCj3qfQ68m0" rel="nofollow">https://www.youtube.com/watch?v=aCj3qfQ68m0</a><p>Visualizes a proof and talks about special cases and a little of the history.</p>
]]></description><pubDate>Tue, 08 Oct 2024 04:34:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=41773865</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=41773865</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41773865</guid></item><item><title><![CDATA[New comment by akubera in "The Wobbly Table Theorem (2022)"]]></title><description><![CDATA[
<p>In terms of the math: the table legs are assumed to be equal length, and the wobble is caused by variations of the surface. Specifically the <i>feet</i> of the table are in the same plane.  So you could rotate your mathematical table until all feet are secure on the plane, then cut the legs to make the top flat again (legs will not be same length, but top and bottom remain planes).<p>As for @Cerium's real-life usage, you have possibility of uneven legs and uneven floor (and discontinuities, like a raised floorboard) so it's obviously not guaranteed, but if the floor is warped and smooth enough, you can try.<p>[EDIT]: Changed wording</p>
]]></description><pubDate>Tue, 08 Oct 2024 04:24:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=41773809</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=41773809</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41773809</guid></item><item><title><![CDATA[New comment by akubera in "Show HN: ESP32S3 ZXSpectrum"]]></title><description><![CDATA[
<p>Looks good. One note about the video: you mention you recently watched a good video on 1-bit sound, and suggest it's worth a watch, but it doesn't appear to be linked-to in the description.</p>
]]></description><pubDate>Wed, 19 Jun 2024 13:23:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=40728060</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=40728060</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40728060</guid></item><item><title><![CDATA[New comment by akubera in "CERN's Exabyte Data Center"]]></title><description><![CDATA[
<p>What makes you think it's not compressed? (or that the data is stored as XML?)<p>There's very sophisticated compression systems throughout each experiment's data acquisition pipelines. For example this paper[1] describes the ALICE experiment's system for Run3, involving FPGAs and GPUs to be able to handle 3.5TB/s from all the detectors. This one [2] outlines how HL-LHC & CMS use neural networks to fine tune compression algorithms on a per-detector basis.<p>Not to mention your standard data files are ROOT TFiles with TTrees which store arrays of compressed objects.<p>It's all pretty neat.<p>[1] <a href="https://arxiv.org/pdf/2106.03636" rel="nofollow">https://arxiv.org/pdf/2106.03636</a><p>[2] <a href="https://arxiv.org/pdf/2105.01683" rel="nofollow">https://arxiv.org/pdf/2105.01683</a></p>
]]></description><pubDate>Wed, 01 May 2024 22:52:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=40230622</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=40230622</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40230622</guid></item><item><title><![CDATA[New comment by akubera in "What even is a JSON number?"]]></title><description><![CDATA[
<p>That seems to be the sentiment here. I'll take it into consideration. Thanks.</p>
]]></description><pubDate>Tue, 02 Apr 2024 05:12:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=39902602</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39902602</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39902602</guid></item><item><title><![CDATA[New comment by akubera in "What even is a JSON number?"]]></title><description><![CDATA[
<p>For the Rust crate, there is already an arbitrary limit (defaults to 100 digits) for "unbounded operations" like square_root, inverting, division. That's a compile time constant. And there's a Context object for runtime-configuration you can set with a precision (stop after `prec` digits).<p>But for addition, the idea is to give the complete number if you do `a + b`, otherwise you could use the context to keep the numbers within your `ctx.add(a, b)`. But after the discussions here, maybe this is too unsafe... and it should use the default precision (or a slightly larger one) in the name of safety? With a compile time flag to disable it? hmm...</p>
]]></description><pubDate>Tue, 02 Apr 2024 05:10:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=39902587</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39902587</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39902587</guid></item><item><title><![CDATA[New comment by akubera in "What even is a JSON number?"]]></title><description><![CDATA[
<p>I think that's the use-case for the rust_decimal crate, which is a 96-bit floating number (~28 decimal digits) which is safer and faster than the bigdecimal crate (which at its heart is a Vec<u64>, unbounded, and geared more for things like calculating sqrt(2) to 10000 places, that kind of thing). Still, people are using it for serialization, and I try to oblige.<p>Having user-set generic limits would be cool, and something I considered when const generics came out, but there's a lot more work to do on the basics, and I'm worried about making the interface too complicated. (And I don't want to reimplement everything.) D<p>I also would like a customizable parser struct, with things like localization, allowing grouping-delimiters and such (1_000_000 or 1'000'000 or 10,00,000). That could also return some kind of OutOfRange parsing error to disallow "suspicious" values, out of range. I'm not sure how that to make that generic with the serde parser, but I may some safe limits to the auto serialization code.<p>Especially with JSON, I'd expect there's only two kinds of numbers: normal "human" numbers, and exploit attempts.</p>
]]></description><pubDate>Tue, 02 Apr 2024 05:00:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=39902532</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39902532</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39902532</guid></item><item><title><![CDATA[New comment by akubera in "What even is a JSON number?"]]></title><description><![CDATA[
<p>This isn't about parsing so much as letting the users do "dangerous" math operations. The obvious one is diving by zero, but when the library offers arbitrary precision, addition becomes dangerous with regard to allocating all the digits between a small and large value<p><pre><code>  1e10 + 1e-10 = 10000000000.0000000001
  1e10000000000000000000 + 1e-10000000000000000000 = ...
</code></pre>
It's tough to know where to draw the lines between "safety", "speed", and "functionality" for the user.<p>[EDIT]: Oh I see, fix the parser to disallow such large numbers from entering the system in the first place, then you don't have to worry about adding them together. Yeah that could be a good first step towards safety. Though, I don't know how to parametrize the serde call.</p>
]]></description><pubDate>Tue, 02 Apr 2024 04:10:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=39902300</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39902300</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39902300</guid></item><item><title><![CDATA[New comment by akubera in "What even is a JSON number?"]]></title><description><![CDATA[
<p>I was attempting to solve this very problem in the Rust BigDecimal crate this weekend. Is it better to just let it crash with an out of memory error, or have a compile-time constant limit (I was thinking ~8 billion digits) and panic if any operation would exceed that limit with a more specific error-message (does that mean it's no longer arbitrary-precision?). Or keep some kind of overflow-state/nan, but then the complexity is shifted into checking for NaNs, which I've been trying to avoid.<p>Sounds like Haskell made the right call: put warnings in the docs and steer the user in the right direction. Keeps implementation simple and users in control.<p>To the point of the article, serde_json support is improving in the next version of BigDecimal, so you'll be able to decorate your BigDecimal fields and it'll parse numeric fields from the JSON source, rather than json -> f64 -> BigDecimal.<p><pre><code>    #[derive(Serialize, Deserialize)]
    pub struct MyStruct {
      #[serde(with = "bigdecimal::serde::json_num")]
      value: BigDecimal,
    }
</code></pre>
Whether or not this is a good idea is debatable[^], but it's certainly something people have been asking for.<p>[^] Is every part of your system, or your users' systems, going to parse with full precision?</p>
]]></description><pubDate>Mon, 01 Apr 2024 23:59:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=39900871</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39900871</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39900871</guid></item><item><title><![CDATA[New comment by akubera in "Python Generators Are Underutilized"]]></title><description><![CDATA[
<p>I'd bet they have very similar performance-metrics, but the yield syntax is more extensible (i.e. you're not limited to one expression) and debug-able (you can put breakpoints within the function).<p>Also the name and the generator is nicer (for some definition of nice):<p><pre><code>   >>> def square_vals(x : list):
   ...    return (v * v for v in x)
   ... 
   >>> square_vals([1,2,3])
   <generator object square_vals.<locals>.<genexpr> at 0x786b8511f5e0>

   >>> def square_vals_yields(x: list):
   ...     for v in x:
   ...         yield v * v
   ... 
   >>> square_vals_yields([1,2,3])
   <generator object square_vals_yields at 0x786b851f5ff0>


</code></pre>
I think it's more idiomatic to pass generator-comprehensions into functions rather than return them from functions<p><pre><code>    >>> sum((v*v for v in x))</code></pre></p>
]]></description><pubDate>Sat, 24 Feb 2024 22:38:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=39495778</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=39495778</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39495778</guid></item><item><title><![CDATA[New comment by akubera in "My User Experience Porting Off Setup.py"]]></title><description><![CDATA[
<p>I've had a similarly frustrating time trying to understand and wrangle the pyproject.toml builder system, (egg-layer? wheel-roller? cheese-monger?)<p>One thing the author might want to try is writing their own "build-backend". You can specify your own script (even use setup.py) and that will be the target of python -m build or pip wheel or presumably whatever build-frontend you use.<p><pre><code>    # pyproject.toml
    [build-system]
    requires = ["setuptools"]
    build-backend = "setup"  # import setup.py as the build-module
    backend-path = ["."]

</code></pre>
Then in setup.py you should write two functions:<p><pre><code>    def build_sdist(sdist_directory, config_settings):
        ...

    def build_wheel(wheel_directory, config_settings, metadata_directory):
        ...

</code></pre>
Where config_settings is a dictionary of the command line "--config-settings" options passed to the builder. (sys.argv does not have access to the actual invocation, I suppose to ensure frontend standardization)<p>example:<p><pre><code>    $ python -m build --config-setting=foo=bar --config-setting=can-spam

    # will call 
    >>> build_sdist("the/dist/dir", {"foo": "bar", "can": "spam"})

</code></pre>
Of course, you can extend the default setuptools build meta so you only have to
do the pre-compilation or whatever your custom build step requires:<p><pre><code>    from setuptools.build_meta import build_sdist as setuptools_build_sdist

    def build_sdist(sdist_directory, config_settings):
        # ... code-gen and copy files to source  ...

        # this will call setup.py::setup, to make things extra confusing
        return setuptools_build_sdist(sdist_directory, config_settings)
</code></pre>
I had to create a temporary MANIFEST.in file to make sure that the setuptools
build_sdist saw the generated files. Maybe there's a better way?
I think the wheel "just" packages whatever the sdist produces, though that might be more difficult if you're compiling .so files or whatnot.<p>Still overall pretty fiddly/under-documented and a shame there seems to be a push for <i>more</i> dependencies rather than encouraging users to build their own solutions.<p>More info in PEP 517: <a href="https://peps.python.org/pep-0517/" rel="nofollow noreferrer">https://peps.python.org/pep-0517/</a></p>
]]></description><pubDate>Tue, 31 Oct 2023 04:02:48 +0000</pubDate><link>https://news.ycombinator.com/item?id=38080140</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=38080140</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38080140</guid></item><item><title><![CDATA[New comment by akubera in "Progress on No-GIL CPython"]]></title><description><![CDATA[
<p>I think dekhn means the discussions and attempts at removing the GIL before this current PEP. Here's Guido's thoughts on it from 2007: <a href="https://www.artima.com/weblogs/viewpost.jsp?thread=214235" rel="nofollow noreferrer">https://www.artima.com/weblogs/viewpost.jsp?thread=214235</a> and that mentions a fork removing the GIL for Python 1.5 in 1999.</p>
]]></description><pubDate>Sat, 21 Oct 2023 01:11:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=37963225</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=37963225</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37963225</guid></item><item><title><![CDATA[Guide to Timescript]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.jacquifashimpaur.com/timescript">https://www.jacquifashimpaur.com/timescript</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=37727928">https://news.ycombinator.com/item?id=37727928</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Sun, 01 Oct 2023 16:55:51 +0000</pubDate><link>https://www.jacquifashimpaur.com/timescript</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=37727928</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37727928</guid></item><item><title><![CDATA[New comment by akubera in "Why do you want to touch your Mac screen so badly?"]]></title><description><![CDATA[
<p>I'm not sure to which movie you're referring, but the "we're going to use a pointing device we're all born with" is from the iPhone announcement:<p><a href="https://youtu.be/X1SyRElYGoM?t=1710" rel="nofollow">https://youtu.be/X1SyRElYGoM?t=1710</a><p>Apple pencil isn't required for interaction with the device, unlike old resistive touchscreen devices of the Palm Pilot era, so I doubt that's the reason he's spinning.</p>
]]></description><pubDate>Sat, 11 Feb 2023 07:57:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=34750494</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=34750494</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34750494</guid></item><item><title><![CDATA[New comment by akubera in "Facebook Container Extension"]]></title><description><![CDATA[
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/" rel="nofollow">https://addons.mozilla.org/en-US/firefox/addon/tree-style-ta...</a><p>Makes a vertical list of your tabs in the side panel, and opening links from a page makes a node visually indented directly under that tab. Very nice for grouping tabs in a hierarchy as you descend through links on a topic.<p>Useful for general browsing and for sites like Hacker News: you can middle click links to interesting comments on the home page, then you can go through them one by one, opening the article (which is another tab one layer deeper), and any other links from there, all "contained" in that tree. You can collapse the tree to save space and resume at a later time.  After you're done you pop the stack back to the comments and read, right click and close the whole tree when done and move on to the next article you "bookmarked".<p>For some workflows it's very nice.</p>
]]></description><pubDate>Thu, 19 Jan 2023 03:27:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=34436362</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=34436362</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34436362</guid></item><item><title><![CDATA[New comment by akubera in "TIL–Python has a built-in persistent key-value store (2018)"]]></title><description><![CDATA[
<p>There's also the shelve[0] module which allows storing any pickleable object in a persistent key-value store, not just string/bytes. I've found it's very handy for caching while developing scripts which query remote resources, and not have to worry about serialization.<p>[0] <a href="https://docs.python.org/3.10/library/shelve.html" rel="nofollow">https://docs.python.org/3.10/library/shelve.html</a><p>Obligatory pickle note: one should be aware of pickle security implications and should not open a "Shelf" provided by untrusted sources, or rather should treat opening a shelf (or any pickle deserialization operation for that matter) as running an arbitrary Python script (which cannot be read).</p>
]]></description><pubDate>Thu, 15 Sep 2022 14:08:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=32852247</link><dc:creator>akubera</dc:creator><comments>https://news.ycombinator.com/item?id=32852247</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=32852247</guid></item></channel></rss>