Better HN
topnewbestaskshowjobs
Log inSign up

kees99

1,025 karma · joined Jul 3, 2016 (10y ago) · 521 submissions

Submissions

comment 4mo ago · link · parent

Wasn't that abbreviation from "pipe"? As in - this is a pipe that you can use to connect terminal to a file, file to a printer... and yes, file to a file (that's cp/copy).

comment 4mo ago · link · parent

I've fed a couple of those chicken-scratch sketches to nanobanana with prompt "Treat attached as a technical drawing of a bicycle. Produce photo-realistic image of the actual bike manufactured to that spec. Try to stay close to the input, where possible", and... wow, results are not great.

comment 4mo ago · link · parent

Pretty good results overal. Even shows subnetting within e.g. digitalocean's blocks!

Couple of misidentified IPs:

141.98.83.0/26 - shows as "Panama", echoing bogus whois record. Real location is probably Romania, at least that's where origin AS209588 has peers. RTT triangulation is also consistent with the latter location.

93.123.109.0/24 - shows as "Bulgaria". Going by RTT, very likely it's in the Netherlands.

comment 4mo ago · link · parent

MADV_SEQUENTIAL might help a bit, but not that much. Biggest problem here is throughput-vs-latency.

With mmap()-ed file, for each pagefault, kernel will conservatively estimate block size to page in, so you'll have a ton of relatively small requests going to SSD. This would be IOPS-bound, and likely under-perform relative to maximum possible bytes/second throughput.

With explicit read()/pread(), kernel & SSD can work with much larger chunks, so it's easier to hit maximum bytes/second throughput.

Plus, with modern CPUs, IO-wait could be efficiently combined with number-crunching. So, if software knows in advance which data chunk (expert) it'll need for the next token, it can load that in parallel with computing current token.

comment 4mo ago · link · parent

Qwen is quite slow in general.

I'm getting ~0.5 tps from [qwen], and ~10 tps from [gemma] - roughly the same size, same quant, same hardware (8-core CPU) same software (llama.cpp).

[qwen] Qwen3.6-27B-Q4_K_M.gguf

[gemma] gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf

comment 4mo ago · link · parent

Yes, something like this:

  static inline long read(int fd, void *buf, long count) {
    register long rax asm("rax") = __NR_read;
    register long rdi asm("rdi") = (long)fd;
    register long rsi asm("rsi") = (long)buf;
    register long rdx asm("rdx") = count;

    asm volatile(
        "syscall"
        : "+r"(rax)
        : "r"(rdi), "r"(rsi), "r"(rdx)
        : "rcx", "r11", "memory"
    );
    return rax;
  }

comment 4mo ago · link · parent

Claude has surprisingly good knowledge of X11 protocol.

The other day, colleague showed me a (pretty basic) terminal emulator written in one-shot by Opus. Kicker is - that was compiled to a 30 KB static binary. That's right. No libX11, no libXfont, not even libc.

comment 4mo ago · link · parent

> same prompt 4 or 5 times

LM Arena permanently flagged / sent to the captcha hell my account after trying the same prompt twice. So, YMMV.

comment 4mo ago · link · parent

I agree.

This addresses one of two main failure modes of solar roadways (grippy coating disintegrating from being driven over), but keeps another one (contamination).

Note that this particular trail was right next to a terminus of very lightly used branch, served by well-maintained rolling stock.

Should one install this anywhere with large traffic of older locomotives, panels will quickly get covered in dark goo from oil drip+dust, reducing output dramatically.

comment 4mo ago · link · parent

> All it needs to do is be sent a new message.

Receiving a message in a timely manner, is far more energy-intensive, for two reasons:

- modern Internet, with nearly universal deployment of NAT, is such that any app (or phone OS, for that matter) can only make outbound connections. That is, to receive, it must keep making outbound requests to the server, constantly asking "is there a message for me?";

- modern android (and iOS too) has some pretty aggressive algorithms/rules to identify apps that can be safely suspended (i.e. denied the right to run in background). One such rule is "no activity within X amount of time". So, ironically, app has to waste CPU cycles to convince OS to keep it running.

There is an OS-level mechanism in both Android and iOS to avoid the second problem above, by the way of OS doing the polling (so-called "push notifications"), but there are their own dragons there, so many apps out out.

comment 5mo ago · link · parent

Uh... is this supposed to be valid standalone C?

GCC says there are a bunch of undefined symbols, first one being "R" right in the beginning:

  typedef  unsigned  char u;
  u w,X,T,D[1<<16],t[]=R,U=255;

comment 6mo ago · link · parent

> Always annoyed me that it clearly has 2 wires (power/signal + ground).

Same with "TWI" (Two-Wire Interface) , a name that Atmel (now Microchip) uses for I2C bus. There are 3 wires there (SDA, SCL, ground). Or 4, if you count power.

comment 6mo ago · link · parent

Nah, go straight for qmail. Give it your best try.

comment 6mo ago · link · parent

You are absolutely right.

Maybe I shouldn't. But then I have to deep-dive into yet another flagrant cheap hallucination. You see, when a molecule oxidize, it becomes a different molecule.

It is impossible for a benzoquinone to oxidize, yet remain a benzoquinone. There are just two of them [1], and the two are isomers [2]. Transforming one into another would be isomerisation, not oxidation.

Not to mention — "oxidize on contact with air" is such a pile of nonsense. Just look at those things: benzene ring with a couple of oxygens sticking from it. [1] That stuff is pretty darn stable in presence of atmospheric oxygen.

[1] https://en.wikipedia.org/wiki/Benzoquinone

[2] https://en.wikipedia.org/wiki/Isomer

comment 6mo ago · link · parent

"colorless molecules called benzoquinones"

...and then dozen of words further on:

"blue benzoquinone has the capacity to act against the bacteria that cause tuberculosis, while the red one is effective against Staphylococcus aureus."

How quaint! Blue colorless molecule is different from the red colorless molecule!

comment 6mo ago · link · parent

> The cost to run these for me is less than the cost of the cheapest vps (my total requests per month stay under the free tier limit).

I don't think this is a valid argument. Free-tier VPS do exist also.

On the other hand, if you don't trust unattended-upgrades [0], and prefer to spend time poking package manager manually (while at the same time considering that time an expense) - sure, that's a strong argument in favour of using lambda.

[0] https://ubuntu.com/server/docs/how-to/software/automatic-upd...

comment 7mo ago · link · parent

Solvinity, and Kyndryl, respectively.

That story is mentioned in the TFA.

comment 7mo ago · link · parent

Agree with your point overall, but ammonia in particular is a poor example.

Fish lack urea cycle, so they produce and excrete significant amounts of ammonia as part of normal metabolism.

comment 8mo ago · link · parent

Keeping with the YOLO spirit of the article, one can be even lazier, and do emergency R/O remount using this little thing:

https://www.kernel.org/doc/html/latest/admin-guide/sysrq.htm...

It's technically not an unmount, but still a pretty strong guarantee OS will not corrupt the image being written.

When done, reboot has to be done from the same sysrq handler, of course.

12345
18