HNHacker News
TopNewBestAskShowJobs

naruhodo

704 karma · joined November 6, 2019

submissionscomments
naruhodo··on What's your preferred playback speed: 1x, 1.5x or 2x?
My listening speed has gone up over time, with practice.
naruhodo··on Debugging Bash Like a Sire (2023)
Since no commenter has remarked upon it yet, I draw your attention to the reddit comment [1] mentioned in the article. It is received wisdom that you should begin your scripts with "set -euo pipefail", and that turns out to be a footgun.

[1] https://www.reddit.com/r/commandline/comments/g1vsxk/the_fir...

naruhodo··on Australia Wants to See Your Papers Before You Press Play
As an Australian, do you remember:

* The Labor government's failed 2010 internet filter policy, [1] "Those who claim the government's approach is akin to the sort of political censorship practiced by authoritarian regimes are simply misleading the Australian public."

* The Liberal government's passed 2015 mandatory metadata retention laws, [2] "Critics say Australia’s data retention scheme is mass surveillance, and metadata is used to track where people go."

because it doesn't seem like you do. I could also point to the UK's full-take surveillance apparatus, or the US, from around about the same time-frame.

This is a long term project.

[1] https://www.sbs.com.au/news/article/internet-filter-is-not-c...

[2] https://www.abc.net.au/news/2015-08-17/metadata-retention-pr...

naruhodo··on C++: Zero-cost static initialization
The rabbit hole I just went down is called C/C++ Statement Expressions [1] which are a GCC extension:

    #define FAST_STATIC(T) \
      *({ \
          \                                // statements separated by semicolons
          reinterpret_cast<T *>(ph.buf); \ // the value of the macro as a statement
       })
The reinterpret_cast<T*>(...) statement is a conventional C++ Expression Statement, but when enclosed in ({}), GCC considers the whole kit and kaboodle a Statement Expression that propagates a value.

There is no C equivalent, but in in C++, since C++11 you can achieve the same effect with lambdas:

    auto value = [](){ return 12345; }();
As noted in the linked SO discussion, this is analogous to a JS Immediately-Invoked Function Expression (IIFE).

[1] https://stackoverflow.com/questions/76890861/what-is-called-...

naruhodo··on The story of Max, a real programmer

    files := r.MultipartForm.File["upload"]
    for _, file := range files {
        src, err := file.Open()
        filename := fmt.Sprintf("%d%s", imgNum, filepath.Ext(file.Filename))
        dst, err := os.Create(ORIGINAL_DIR + "/" + filename)
        _, err = io.Copy(dst, src)
Hmmm... can an attacker upload a file named "../../../etc/profile.d/script.sh" or similar ideas, i.e. path traversal?
naruhodo··on Australians to face age checks from search engines
Mate...

> 2038: all visits to all sites will be recorded

That's been the case since 2015. ISPs are required to record customer ID, record date, time and IP address and retain it for two years to be accessed by government agencies. It was meant to be gated by warrants, but a bunch of non-law-enforcement entities applied for warrantless access, including local councils, the RSPCA (animal protection charity), and fucking greyhound racing. It's ancient history, so I'm not sure if they were able to do so. The abuse loopholes might finally be closed up soon though.

https://privacy108.com.au/insights/metadata-access/

https://delimiter.com.au/2016/01/18/61-agencies-apply-for-me...

https://www.abc.net.au/news/2016-01-18/government-releases-l...

https://ia.acs.org.au/article/2023/government-acts-to-finall...

naruhodo··on Literate programming tool for any language
I tend to write doc-comments before the functions they document, because it helps me think more clearly about what I want to happen - and sometimes causes me to entirely re-think my approach and abandon the function entirely.

I can definitely see such a practice improving LLM output.

Meanwhile, there are programmers that think comments are a "code smell".

naruhodo··on Cannabis scientists are trying to find a predictable, reliable product (2020)
I've seen the same study reported in non-science media today as well.

As is established tradition, the scientists did a meta-analysis of studies that did not control for method of administration. (Your second link - healthline - notes that: "There was no delineation in the analysis, however, on the risks of smoking cannabis compared to ingesting it."). I have yet to see any evidence that edibles or dry-herb vaporisers have the same harms as smoking.

I have absolutely no problem with believing that smoking cannabis is harmful. There is clearly value in warning people about smoking cannabis. However, I would like to see some nuance around method of administration. I will continue to treat my health issues with oil-based tinctures and the occasional bit of dry-herb vaped flower.

naruhodo··on DARPA program sets distance record for power beaming
It's great if you hate birds, though.
naruhodo··on Type-based vs. Value-based Reflection
As a 33-year veteran - or is that victim - of C++, every time I read one of these kinds of articles, I think about how much simpler this kind of thing is in Lisps, or Zig.
naruhodo··on Apple violated antitrust ruling, judge finds
It will be interesting to see if Mr Apple has more spine than Mr Amazon, who acceded to Trump's demand not to show customers how much the tariffs were costing them.

My feeling is that these guys who showed up to the inauguration of a self-professed "dictator on day one" might be a little light on backbone, if not moral fortitude.

naruhodo··on What the hell is a target triple?
Should have been called BEON.
naruhodo··on A Reddit bot drove me insane
Oh my god... It's full of bots!
naruhodo··on Two new PebbleOS watches
It most likely has a lot to do with the display tech.

I got 8 days out of the PineTime, which was LED (I assume). You couldn't see anything if the display wasn't turned on.

I just bought a BangleJS (quite a bit cheaper than the Core 2 Duo, but no speaker and only one button) and the estimated battery life is a month. It uses a colour LCD, making the display visible whenever there is light. For example, daylight makes the display bright. It has a light source that gets turned on by the button.

The Core 2 Duo has an e-paper display that only draws power when the display changes.

naruhodo··on My 16-month theanine self-experiment
I started taking 1 x 50mg CBD gummy in the morning about 2 months ago and I can confirm that it is better than L-theanine. My analysis-paralysis is gone. I am moving forward with my life better than I have in 15 years.

I was one of the commenters in the HN thread linked by the blog post, and I do find that L-theanine reduces my coffee jitters.

naruhodo··on Developer sabotaged ex-employer with kill switch that activated when fired
My reaction too. It reminds me of the Simpsons' "Buttzilla" bit.

https://www.youtube.com/watch?v=DPmeLibaVwg&t=112s

naruhodo··on Melbourne startup launches 'biological computer' made of human brain cells
OI mate! You got a loicense to exterminate?
naruhodo··on Magic Secret of Nine (C64 demo) explained
Love it!

I have heard it said that the essence of stage magic is the magician's willingness to exert implausibly large efforts in the preparation of the props.

naruhodo··on Zelensky leaves White House after angry meeting
Interesting.

I just watched Trump greet Zelensky entering the Whitehouse with words like "and he even got all dressed up", foreshadowing Tulsi Gabbard's journalist boyfriend asking Z why he doesn't wear a suit.

It was definitely a planned media ambush intended to undermine support for Z and Ukraine.

naruhodo··on Yocto, RockPi and SBOMs: Building modern embedded Linux images
> pure brutality

And that's not hyperbole.

It's an odd mix of convention and bespoke madness. The convention part is that you set up a few variables and if the build system of the software is a good fit to common convention, things will just tend to work.

The bespoke madness comes in when there are slight departures from common convention and you must work out what variables to set and functions to define to fix it.

There are parts of the build system that are highly reminiscent of 1980s era BASIC programming. For example, I have seen build mechanisms where you must set variables first and then include or require a file. This is analogous to setting global variables in BASIC and then calling a subroutine with GOSUB because functions with arguments haven't been invented yet.

naruhodo··on Smoot–Hawley Tariff Act
What do you think of this[1]?

[1] https://www.youtube.com/watch?v=5RpPTRcz1no

naruhodo··on CDC data are disappearing
The tech oligarchs want to dismantle democracy, receive a gift of 0.5% of Federal land from Trump and establish their own democracy-free fiefdoms. [1]

The social support system in the US is being dismantled and when people can no longer afford to eat, the ensuing riots will provide the necessary trigger to declare martial law and suspend democracy completely.

[1] DARK GOTHIC MAGA: How Tech Billionaires Plan to Destroy America https://www.youtube.com/watch?v=5RpPTRcz1no

naruhodo··on Why Greenland is of growing strategic significance
If anything, the strategic importance of the Arctic region as a whole has the potential to be a good deal greater than it was during the decades of superpower standoff, driven by climate change opening up new shipping routes as well as providing access to natural resources that were previously inaccessible, or at least much harder to exploit.

The Ukraine was invaded for resources.

naruhodo··on Conscious unbossing – 52% of GenZ professionals don't want to be middle managers
Or "less than 49% of GenZ professionals want to be middle managers" and "some of GenZ professionals are ambivalent about it".
naruhodo··on I basically announced Minecraft 2
Those in the know refer to the C++ version as "Bugrock".
naruhodo··on If I Could Wave a Magic Wand
> 2. There are probably edge cases this code solves that we don’t remember.

But fortunately, I write in-code comments documenting these, because I pay close attention to such details.

> 4. Your own code always feels better to read, because you wrote it. That doesn’t mean it’s actually better to read than someone else’s.

Having that mental context makes your own code easier to read. That's why those comments are so important: they share that context with the next reader. Well-commented code legitimately is better.

naruhodo··on Apple Photos phones home on iOS 18 and macOS 15
So my options are unreservedly trust Apple or etch my own transistors? Who pays your salary, Rando?
naruhodo··on Apple Photos phones home on iOS 18 and macOS 15
I would love to evaluate the privacy of these technologies.

Someone reply with a link to the source code so I can see exactly what it is doing, without having to take an internet rando's word for it.

Better yet, let me compile it myself.

naruhodo··on Voxon: Real time interactive volumetric holograms
Actually, I was looking for the resolution and I can't find that anywhere on the page or in the FAQs.
naruhodo··on Australian Online Safety Amendment (Social Media Minimum Age) Bill 2024
> it passed with broad support across the political spectrum

The Labor (historically centre-left, but now neoliberal centre-right), Liberal (classical liberal, right-centre-right) parties rammed it through parliament and National (right-wing agrarian socialist - i.e. handouts for farmers, exploitation for imported farm labour). Most of the cross-bench, including the Greens, rejected it or at least wanted more time for scrutiny.

Here's my rough idea of the political spectrum:

    ------------X-----0---X--X-----X---------
              Greens  |Labor |   One Nation
                    Centre  Coalition (= Liberal+National)
Labor is playing small target and ensuring that no daylight is visible between them and the Liberal party. The policy is something that Murdoch's News Corp has been pushing for months [1]. With a federal election coming next year, Labor are keen to comply with Murdoch's wishes in the hopes that it will protect them from unfavourable media coverage. After all, Murdoch owns 70% of the print media in Australia. It also has to be said that Labor are cosy with the Catholics and somewhat authoritarian on freedom of speech (remember Labor's attempt at internet censorship?).

From Murdoch's perspective, this is a form of reprisal against his new-media competition. From the perspective of the billionaire oligarch class, it's a handy way to unmask anonymous commenters so they can be sued into oblivion for defamation.

[1] https://www.youtube.com/watch?v=S8SkLRxFRVM The media campaign to ban social media for teenagers | Media Watch

← PreviousPage 4 of 11Next →