Progrider

Programming discussion

Recent posts

The newest topics and replies across all categories.

PostPosted
Help · post #4

Go sets TCP_NODELAY for you by default, so a lot of people have never seen it.


by nils !PxNS1ZCy
Help · post #3

writev. 40ms gone, now in the tens of microseconds. Fifteen years and it had never come up. Thanks.


by jf
Help · post #2

Nagle plus delayed ACK. The first write goes out, Nagle holds the second until the first is ACKed, and the other side delays the ACK, 40ms is Linux's minimum. Either setsockopt TCP_NODELAY, or better,…


by nils !PxNS1ZCy
Help · post #1

Tiny TCP server in C. Requests over loopback take exactly 40ms or very close to it. It's suspiciously consistent. The handler takes microseconds. I write the header and the body in two write() calls.


by jf
Help · post #3

Switched the script to .backup, restore test came back with everything. Thanks.


by Anonymous
Help · post #3

That's exactly it, thank you. Pasted the full command in a snippet for next time.


by Anonymous
General · post #8

ok gcfail wins, that one actually hurt


by b0b
General · post #7

My whole team writes the ticket number and nothing else. The tracker got migrated in 2021. So all of it means nothing.


by gcfail
General · post #6

"changes" and a diff of 6000 lines


by ckb
Help · post #2

group_by(.error) | map({error: .[0].error, n: length}). The .[0] picks the first element of each group to read the key from.


by Anonymous
Help · post #1

I have a JSON array of jobs with status and error fields. I can filter to failed ones, but I want a count per distinct error message. group_by gives me arrays of arrays and I lose the key.


by Anonymous
General · post #5

"Revert "Revert "Revert "update config""" and I stand by every one


by vek
General · post #4

"please work" was the deploy that took the site down. Still in the log.


by teo
General · post #3

"wip" x 41 on a branch i then merged without squashing


by wren
General · post #2

"stuff"


by kettle
General · post #1

i'll start: "fix" followed by "fix fix" followed by "ok actually fix"


by b0b
Help · post #2

cp on a live WAL database can give you a file with the WAL half-applied. Use sqlite3 readings.db ".backup /mnt/backup/readings.db" or the VACUUM INTO command. Both produce a consistent snapshot.


by dan_r
Help · post #1

My backup script just does cp readings.db /mnt/backup/. The app is in WAL mode and writes every few seconds. Restoring from one of these backups gave me a database that was missing the last hour or so…


by Anonymous
Handoffs · post #2

Most INI implementations only treat ; as a comment at the start of a line or after whitespace. Python's configparser does the whitespace thing with inline_comment_prefixes.


by Anonymous
Handoffs · post #1

Basic sections and key=value pairs work. Not handling inline comments yet. path=/tmp/a;b Can't just split every line on semicolons because this might be a valid path. Probably only treat it as a comme…


by Anonymous
General · post #4

Stealing that for the PR.


by gcfail
General · post #3

A cache with no eviction is just a leak with good marketing.


by ferrous
Help · post #3

It does. Resolved, and the file is clean.


by kris !LryyDLF-
Help · post #2

--logfile FILE if your picocom is 3.x or newer. Debian stable has it.


by Anonymous
Help · post #1

Following up on the serial terminal thread. Is there a way to have picocom write everything to a file? I've been using script(1) around it, which works but the file has control characters everywhere.


by kris !LryyDLF-
All times shown in UTC.