sovay: (Sovay: David Owen)
sovay ([personal profile] sovay) wrote2025-07-04 11:32 pm

All of my ghosts are my home

On the normality front, our street is full of cracks and bangs and whooshes from fireworks set off around the neighborhood, none so far combustibly. Otherwise I spent this Fourth of July with my husbands and my parents and eleven leaves of milkweed on which the monarch seen fluttering around the yard this afternoon had left her progeny. My hair still smells like grill smoke. Due to the size of one of the hamburgers, I folded it over into a double-decker with cheese and avocado and chipotle mayo and regret nothing about the hipster Dagwood sandwich. A quantity of peach pie and strawberries and cream were highlights of the dessert after a walk into the Great Meadows where the black water had risen under the boardwalk and the water lilies were growing in profusion from the last, droughtier time we had passed that way. I do not know the species of bird that has built a nest in the rhododendron beside the summer kitchen, but the three eggs in it are dye-blue.

On the non-normality front, I meant it about the spite: watching my country stripped for parts for the cruelty of it, half remixed atrocities, half sprint into dystopia, however complicated the American definition has always been, right now it still means my family of queers and rootless cosmopolitans and as most of the holidays we observe assert, we are still here. It's peculiar. I was not raised to think of my nationality as an important part of myself so much as an accident of history, much like the chain of immigrations and migrations that led to my birth in Boston. I was raised to carry home with me, not locate it in geography. I've been asked my whole life where I really come from. This administration in both its nameless rounds has managed to make me territorial about my country beyond the mechanisms of its democracy whose guardrails turned out to be such movable goalposts. It enrages me to be expected not to care that I have seen the pendulum swing like a wrecking ball in my lifetime, as if the trajectory were so inevitable that it absolves the avarice to do harm or the cowardice to prevent it. It is nothing to do with statues. The door to the stranger is supposed to be open.

The wet meadows of the Great Meadows are peatlands. They were cut for fuel in the nineteenth century, the surrealism of fossil fuels: twelve thousand years after the glaciers, ashes in a night. The color of their smoke filled the air sixteen years ago when some of the dryer acres burned. If you ask me, there's room for bog bodies.

fred_mouse: Night sky, bright star, crescent moon (goals)
fred_mouse ([personal profile] fred_mouse) wrote2025-07-05 02:06 pm

Ridiculous weekend plans

I need some down time this weekend. I have any number of things I want to have done, but I'm restricting myself to things that can be done sitting on the bed, minimal movement. To whit:

  1. Finish reading The Dictionary of Lost Words - DONE! Highly recommended fictional account of the creation of the Oxford English Dictionary
  2. Read Attached - book on romantic relationships. in progress (started Saturday)
  3. Finish Creating a Second Brain - collected from the library yesterday, read a chapter on the bus
  4. Finish Library of the Dead - this one is due back on Monday, and being Libby, will get autoreturned.

Which, not actually outside the bounds, as long as I am actually doing those.

stretch goals, of which I'm hoping to achieve at least one

  1. close tabs (current: 526, goal: <500) in safari
  2. finish reading the fic I'm part way through (there might be more than one of these.
  3. progress Eldest's quilt (this is not an 'on the bed' activity; it is added so that if I need to get up and move around, I have a task)
  4. write up my goals for the next 6 months
  5. blog post about how the study is going.
twistedchick: watercolor painting of coffee cup on wood table (Default)
twistedchick ([personal profile] twistedchick) wrote2025-07-05 01:40 am
nanila: me (Default)
Mad Scientess ([personal profile] nanila) wrote in [community profile] awesomeers2025-07-05 06:10 am
Entry tags:

Just One Thing (05 July 2025)

It's challenge time!

Comment with Just One Thing you've accomplished in the last 24 hours or so. It doesn't have to be a hard thing, or even a thing that you think is particularly awesome. Just a thing that you did.

Feel free to share more than one thing if you're feeling particularly accomplished! Extra credit: find someone in the comments and give them props for what they achieved!

Nothing is too big, too small, too strange or too cryptic. And in case you'd rather do this in private, anonymous comments are screened. I will only unscreen if you ask me to.

Go!
Chris's Wiki :: blog ([syndicated profile] cks_techblog_feed) wrote2025-07-05 03:13 am

Operating system kernels could return multiple values from system calls

Posted by cks

In yesterday's entry, I talked about how Unix's errno is so limited partly because of how the early Unix kernels didn't return multiple values from system calls. It's worth noting that this isn't a limitation in operating system kernels and typical system call interfaces; instead, it's a limitation imposed by C. If anything, it's natural to return multiple values from system calls.

Typically, system call interfaces use CPU registers because it's much easier (and usually faster) for the kernel to access (user) CPU register values than it is to read or write things from and to user process memory. If you can pass system call arguments in registers, you do so, and similarly for returning results. Most CPU architectures have more than one register that you could put system call results into, so it's generally not particularly hard to say that your OS returns results in the following N CPU registers (quite possibly the registers that are also used for passing arguments).

Using multiple CPU registers for system call return values was even used by Research Unix on the PDP-11, for certain system calls. This is most visible in versions that are old enough to document the PDP-11 assembly versions of system calls; see, for example, the V4 pipe(2) system call, which returns the two ends of the pipe in r0 and r1. Early Unix put errno error codes and non-error results in the same place not because it had no choice but because it was easier that way.

(Because I looked it up, V7 returned a second value in r1 in pipe(), getuid(), getgid(), getpid(), and wait(). All of the other system calls seem to have only used r0; if r1 was unused by a particular call, the generic trap handling code preserved it over the system call.)

I don't know if there's any common operating system today with a system call ABI that routinely returns multiple values, but I suspect not. I also suspect that if you were designing an OS and a system call ABI today and were targeting it for a modern language that directly supported multiple return values, you would probably put multiple return values in your system call ABI. Ideally, including one for an error code, to avoid anything like errno's limitations; in fact it would probably be the first return value, to cope with any system calls that had no ordinary return value and simply returned success or some failure.

oursin: Photograph of small impressionistic metal figurine seated reading a book (Reader)
oursin ([personal profile] oursin) wrote2025-07-04 07:24 pm

Wednesday will be taking place on Friday this week

What I read

Finished The Islands of Sorrow and it is a bit slight, definitely one for the Simon Raven completist I would say - a number of the tales feel like outtakes from the later novels.

Decided not for me: Someone You Can Build a Nest In.

Started Val McDermid, The Grave Tattoo (2006), a non-series mystery. Alas, I was not grabbed - in terms of present-day people encounter Historical Mystery, this did not ping my buttons - a) could not quite believe that a woman studying at a somewhat grotty-sounding post-92 uni in an unglam part of London would have even considered doing a PhD on Wordsworth (do people anywhere even do this anymore) let alone be publishing a book on him b)a histmyst involving Daffodil Boy and a not so much entirely lost but *concealed unpublished in The Archives* manuscript of Epic Poem, cannot be doing with. (Suspect foul libel upon generations of archivists at Dove Cottage, just saying.) Gave up.

Read in anticipation of book group next week, Anthony Powell, The Kindly Ones (1962).

Margery Sharp, Britannia Mews (1946) (query, was there around then a subgenre of books doing Victoria to now via single person or family?). Not a top Sharp, and I am not sure whether she is doing an early instance of Ace Representation, or just a Stunning Example of Victorian Womanhood (who is, credit is due, no mimsy).

Because I discovered it was Quite A Long Time since I had last read it, Helen Wright, A Matter of Oaths (1988).

Also finished first book for essay review, v good.

Finally came down to a price I consider eligible, JD Robb, Bonded in Death (In Death #60) (2025). (We think there were points where she could have done with a Brit-picker.)

On the go

Barbara Hambly, Murder in the Trembling Lands (Benjamin January #21) (2025). (Am now earwormed by 'The Battle of New Orleans' which was in the pop charts in my youth.)

Up next

Very probably, Zen Cho, Behind Frenemy Lines, which I had forgotten was just about due.

***

O Peter Bradshaw, nevairr evairr change:

David Cronenberg’s new film is a contorted sphinx without a secret, an eroticised necrophiliac meditation on grief, longing and loss that returns this director to his now very familiar Ballardian fetishes.

ailbhe: (Default)
ailbhe ([personal profile] ailbhe) wrote2025-07-04 05:54 pm

It's hot

-Doors and windows all closed
-Blinds and curtains all drawn when sunlight falls on the glass
-Mylar foil on the windows
-External shade on the windows and walls where available (we moved a potted tree)
-Margarine tub of water frozen to make a huge ice cube for the flask-with-tap of water, takes longer to melt than same volume of smaller ice cubes so keeps water cool all day
-Cooling scarves
-Drinking water from bottles means we drink more
-Linen clothes
-Watering plants with Baumbad bags and only at night
-Portable aircon units *simpsons meme*
flareonfury: (Default)
Stephanie ([personal profile] flareonfury) wrote in [site community profile] dw_community_promo2025-07-04 12:35 pm

UC_XMEN FIC MEME > PROMPTS NEEDED


Event Info: Help is needed for [community profile] uc_xmen new fic meme/drabble-a-thon for X-Men unconventional ships. So in the style of the various fic memes and oxoniensis' Porn Battles - comment with prompts & I'll post a masterlist by July 6th. That gives us about two weeks for prompts and then a free-for-all to grab the prompts and start writing.

Important Dates: Collecting Prompts until July 6, 2025, which is when a new post with all the prompts will be organized and viewable for anyone to grab and start writing! No time limit after that!

Notes/Other Key Info: PROMPT AS MUCH OR AS LITTLE AS YOU WISH! THE MORE THE MERRIER! You want a full sentence or song title or whatever go ahead, or you can just do simple one or two worded prompts. If you have more than one prompt for a pairing, please separate by a comma (such as Cyclops/Rogue - bed, kiss, butterfly kisses) Comment as many times as you want, or just edit your comments before July 6th. I'll make a Masterpost for all the prompts that day and start the challenge then. If it happens where no one comments, I'll try to make up my own list up with various pairings, not just everything I ship.
Daniel Lemire's blog ([syndicated profile] lemire_feed) wrote2025-07-04 01:49 pm

Just say no to broken JSON

Posted by Daniel Lemire

JSON, or JavaScript Object Notation, is a lightweight data-interchange format. It is widely used for transmitting data between a server and a web application, due to its simplicity and compatibility with many programming languages.

The JSON format has a simple syntax with a fixed number of data types such as strings, numbers, Booleans, null, objects, and arrays. Strings must not contain unescaped control characters (e.g., no unescaped newlines or tabs); instead, special characters must be escaped with a backslash (e.g., \n for newline). Numbers must follow valid formats, such as integers (e.g., 42), floating-point numbers (e.g., 3.14), or scientific notation (e.g., 1e-10). The format is specified formally in the RFC 8259.

Irrespective of your programming language, there are readily available libraries to parse and generate valid JSON. Unfortunately, people who have not paid attention to the specification often write buggy code that leads to malformed JSON. Let us consider the strings, for example. The specification states the following:

All Unicode characters may be placed within the
quotation marks, except for the characters that MUST be escaped:
quotation mark, reverse solidus, and the control characters (U+0000
through U+001F).

The rest of the specification explains how characters must be escaped. For example, any linefeed character must be replaced by the two characters ‘\n’.

Simple enough, right? Producing valid JSON is definitively not hard. Programming a function to properly escape the characters in a string can be done by ChatGPT and it only spans four or five lines of code, at most.

Sadly, some people insist on using broken JSON generators. It is a recurring problem as they later expect parsers to accept their ill-formed JSON. By breaking interoperability you lose the core benefit of JSON.

Let me consider a broken JSON document:

{"key": "value\nda"}

My convention is that \n is the one-byte ASCII control character linefeed. This JSON is not valid. What happens when you try to parse it?

Let us try Python:

import json
json_string = '{"key": "value\nda"}' 
data = json.loads(json_string)

This program fails with the following error:

json.decoder.JSONDecodeError: Invalid control character at: line 1 column 15 (char 14)

So the malformed JSON cannot be easily processed by Python. Not good.

What about JavaScript?

const jsonString = '{"key": "value\nda"}'; 
let data = JSON.parse(jsonString);

This fails with

SyntaxError: Bad control character in string literal in JSON at position 14 (line 1 column 15)

Not great.

What about Java? The closest thing to a default JSON parser in Java is jackson. Let us try.

import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Map;

void main() {
   String jsonString = "{\"key\": \"value\nda\"}";
   Map<String, Object> data = parseJson(jsonString);
}

I get

JSON parsing error: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value

What about C#?

using System.Text.Json;

string jsonString = "{"key": "value\nda"}";
using JsonDocument doc = JsonDocument.Parse(jsonString);

And you get, once again, an error.

In a very real sense, the malformed JSON document I started with is not JSON. By accommodating buggy systems instead of fixing them, we create workarounds that degrade our ability to work productively.

We have a specific name for this effect: technical debt. Technical debt refers to the accumulation of compromises or suboptimal solutions in software development that prioritize short-term progress but complicate long-term maintenance or evolution of the system. It often arises from choosing quick fixes, such as coding around broken systems instead of fixing them.

To avoid technical debt, systems should simply reject invalid JSON. They pollute our data ecosystem. Producing correct JSON is easy. Bug reports should be filled with people who push broken JSON. It is ok to have bugs, it is not ok to expect the world to accommodate them.

ecosophia: (Default)
John Michael Greer ([personal profile] ecosophia) wrote2025-07-04 09:19 am

Frugal Friday

happy fourth of julyWelcome back to Frugal Friday! This is a weekly forum post to encourage people to share tips on saving money, especially but not only by doing stuff yourself. A new post will be going up every Friday, and will remain active until the next one goes up. Contributions will be moderated, of course, and I have some simple rules to offer, which may change further as we proceed.

Rule #1:  this is a place for polite, friendly conversations about how to save money in difficult times. It's not a place to post news, views, rants, or emotional outbursts about the reasons why the times are difficult and saving money is necessary. Nor is it a place to use a money saving tip to smuggle in news, views, etc.  I have a delete button and I'm not afraid to use it.

Rule #2:  this is not a place for you to sell goods or services, period. Here again, I have a delete button and I'm not afraid to use it.

Rule #3:  please give your tip a heading that explains briefly what it's about.  Homemade Chicken Soup, Garden Containers, Cheap Attic Insulation, and Vinegar Cleans Windows are good examples of headings. That way people can find the things that are relevant for them. If you don't put a heading on your tip it will be deleted.

Rule #4: don't post anything that would amount to advocating criminal activity. Any such suggestions will not be put through.

With that said, have at it!  
tielan: Maria & Steve walking in sync (in sync)
tielan ([personal profile] tielan) wrote2025-07-04 07:11 pm
Entry tags:

writing thoughts and the politics of fiction

Writing has been difficult. I only wrote 10,000 words this month and I don't think too much of that was new. I've been having trouble rewriting the novel. Feeling very didactic right now.

the bit where fiction is about the real world, too )

And yes, it's hard to focus on writing sometimes when my train of thought just wants to scatter.

Maybe with a (more or less) clear weekend, I can get some focused writing done? IDEK. I hate rewriting.

--

Also, I'm tired.
oursin: Brush the Wandering Hedgehog by the fire (Default)
oursin ([personal profile] oursin) wrote2025-07-04 09:55 am

(no subject)

Happy birthday, [personal profile] silveradept!
andrewducker: (Default)
andrewducker ([personal profile] andrewducker) wrote2025-07-04 02:49 am
Entry tags:

Photo cross-post


Got halfway to the bus stop to go to the pool and realised I didn't have my shoulder bag. Sprinted home, got it, and made it to the bus.

Got off the bus at the other end, realised Sophia's bag didn't have her swimming costume in it. Got a bus home, grabbed it, now in a taxi.

Fingers crossed that nothing else comes between me and drop-off and work!
Original is here on Pixelfed.scot.

nanila: me (Default)
Mad Scientess ([personal profile] nanila) wrote in [community profile] awesomeers2025-07-04 08:34 am
Entry tags:

Just One Thing (04 July 2025)

It's challenge time!

Comment with Just One Thing you've accomplished in the last 24 hours or so. It doesn't have to be a hard thing, or even a thing that you think is particularly awesome. Just a thing that you did.

Feel free to share more than one thing if you're feeling particularly accomplished! Extra credit: find someone in the comments and give them props for what they achieved!

Nothing is too big, too small, too strange or too cryptic. And in case you'd rather do this in private, anonymous comments are screened. I will only unscreen if you ask me to.

Go!
sovay: (Rotwang)
sovay ([personal profile] sovay) wrote2025-07-03 11:56 pm

Through crime and crusade, our labor it's been stolen

Because Hanscom hasn't held an air show in years, I have no idea what the hell passed over my parents' yard behind the unrelieved overcast except that it sounded like a heavy bomber, but not a modern one: an air-shaking piston-engined roar like who ordered the Flying Fortress, which were not to my knowledge even tested at the base. It suggested lost psychogeography and worried me.

Japanese Breakfast's "Picture Window" (2025) came around again on WERS as I was driving this afternoon. The line about ghosts and home keeps resonating beyond the pedal steel guitar.

I see we will be celebrating the Fourth of July out of spite this year. So go other holidays. Af tselokhes, John.
austin_dern: Inspired by Krazy Kat, of kourse. (Default)
austin_dern ([personal profile] austin_dern) wrote2025-07-05 12:10 am
Entry tags:

Will You Still Be Sending Me a Valentine

My days continue to be too busy with matters not yet fit to be shared, so please enjoy Fairy Ball pictures while I hope this situation soon changes.

SAM_1196.jpeg

They started taking volunteers for a Lion Dance and [personal profile] bunnyhugger joined the first and, it turned out, only group to perform.


SAM_1198.jpeg

Folks gathered around, getting their parts and getting instructions on what to do.


SAM_1200.jpeg

As an old marching band hand [personal profile] bunnyhugger was well-equipped to march correctly, unlike other people.


SAM_1203.jpeg

Here, someone makes off with a set of speakers while everyone else watches the dragon.


SAM_1208.jpeg

Frame from the middle of my movie of the dragon dancing.


SAM_1211.jpeg

And here we're near the end, the dragon's final bow.


SAM_1216.jpeg

Another sword-fighting demonstration, this time by night so everything looks blurry.


SAM_1217.jpeg

Alternatively, everyone looks really, really fast!


SAM_1221.jpeg

The end of the demonstration. Seconds gather up the participants.


SAM_1225.jpeg

And into the night and the wedding reception.


SAM_1227.jpeg

One of the communal art projects was painting these fairy mushroom scenes on the right.


SAM_1229.jpeg

Here's one of the completed boards.


Trivia: In the last year of Jean Louis Rodolphe Agassiz's life (1873) he ran a summer school for natural history, at the seashore on Penikese Island, off the southern shore of Massachusetts. Around 50 to 60 people attended. Source: Yankee Science in the Making, Dirk J Struik. (The island would in the 20th century house a leper hospital and, later, a residential school for troubled boys and is now a bird sanctuary.)

Currently Reading: Empire of the Sum: The Rise and Reign of the Pocket Calculator, Keith Houston.

Chris's Wiki :: blog ([syndicated profile] cks_techblog_feed) wrote2025-07-04 02:13 am

What is going on in Unix with errno's limited nature

Posted by cks

If you read manual pages, such as Linux's errno(3), you'll soon discover an important and peculiar seeming limitation of looking at errno. To quote the Linux version:

The value in errno is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or NULL from most library functions); a function that succeeds is allowed to change errno. The value of errno is never set to zero by any system call or library function.

This is also more or less what POSIX says in errno, although in standards language that's less clear. All of this is a sign of what has traditionally been going on behind the scenes in Unix.

The classical Unix approach to kernel system calls doesn't return multiple values, for example the regular return value and errno. Instead, Unix kernels have traditionally returned either a success value or the errno value along with an indication of failure, telling them apart in various ways (such as the PDP-11 return method). At the C library level, the simple approach taken in early Unix was that system call wrappers only bothered to set the C level errno if the kernel signaled an error. See, for example, the V7 libc/crt/cerror.s combined with libc/sys/dup.s, where the dup() wrapper only jumps to cerror and sets errno if the kernel signals an error. The system call wrappers could all have explicitly set errno to 0 on success, but they didn't.

The next issue is that various C library calls may make a number of system calls themselves, some of which may fail without the library call itself failing. The classical case is stdio checking to see whether stdout is connected to a terminal and so should be line buffered, which was traditionally implemented by trying to do a terminal-only ioctl() to the file descriptors, which would fail with ENOTTY on non-terminal file descriptors. Even if stdio did a successful write() rather than only buffering your output, the write() system call wrapper wouldn't change the existing ENOTTY errno value from the failed ioctl(). So you can have a fwrite() (or printf() or puts() or other stdio call) that succeeds while 'setting' errno to some value such as ENOTTY.

When ANSI C and POSIX came along, they inherited this existing situation and there wasn't much they could do about it (POSIX was mostly documenting existing practice). I believe that they also wanted to allow a situation where POSIX functions were implemented on top of whatever oddball system calls you wanted to have your library code do, even if they set errno. So the only thing POSIX could really require was the traditional Unix behavior that if something failed and it was documented to set errno on failure, you could then look at errno and have it be meaningful.

(This was what existing Unixes were already mostly doing and specifying it put minimal constraints on any new POSIX environments, including POSIX environments on top of other operating systems.)

(This elaborates on a Fediverse post of mine, and you can run into this in non-C languages that have true multi-value returns under the right circumstances.)