HNHacker News
TopNewBestAskShowJobs

peterkelly

10,700 karma · joined April 22, 2012

Peter Kelly

Email: kellypmk@gmail.com or peter@pmkelly.net

Twitter: 0xpmkelly

https://www.pmkelly.net

http://blog.uxproductivity.com/

PGP key: http://www.pmkelly.net/pgp-key

Fingerprint: 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966

submissionscomments
peterkelly··on If not React, then what?
The React team should have done their own language, rather than making it a framework/library. Then they could ensure the absence of side effects in rendering code, and had a better way of detecting updates. The knowledge about how to do this was already out there for many years before they started: https://en.wikipedia.org/wiki/Functional_reactive_programmin...
peterkelly··on If not React, then what?
WordPress relies on server-generated HTML and its admin interface is a fairly complex "app", especially once you factor in the plugin ecosystem. According to [1], it's used on 43.7% of all public websites.

[1] https://w3techs.com/technologies/details/cm-wordpress

peterkelly··on TrunkVer
And the best part is you can completely disregard the need to maintain backwards compatibility, because every build implies a breaking change! /s
peterkelly··on Dear sir, you have built a compiler (2022)
https://llvm.org/

https://docs.racket-lang.org/guide/languages.html

peterkelly··on Rust's Sneaky Deadlock With `if let` Blocks
One way to solve this at the language level would be to require that each lock has a specified priority associated with it, and have the compiler enforce a constraint that locks can only be obtained in the order of their priority.

For each statement, the compiler could keep track of the current "lock priority". If an attempt is made to obtain a new lock with a lower or equal priority, the compiler would reject this. Otherwise, the compiler would use the priority of the new lock as the lock priority for all statements within the scope of the block in which that lock is held.

Aside from modifying the language, the same basic idea could be implemented at the library level by exposing a lock type which still requires a priority to be specified at creation time, but tracks the current lock priority (per thread) at runtime and panics when the constraint is violated. Since the panics would be deterministic, they and the book-keeping required to track the current lock priority could be enabled only in debug mode.

peterkelly··on Docker Compose Isn't Enough
You know you can run multiple processes inside a single container, right?

The solution to the complexity of applications that are distributed as collections of interdependent containers is to put all of the different pieces inside a single container. This is equivalent to what people did before docker existed, and it's still perfectly viable today.

There's no need to over-complicate things.

peterkelly··on Eighteen Years of ABI Stability
I wish developers of JavaScript frameworks had this level of commitment to stability.
peterkelly··on Show HN: HTML for People
Google drive follows the files and folders model that your father was expecting.
peterkelly··on Show HN: JSON-Threat-Protection Rust High-Performance Crate
https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...
peterkelly··on Ask HN: What was your most humbling learning moment?
Finding out at age 44 that I am autistic.

Suddenly my whole life made sense, I understood that there are well-known and documented reasons for why I am the way I am, and that I'm not alone in my experiences.

peterkelly··on Krazam OS
Does it support ISO timestamps?
peterkelly··on Identical twins both grew up with autism, but took different paths
This is one of four criteria listed in section B, which only requires two to be present. See https://www.cdc.gov/ncbddd/autism/hcp-dsm.html

So it's still possible to receive a diagnosis if you don't have hyperfixation but have two or more of the other section B criteria.

peterkelly··on The 6502 instruction set as a database
Likely useful: https://github.com/mist64/perfect6502 and http://www.visual6502.org/. These are transistor-level simulations based on die shots. From these you can derive the cycle times of each instruction with 100% confidence.
peterkelly··on Governments spying on Apple, Google users through push notifications
Australia was my first guess when I read that sentence. But I expect it's not the only one.
peterkelly··on Classnames – a site that provides thematically grouped lists of words
Another nice resource: https://github.com/timvieira/justified-variables
peterkelly··on Show HN: exaequOS - a new OS running in a web browser
https://bellard.org/jslinux/
peterkelly··on ToDesktop – Web app to desktop app in minutes
All these apps could be written in Qt and would then work on all platforms.
peterkelly··on Functional Python Programming
SQL does not support higher-order functions or lambdas (except possibly in some special dialect I'm not aware of)
peterkelly··on Tracing Python
Python has a built-in API for tracing: https://docs.python.org/3/library/sys.html#sys.settrace

Here's an example of how to use it (obviously a minimal case, you can customise your handler do do whatever you need):

    def mytrace(frame, event, arg):
        if event == "call":
            print("call", frame.f_code.co_name, frame.f_locals)
        elif event == "return":
            print("return", frame.f_code.co_name, arg)
        return mytrace

    import sys
    sys.settrace(mytrace)
For example, given the following code:

    def three(z):
        return 3

    def two(y):
        return three("BBB") - 1

    def one():
        return two("AAA") - 1

    one()
It will output:

    call one {}
    call two {'y': 'AAA'}
    call three {'z': 'BBB'}
    return three 3
    return two 2
    return one 1
peterkelly··on Avoiding HTTP/3 (for a while) as a pragmatic default
You need to renew your domain every year. You need to either pay your hosting provider or, in the case of hardware you run yourself, your ISP providing network connectivity, on a regular basis. How is relying on a third-party for certificates any different?

And you do understand the reason why having browsers verify that they're actually talking to who they think they're talking to is important, right?

peterkelly··on Avoiding HTTP/3 (for a while) as a pragmatic default
The problems you described are specific to implementations, not the protocol itself. I have read all of the QUIC specs in full (since I'm working on an implementation) and have seen nothing in any of them that mandates a centralised certificate infrastructure (caveat: I have not read the HTTP/3 spec, perhaps you could point out the relevant section if its in there). Of course, the most common use case requires this, but in that respect it's no different to HTTPS.

IPFS uses QUIC as one of its supported transport protocols, and this works in the most common implementation, Kubo [1]. The spec for the QUIC transport used in IPFS [2] indicates the same certificate trust policy as for the TLS protocol [3]. The latter, in turn, relies on peer-to-peer authentication with automatically-generated self-signed certificates containing a libp2p-specific additional extension.

IPFS is particularly well suited to the use case of personal websites you've mentioned, as it's specifically designed to operate without any form of centralisation.

[1] https://github.com/ipfs/kubo.

[2] https://github.com/libp2p/specs/tree/master/quic

[3] https://github.com/libp2p/specs/blob/master/tls/tls.md

peterkelly··on We updated our RSA SSH host key
Git provides the ability for authors to sign their commits with their own private key. To ensure the integrity of code in a repository, this method should be relied on rather than whatever hosting provider(s) have a copy of the repository.

Requiring all commits to be signed by trusted keys avoids the risks associated with someone tampering with a repository hosted on GitHub if they are able to get access to it, although it doesn't protect against code being leaked.

See here for details: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work

peterkelly··on Data from Atlassian dumped online after apparent hack
I consider the absence of Jira a feature
peterkelly··on Common Beginner Mistakes with React
React was a great idea; the problem was they did it in JavaScript instead of a pure, functional language. There's too many footguns where JS features like mutability and async code can leak through, leading to a whole class of errors that could have been caught by a compiler but instead were left as cognitive load imposed on developers.
peterkelly··on AI teaches itself to use an API
Run it against the Win32 API and if you can show me a successful outcome then I'll be impressed.
peterkelly··on Disqualified from a National Web Design Competition for Using GitHub
> Reading the replies to this comment saying "rules are rules" is honestly heart breaking

Yeah that was sad to see :(

I like the attitude that if you don't like the rules, go and make your own thing where you can choose your own rules and not be constrained by those of other people. That's basically the origin story for a lot of successful entrepreneurs.

peterkelly··on Disqualified from a National Web Design Competition for Using GitHub
If you do go ahead with this, I'd be willing to act as a judge and help out generally with advice. My contact details are in my profile.
peterkelly··on Disqualified from a National Web Design Competition for Using GitHub
The skills you have to learn in order to use github effectively are pretty generic in nature and easily transferable to other platforms.
peterkelly··on Disqualified from a National Web Design Competition for Using GitHub
This is one of those important events in life where you realise that sometimes those who hold seniority over you aren't necessarily as smart as you are. This experience will help you to cultivate a healthy disrespect for authority. We all go through something like this at some point.

The best thing to do is to find some sort of constructive way to channel your experience. One path I would suggest is to consider launching your own rival competition, where the judges are volunteers from industry, and the prize is an internship at a company or something like that. This would not only provide your peers with a great opportunity to get quality feedback, but also serve as a really useful experience that would help you in your future career. What have you got to lose?

Perhaps you could even get GitHub to sponsor it :)

peterkelly··on If you own an M2 MacBook Air or MacBook Pro there’s an update for your cable
Apple's lightning-to-HDMI cable contains an embedded ARM SoC with 256MB of memory running the XNU kernel and a daemon that performs video decoding.

https://panic.com/blog/the-lightning-digital-av-adapter-surp...

← PreviousPage 2 of 34Next →