Hacker Newsnew | past | comments | ask | show | jobs | submit | amstan's commentslogin

One thing that i see often: just because both your debug cable and your target runs at the same voltage (eg: 3.3V), doesn't mean it's safe to plug them together. You could easily have a situation where your target or your debugger is off, so at that point you're powering the off thing through the uart pins (the esd diode on the pin).

The safest thing is to have a 4th vref/vccio pin, then the debugger should power its tx signal from that pin, at whatever voltage it's at. Same for the RX pin, it's not nice to have a pullup to a certain voltage when the target is off.


> The safest thing is to have a 4th vref/vccio pin, then the debugger should power its tx signal from that pin, at whatever voltage it's at. Same for the RX pin, it's not nice to have a pullup to a certain voltage when the target is off.

I totally agree. And yet, the 4th pin is, from personal experience, dying out. Because people have been, er, let's say "undereducated", in how to use it correctly, and with cheap USB-TTL-serial, the circuitry to use it correctly isn't included on either side.

And then people reverse-power their boards and fry things, so the board designers remove the 4th pin.

We can't have nice things. :'(

P.S.: the "undereducation": if neither side has a Vref INPUT(!) you leave the connection open. And unless your USB-TTL-serial is very explicit about it, it does NOT have a Vref input.


you should try vulkan instead of rocm. it goes like 20% faster.


Is that based on recent experience? With "stable" ROCm, or the (IMHO better) releases from TheRock? With older or more recent hardware? The AMD landscape is rather uneven.


For this model results are identical. In my experience it can go either way by up to 10%.


I think you're overstating this. The "handshake" is purely 2 simple resistors correctly installed. The problem is a lot of folks do it wrong for various reasons, most likely never testing with anything more than type a to type c cables.

https://people.kernel.org/bleung/how-to-design-a-proper-usb-...


Ah yes, because "How now the smart flies take the new time beyond new time where new times come." is so much easier to remember than "2001:db8::1".


I want my time back :D . Here I was picking things that i liked the most, and it gave me Ubuntu Mono, a font I already have selected in my editor.


I ended up with Roboto Mono, a font I used to use before I switched from Linux to Mac for my daily drivers. I'm not the kind of person who can identify a font by name simply by looking at it, so I was pleasantly surprised! I chose it more or less at random back in 2012.


Yeah, it's worse, half of the devices on that list are peripherals that cannot be flashed with any firmware.


yeah, it's true, but the idea was to also have some useful peripherals indexed, so when users are searching for a use case, they'd also have these plug-and-play peripherals in the search results.

but i'm open to feedback so we can make a better experience for all of you ;)


4 times, you forgot the owner of the bot that did the PR.


Indeed, you’re right.


Missing (probably because of the date of the article): `mv --exchange` aka renameat2+RENAME_EXCHANGE. It atomically swaps 2 file paths.


I tried using this a while back and found it was not widely available. You need coreutils version 9.1 or later for this, many distros do not ship this.

I made https://github.com/rubenvannieuwpoort/atomic-exchange for my usecase.


Title says Unix, renameat2 is Linux-only.


>Title says Unix,

You're misinterpreting the title. The author didn't intend "Unix" to literally mean only the official AT&T/TheOpenGroup UNIX® System to the exclusion of Linux.

The first sentence of "UNIX-like" makes that clear : >This is a catalog of things UNIX-like/POSIX-compliant operating systems can do atomically,

Further down, he then mentions some Linux specifics : >fcntl(fd, F_GETLK, &lock), fcntl(fd, F_SETLK, &lock), and fcntl(fd, F_SETLKW, &lock) . [...] There is a “mandatory locking” mode but Linux’s implementation is unreliable as it’s subject to a race condition.


Bit rot alert: Linux doesn't even have mandatory file locks these days.

Linux-specific open file description locks could be brought up in a modern version of TFA though.


But I also don't think the auther meant Things you can do in Linux but not Unix


>But I also don't think the auther meant Things you can do in Linux but not Unix

I wasn't claiming that. I just thought the ggp had a useful comment about renameat2() which led to gp's "correction" which wasn't 100% accurate.

IBM z/OS UNIX also has renameat2(). It doesn't have the Linux specific flag RENAME_EXCHANGE.

https://www.ibm.com/docs/en/zos/3.1.0?topic=functions-rename...


In recent versions, z/OS has been copying lots of Linux-specific APIs (e.g. unshare [0]) in order to support the z/OS port of Kubernetes.

If Kubernetes starts using renameat2(RENAME_EXCHANGE), they could very plausibly add it.

[0] https://www.ibm.com/docs/en/zos/3.2.0?topic=csd-unshare-bpx1...


pedantic but z/OS isn't a unix, it can just pretend to be one enough for the open group to call it one. IBM has a unix still, AIX.


They aren’t misinterpreting the title, the title is incorrect.


>, the title is incorrect.

Differing philosophies of how to interpret titles. Prescriptive vs Descriptive language.[0]

There can be different usages of the word "Unix":

#1: Unix is a UNIX(tm) System V descendent. More emphasis that the kernel needs to be UNIX. In this strict definition, you get the common reminder that "Linux is not a Unix!"

#2: "Unix" as a loose generic term for a family of o/s that looks/feels like Unix. This perspective includes using an o/s that has userland Unix utilities like cat/grep/awk. Sometimes deliberately styled as asterisk "*nix" or a suffix-qualifier "Unix-like" but often just written as a naked "Unix".

A Prescriptivist says the author's title is "incorrect". On the other hand, a Descriptivist looks at the whole content of the article -- notices the text has a lot of Linux specific info such as fcntl(,F_GETLEASE/F_SETLEASE), and every hyperlink to a man page url points to https://linux.die.net/man/ , etc -- and thus determines that the author is using "Unix"(#2) in the looser way that can include some Linux idiosyncrasies.

"Unix" instead of "*nix" as a generic term for Linux is not uncommon. Another example article where the authors use the so-called incorrect "Unix" in the title even though it's mostly discussing Linux CUPS instead of Solaris : https://www.evilsocket.net/2024/09/26/Attacking-UNIX-systems...

[0] https://en.wikipedia.org/wiki/Linguistic_prescription


Sounds like the key term then is probably this:

> POSIX-compliant

Which, FWIW, doesn't mean Linux. AFAIK there is no Linux distro that's fully compliant, even before you worry about the specifics of whether it's certified as compliant.


>POSIX-compliant Which, FWIW, doesn't mean Linux. AFAIK there is no Linux distro that's fully compliant

I read author's use of "POSIX-compliant" as a loose and fuzzy family category rather than an exhaustive and authoritative reference on 100% strict compliance. Therefore, the author mentioning non-100%-compliant Linux is ok.

There seems to be 2 different expectations and interpretations of what the article is about.

- (1) article is attempting to be a strict intersection of all Unix-like systems that conform to official UNIX POSIX API. I didn't think this was a reasonable interpretation since we can't be sure the author actually verified/tested other POSIX-like systems such as FreeBSD, HP-UX, IBM AIX, etc.

- (2) article is a looser union of operating systems and can also include idiosyncracies of certain systems like Linux that the author is familiar with that don't apply to all other UNIX systems. I think some readers don't realize that all the author's citations to man pages point to Linux specific urls at : https://linux.die.net/man/

The ggp's (amstan) additional comment about renameat2(,,,,RENAME_EXCHANGE) is useful info and is consistent with interpretation (2).

If the author really didn't want Linux to be lumped in with "POSIX-like", it seems he would avoid linux.die.net and instead point to something more of a UNIX standard such as: https://unix.org/apis.html

[0] Intersection vs Union: https://en.wikipedia.org/wiki/Set_(mathematics)#Intersection


AFAIK you don't even want to be POSIX-compliant unless having a sticker means more to you than being reasonable. Most projects knowingly steer away from compliance (and certifying compliance is probably also expensive)


The slash is read as "OR" in this case.

As in: Unix-like OR POSIX-compliant

In that light, it's probably fine to not nitpick over certifications here.


EulerOS was certified UNIX some years ago.


Huh, TIL. Thanks.


Except POSIX doesn't specify some of them as happening atomically.

Many people write UNIX/POSIX without ever reading what it says.


I'd be curious to know more about the switch reverse engineering. What was the ultimate goal for this password.


I keep hearing podman is better, especially for local setups. Does anyone know any podman cheatsheets similar to this or is it pretty much s/docker/podman?


I've used podman for number of years, possibly too long to really give a good comparison but for the most part it is exactly s/docker/podman. Can't think of anything I've read on the internet that I couldn't just copy the tail of and stick podman in front of it. Any run/build/inspect/volumes/secrets/etc all work like for like by design afaik. There may be additional flags on podmans end for other things it supports (eg: selinux labels).

EDIT: Actually the biggest might be that containers often need a fully qualified name, so instead of `run name/container:latest` you need `run docker.io/name/container:latest`. You can configure default search domains though.

The biggest thing people will (did?) miss is docker-compose. There was a third party `podman-compose` but now it seems that's actually been folded under the official umbrella, along with a `podman compose` command that will "Run compose workloads via an external provider such as docker-compose or podman-compose" so even that gap might be closed up now. Honestly I swapped to just scripting it myself when I swapped to podman - before even the third party podman compose existed, either using sh, .kube files or now systemd units. If you're used to using big 5-10+ container compose files you might have some friction there, might not.

There are differences internally, ex: docker primarily runs as root and has a different networking stack compared to podman, but for most usage on a dev machine it doesn't matter, and matters maybe in a deployment, maybe not.

Unsolicited opinion, I originally found Podman much less intrusive, dockers iptable muckery always rubbed me the wrong way, so it defaulting to userspace and just letting me do any nftable routing I wanted felt much nicer. It also just fees less icky when using it where its default or configuration options were less funnel-you-into-docker.com.

https://github.com/containers/podman-compose


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: