58 stories
·
0 followers

Taking Journalism’s ‘Experts Said…’ Chicanery About Facts to Its Natural, Absurd Conclusion

1 Comment

a political cartoon from the 1890s depicting a high-minded newspaper owner surrounded by images of the low-brow information he is briskly selling

Yesterday, the NY Times published an article about Donald Trump’s threat to take away citizenship from a US-born citizen: Trump threatens to strip Rosie O’Donnell of U.S. citizenship. The Times Bluesky account posted a link to the article accompanied by this text:

President Trump said on Saturday he was considering revoking Rosie O’Donnell’s U.S. citizenship. Trump has feuded with the comedian and actress since before he became president. Experts said the president does not have the power to take away the citizenship of a U.S.-born citizen.

Large media companies, and the NY Times in particular these days, like to use the phrase “experts said” instead of simply stating facts. The thing is, many other statements of plain truth in that brief Times post lack the confirmation of expertise. To aid the paper in steering their readers away from notions of objective truth, here’s a suggested rewrite of that Bluesky post:

Donald Trump, who experts said is president of the United States, which experts said is a sovereign state on the planet Earth, which experts said is an oblate spheroid and revolves around the Sun, which experts said is a G-type main-sequence star about 93 million miles from us, said on what experts said was Saturday that he was considering revoking (which experts said is a process of making invalid) the U.S. citizenship of a person with the last name of O’Donnell, who experts said is a living human person and U.S. citizen with the first name of Rosie (which experts said is a diminutive of Roseann). Trump, who experts said has feuded with the person who experts said is a comedian and actress since, experts said, before he became president (again, experts said this, that Trump is the president and that also there exists a time (which experts said i— {Do we really need to cite someone on the concept of time here? Surely, time is just time and everyone kinda sorta gets that? -ed}) before he was president). Experts said the president, who experts said doesn’t simply float away into the cosmos because of the mutually attractive force of gravity between him and the Earth, does not have the power (which experts said is whatever Robert Caro said it was in that heavy book about Robert Moses; the experts honestly did not make it through the whole thing) to take away the citizenship of a U.S.-born citizen.

Or, I guess you could do it the easy way:

President Trump said on Saturday he was considering revoking Rosie O’Donnell’s U.S. citizenship. Trump has feuded with the comedian and actress since before he became president. Experts said The president does not have the power to take away the citizenship of a U.S.-born citizen.

Thank you for your attention to this matter!

PS. Rolling Stone did waaay better with this story: Trump Thinks He Can Take Away Citizenship From Anyone He Doesn’t Like. And see also the NY Times Pitchbot if you are unaware of its existence.

PPS. The image is a political cartoon from 1894 — you can see the full version at the Library of Congress.

Tags: Donald Trump · journalism · NY Times · politics · Rosie O’Donnell

Read the whole story
lousyd
8 hours ago
reply
How do you know that "doesn't have the power" is an objective fact? I don't feel like that's something indisputable.
Wilmington, NC, USA
Share this story
Delete

Summarizing the last 45 days of feed reader behaviors

1 Comment

In mid-January, I made an announcement that the feedscore system would be resetting the logs for a fresh start, and was bumping the URL along to cast off forgotten readers. This had the desired effect of focusing on those people who are actively involved and let the others start getting DNS failures without bothering my servers. Win-win!

Anyway, this means we now have about 45 days of data to look at, and it's possible to build a report based on the latest observed behaviors.

The usual caveats apply: if one reader instance is being odd, that might be one user smacking the refresh button over and over and/or using terrible settings. If multiple instances of the same program are behaving the same way, it's probably the program itself.

Let's start with the ones that seem to have their conditional request situations figured out. This is clearly the biggest part of the list, and it's great to see things lining up like this.

First up, there's one that's not published yet, and they're doing fine. I hope their efforts are paying off and they have a successful launch when they are ready.

There are a bunch of newer Minifluxes doing their thing, with no problems to report. It seems rather popular.

One of the Miniflux users has a different reader program using the same key and it's screwing up the reporting. You should retire that key and get two more from me. This advice goes for anyone: don't point more than one instance at any given key. It renders the data unusable.

There are several NetNewsWire instances doing their thing with no trouble. I haven't been able to trip them up with pathological (and yet totally valid) bumps of the Last-Modified and ETag values yet. This is good! Some of them have bizarre polling intervals... guessing that's user-driven?

There are a couple of SpaceCowboys Android RSS reader instances which seem to be doing fine. One of them has a bunch of oddly-timed unconditional requests which I assume is the user smacking that refresh button. Smack that button with care!

A couple of Vienna instances are doing fine.

Audrey2 RSS reader is fine.

A couple of Emacs Elfeed instances are fine.

"unnamed-feed-reader" (yes, really, that's what it sends) is doing fine.

There's something which doesn't send a User-Agent at all (okay...), and it has some bizarre anomaly of sending a "" INM at startup, but then has been behaving. (Hint: just drop the header if you don't have a value for it!)

Someone put a lot of work into making a curl instance do the right thing, and it's running great.

Roy and Rianne's Righteously Royalty-free RSS Reader is fine.

github.com/er0k/feeds is fine.

walrss is fine.

feedmail.org/0 is fine.

MANOS is fine. (Is that the feed reader of fate?)

Bloggulus is fine.

There's some unidentified browser extension that's doing fine.

feedbase-fetcher is doing fine.

inforss is doing fine.

feedparser/6.0.2 is *so close*. It just needs the 59/60 minute timing adjustment thing (assuming it's going for 1 poll per hour).

...

There are a few which are still "double-tapping" the server when the feed is first added. This would trip a 429 on the real feed and generally indicates a problem with the data model. Another reason for the URL change for this project was to get readers to run their "new feed" flow again.

Two Feedbin instances did this same thing when they were added.

Yarr/1.0 did a second poll about 300 milliseconds later, and a third poll another 27 seconds after that. This is the wrong way to do things. The other timing also seems to not follow any real pattern.

...

Now let's talk about readers with some cache bugginess:

A couple of Newsboat instances still can be tripped up and will keep sending old values in their If-None-Match headers.

There's a BazQux instance which has the same INM bugginess. I wonder if they're using the same library for their HTTP comms.

...

Then there are some weird ones:

rss2email randomly goes unconditional at times. No idea why.

NextCloud-News/25.x.x still sent at least one 1800 IMS. I don't get this. If you weren't sent a value, don't return it in a header. On a positive note, it's no longer beating the hell out of the server trying to get a favicon this week (which isn't in the reports, but I can see it on my side).

...

Finally, everything else:

Something claims to be a browser (Chrome 77? Sure...) and sends 100% unconditionals. This is bad. It also sends HEAD requests which aren't visible in the report, but I can see them, and they're broken and pointless.

One key either has two separate Thunderbird instances banging away (bad! get separate keys!) or has one terrible implementation that always polls twice. Either way, it's not usable data.

There are also two FreshRSS instances which are both sending 100% unconditionals. What happened here? Over and over, it's just this sort of request:

Host: <redacted>
User-Agent: FreshRSS/1.26.1-dev (Linux; https://freshrss.org)
Accept: */*
Accept-Encoding: deflate, gzip, br, zstd

I just don't understand.

Read the whole story
lousyd
132 days ago
reply
No NewsBlur?
Wilmington, NC, USA
Share this story
Delete

Billionaires, Surplus, And Replaceability

2 Shares

The typical neoliberal defense of self-made billionaires goes: entrepreneurs and other businesspeople create a lot of value. EG an entrepreneur who invents/produces/markets a better car has helped people get where they’re going faster, more safely, with less pollution, etc. People value that some amount, represented by them being willing to spend money on the car. The entrepreneur should get to keep some of that value, both because it’s only fair, and because it incentivizes people to keep creating value in the future.

How much should they keep? The usual answer is that the surplus gets distributed between the company and the customers. So suppose that this new type of car makes the world $200 billion better off. We could have the company charge exactly the same price as the old car, in which case customers get a better car for free. We could have the company charge enough extra to make a $200 billion profit, in which case customers are no better off than before (they have a bit less money, and a bit better car). Or they could split it down the middle, and customers would end up better off than before and the company would make some money. Which of these distributions happens depends on competition; if there’s no competition, the company will be able to take the whole surplus; if there’s a lot of competition, all the companies will compete to lower prices until they’ve handed most of the surplus to the customers. Then once the company has some portion of the surplus, it divides it among capital and labor in an abstractly similar way, although with lots of extra complications based on whether the labor is unionized, etc.

This seems to me pretty hard to argue with - if someone creates a surplus, who doesn’t want them getting to keep some large fraction of it as a reward?

Most arguments against involve a claim that the company’s capitalists must be oppressing labor. Regardless of whether capital generally oppresses labor, this doesn’t seem like a strong argument against billionaires getting rich off of innovation. Suppose the old mediocre car company paid its workers $50,000 per year. Now someone invents a new better car company, and its workers do the same job as the workers at the old car company (ie their advantage isn’t more skilled workers, it’s equally-skilled workers making a better-designed car). It seems pretty fair to also pay their workers $50,000, which means that the big surplus created by the better car should mostly go to the capitalists.

(as an intuition pump, if Google and Bob’s Tools produce the same amount of value per employee in 2000, and the janitors at both get paid the same, and then in 2020 Google produces 1,000x more value per employee, should a janitor at Google get paid 1,000x the amount?)

But here’s an anti-billionaire argument that makes more sense to me.

Suppose Amazon creates $1 trillion in extra value for the world, it gets split 50-50 with consumers, Amazon makes $500 billion, that gets split 50-50 with labor and other stockholders, and Jeff Bezos ends up with $250 billion. The standard argument would say that this is fair compensation for the $1 trillion Amazon provided to the world.

But suppose that we go back in time and prevent Jeff Bezos from ever being born. Does this mean Amazon wouldn’t exist today? Probably not by that name. But does it mean that we wouldn’t be buying things online today? That we would have to walk to the brick-and-mortar store every time we wanted a book? Does it mean that Internet retail would be split across a hundred different storefronts, none of which had a good selection or was easy to use?

It might mean that. But I think “Internet retail giant which dominates the market through economies of scale” is a natural niche which Jeff Bezos won the race to fill. When I say “natural niche”, I don’t want to discount Bezos’ accomplishment - I certainly didn’t notice that niche in 1994, and even if I had, I wouldn’t have had the business acumen to fill it effectively. I just mean that, probably sometime between 1994 and today, someone with business acumen would have noticed that niche and filled it successfully. Maybe not quite as successfully as Bezos. But successfully.

(It’s like that old joke about how if Thomas Edison had never existed, we’d all be browsing the Internet in the dark; no, we would have waited another few years, and then some other genius would have invented electric light.)

Suppose that if Jeff Bezos had never existed, someone would have founded pseudo-Amazon two years later. That means Bezos gets credit for Amazon being two years more advanced than it otherwise would have been. That’s actually still worth quite a lot of surplus value - maybe still enough to make him a billionaire many times over! But probably not enough for him to have $200 billion or however much he has right now.

The problem with the neoliberal argument is that it gives the first person to fill a niche credit for the niche’s entire existence, not just for filling it earlier than it otherwise would have been filled. Just because Jeff Bezos solved Internet retail two years earlier than the person who would have done it if he was never born, he gets to collect rent on all transactions forever, while that other guy gets nothing.

(as an intuition pump, consider an archaeologist who spends years narrowing down the location of a pirate treasure to a beach in Florida, then digs there and finds it. Whatever the finders-keepers law, we would feel like in some sense she had earned the treasure. But consider another world where God announces on 1/1/2023 “THERE IS A TREASURE ON THIS BEACH IN FLORIDA!”, and everyone rushes there, and whoever ran the fastest got it. Again, regardless of the actual finders-keepers law, we would feel like that person hadn’t really earned the treasure, just beaten the next person by a couple of seconds. Or maybe there are some weak qualifications - you have to be a strong person who owns a shovel - but there are many strong people with shovels and it’s mostly luck that one of them was closer than another. )

This . . . maybe still isn’t a good argument to tax Jeff Bezos or distribute his money to his employees? Taken seriously, it implies that the only person who Bezos has “stolen” any money from is the second-best entrepreneur.

But that isn’t exactly right. Suppose that if Bezos hadn’t existed, the next potential Amazon founder would be two years later, the next founder one year after that, the next founder six months after that, and so on (we assume Amazon becomes more obvious and easier to found as the Internet revolution continues). A few years after Amazon was founded, the number of counterfactual founders reaches the thousands - at some point the tech space is so saturated, and the idea of founding a big store is so obvious, that each counterfactual-founder is only shaving days or hours off of the next one’s time.

So one way of thinking about this is that of the $250 billion portion of the surplus that the system has allocated to Bezos, Bezos “deserves” two years’ worth, the second-best entrepreneur “deserves” one years’ worth, and then a whole bunch of other people “deserve” a few dollars. But this doesn’t really make sense, because all the other entrepreneurs didn’t (non-counterfactually) do any work.

(you could argue that Bezos is being paid not just for his idea, but for the hard work of serving as CEO of Amazon over many years. I’m skeptical of this because it seems like the fair wage for that would be the going rate for top-tier CEOs, which is very high but not hundreds of billions of dollars. So fine, subtract that small amount out, but the rest still seems to be some sense of paying Bezos for his idea.)

But another way of thinking about this might be to imagine these people in some kind of abstract counterfactual competition with Bezos; in a world where they were all able to found their giant retail sites (because there was no natural monopoly), they would have driven down Amazon prices and given more of the surplus to consumers - they might also have competed for workers and driven wages up. So in this sense, maybe Bezos’ extra portion of the surplus is in some sense coming from ordinary people. This would be surprising, because Amazon already has very low prices. But given that Jeff Bezos has $200 billion, there must be some world in which $200 billion more could have gone to consumers through lower prices.

I don’t know what a fair economic system that takes this model into account would look like. It wouldn’t look like “billionaires shouldn’t exist”, because it might be that pushing Amazon forward by two years is indeed worth several billion dollars. It wouldn’t even look like “higher taxes on all billionaires in the hopes of having them have less money and maybe that will bring them closer to the fair level”, because plausibly some billionaires aren’t replaceable - I’m not sure anyone else would have started SpaceX if Musk hadn’t. But this model convinces me that “taxing billionaires a lot” and “taxing billionaires not at all” are at least two different unfair failure modes with their own advantages and disadvantages from a desert point of view.



Read the whole story
lousyd
1048 days ago
reply
Wilmington, NC, USA
Share this story
Delete

What happens when you press a key in your terminal?

2 Comments

I’ve been confused about what’s going on with terminals for a long time.

But this past week I was using xterm.js to display an interactive terminal in a browser and I finally thought to ask a pretty basic question: when you press a key on your keyboard in a terminal (like Delete, or Escape, or a), which bytes get sent?

As usual we’ll answer that question by doing some experiments and seeing what happens :)

remote terminals are very old technology

First, I want to say that displaying a terminal in the browser with xterm.js might seem like a New Thing, but it’s really not. In the 70s, computers were expensive. So many employees at an institution would share a single computer, and each person could have their own “terminal” to that computer.

For example, here’s a photo of a VT100 terminal from the 70s or 80s. This looks like it could be a computer (it’s kind of big!), but it’s not – it just displays whatever information the actual computer sends it.

DEC VT100 terminal

Of course, in the 70s they didn’t use websockets for this, but the information being sent back and forth is more or less the same as it was then.

(the terminal in that photo is from the Living Computer Museum in Seattle which I got to visit once and write FizzBuzz in ed on a very old Unix system, so it’s possible that I’ve actually used that machine or one of its siblings! I really hope the Living Computer Museum opens again, it’s very cool to get to play with old computers.)

what information gets sent?

It’s obvious that if you want to connect to a remote computer (with ssh or using xterm.js and a websocket, or anything else), then some information needs to be sent between the client and the server.

Specifically:

  • the client needs to send the keystrokes that the user typed in (like ls -l)
  • the server needs to tell the client what to display on the screen

Let’s look at a real program that’s running a remote terminal in a browser and see what information gets sent back and forth!

we’ll use goterm to experiment

I found this tiny program on GitHub called goterm that runs a Go server that lets you interact with a terminal in the browser using xterm.js. This program is very insecure but it’s simple and great for learning.

I forked it to make it work with the latest xterm.js, since it was last updated 6 years ago. Then I added some logging statements to print out every time bytes are sent/received over the websocket.

Let’s look at sent and received during a few different terminal interactions!

example: ls

First, let’s run ls. Here’s what I see on the xterm.js terminal:

bork@kiwi:/play$ ls
file
bork@kiwi:/play$

and here’s what gets sent and received: (in my code, I log sent: [bytes] every time the client sends bytes and recv: [bytes] every time it receives bytes from the server)

sent: "l"
recv: "l"
sent: "s"
recv: "s"
sent: "\r"
recv: "\r\n\x1b[?2004l\r"
recv: "file\r\n"
recv: "\x1b[?2004hbork@kiwi:/play$ "

I noticed 3 things in this output:

  1. Echoing: The client sends l and then immediately receives an l sent back. I guess the idea here is that the client is really dumb – it doesn’t know that when I type an l, I want an l to be echoed back to the screen. It has to be told explicitly by the server process to display it.
  2. The newline: when I press enter, it sends a \r (carriage return) symbol and not a \n (newline)
  3. Escape sequences: \x1b is the ASCII escape character, so \x1b[?2004h is telling the terminal to display something or other. I think this is a colour sequence but I’m not sure. We’ll talk a little more about escape sequences later.

Okay, now let’s do something slightly more complicated.

example: Ctrl+C

Next, let’s see what happens when we interrupt a process with Ctrl+C. Here’s what I see in my terminal:

bork@kiwi:/play$ cat
^C
bork@kiwi:/play$

And here’s what the client sends and receives.

sent: "c"
recv: "c"
sent: "a"
recv: "a"
sent: "t"
recv: "t"
sent: "\r"
recv: "\r\n\x1b[?2004l\r"
sent: "\x03"
recv: "^C"
recv: "\r\n"
recv: "\x1b[?2004h"
recv: "bork@kiwi:/play$ "

When I press Ctrl+C, the client sends \x03. If I look up an ASCII table, \x03 is “End of Text”, which seems reasonable. I thought this was really cool because I’ve always been a bit confused about how Ctrl+C works – it’s good to know that it’s just sending an \x03 character.

I believe the reason cat gets interrupted when we press Ctrl+C is that the Linux kernel on the server side receives this \x03 character, recognizes that it means “interrupt”, and then sends a SIGINT to the process that owns the pseudoterminal’s process group. So it’s handled in the kernel and not in userspace.

example: Ctrl+D

Let’s try the exact same thing, except with Ctrl+D. Here’s what I see in my terminal:

bork@kiwi:/play$ cat
bork@kiwi:/play$

And here’s what gets sent and received:

sent: "c"
recv: "c"
sent: "a"
recv: "a"
sent: "t"
recv: "t"
sent: "\r"
recv: "\r\n\x1b[?2004l\r"
sent: "\x04"
recv: "\x1b[?2004h"
recv: "bork@kiwi:/play$ "

It’s very similar to Ctrl+C, except that \x04 gets sent instead of \x03. Cool! \x04 corresponds to ASCII “End of Transmission”.

what about Ctrl + another letter?

Next I got curious about – if I send Ctrl+e, what byte gets sent?

It turns out that it’s literally just the number of that letter in the alphabet, like this:

  • Ctrl+a => 1
  • Ctrl+b => 2
  • Ctrl+c => 3
  • Ctrl+d => 4
  • Ctrl+z => 26

Also, Ctrl+Shift+b does the exact same thing as Ctrl+b (it writes 0x2).

What about other keys on the keyboard? Here’s what they map to:

  • Tab -> 0x9 (same as Ctrl+I, since I is the 9th letter)
  • Escape -> \x1b
  • Backspace -> \x7f
  • Home -> \x1b[H
  • End: \x1b[F
  • Print Screen: \x1b\x5b\x31\x3b\x35\x41
  • Insert: \x1b\x5b\x32\x7e
  • Delete -> \x1b\x5b\x33\x7e
  • My Meta key does nothing at all

What about Alt? From my experimenting (and some Googling), it seems like Alt is literally the same as “Escape”, except that pressing Alt by itself doesn’t send any characters to the terminal and pressing Escape by itself does. So:

  • alt + d => \x1bd (and the same for every other letter)
  • alt + shift + d => \x1bD (and the same for every other letter)
  • etcetera

Let’s look at one more example!

example: nano

Here’s what gets sent and received when I run the text editor nano:

recv: "\r\x1b[Kbork@kiwi:/play$ "
sent: "n" [[]byte{0x6e}]
recv: "n"
sent: "a" [[]byte{0x61}]
recv: "a"
sent: "n" [[]byte{0x6e}]
recv: "n"
sent: "o" [[]byte{0x6f}]
recv: "o"
sent: "\r" [[]byte{0xd}]
recv: "\r\n\x1b[?2004l\r"
recv: "\x1b[?2004h"
recv: "\x1b[?1049h\x1b[22;0;0t\x1b[1;16r\x1b(B\x1b[m\x1b[4l\x1b[?7h\x1b[39;49m\x1b[?1h\x1b=\x1b[?1h\x1b=\x1b[?25l"
recv: "\x1b[39;49m\x1b(B\x1b[m\x1b[H\x1b[2J"
recv: "\x1b(B\x1b[0;7m  GNU nano 6.2 \x1b[44bNew Buffer \x1b[53b \x1b[1;123H\x1b(B\x1b[m\x1b[14;38H\x1b(B\x1b[0;7m[ Welcome to nano.  For basic help, type Ctrl+G. ]\x1b(B\x1b[m\r\x1b[15d\x1b(B\x1b[0;7m^G\x1b(B\x1b[m Help\x1b[15;16H\x1b(B\x1b[0;7m^O\x1b(B\x1b[m Write Out   \x1b(B\x1b[0;7m^W\x1b(B\x1b[m Where Is    \x1b(B\x1b[0;7m^K\x1b(B\x1b[m Cut\x1b[15;61H"

You can see some text from the UI in there like “GNU nano 6.2”, and these \x1b[27m things are escape sequences. Let’s talk about escape sequences a bit!

ANSI escape sequences

These \x1b[ things above that nano is sending the client are called “escape sequences” or “escape codes”. This is because they all start with \x1b, the “escape” character. . They change the cursor’s position, make text bold or underlined, change colours, etc. Wikipedia has some history if you’re interested.

As a simple example: if you run

echo -e '\e[0;31mhi\e[0m there'

in your terminal, it’ll print out “hi there” where “hi” is in red and “there” is in black. This page has some nice examples of escape codes for colors and formatting.

I think there are a few different standards for escape codes, but my understanding is that the most common set of escape codes that people use on Unix come from the VT100 (that old terminal in the picture at the top of the blog post), and hasn’t really changed much in the last 40 years.

Escape codes are why your terminal can get messed up if you cat a bunch of binary to your screen – usually you’ll end up accidentally printing a bunch of random escape codes which will mess up your terminal – there’s bound to be a 0x1b byte in there somewhere if you cat enough binary to your terminal.

can you type in escape sequences manually?

A few sections back, we talked about how the Home key maps to \x1b[H. Those 3 bytes are Escape + [ + H (because Escape is \x1b).

And if I manually type Escape, then [, then H in the xterm.js terminal, I end up at the beginning of the line, exactly the same as if I’d pressed Home.

I noticed that this didn’t work in fish on my computer though – if I typed Escape and then [, it just printed out [ instead of letting me continue the escape sequence. I asked my friend Jesse who has written a bunch of Rust terminal code about this and Jesse told me that a lot of programs implement a timeout for escape codes – if you don’t press another key after some minimum amount of time, it’ll decide that it’s actually not an escape code anymore.

Apparently this is configurable in fish with fish_escape_delay_ms, so I ran set fish_escape_delay_ms 1000 and then I was able to type in escape codes by hand. Cool!

terminal encoding is kind of weird

I want to pause here for a minute here and say that the way the keys you get pressed get mapped to bytes is pretty weird. Like, if we were designing the way keys are encoded from scratch today, we would probably not set it up so that:

  • Ctrl + a does the exact same thing as Ctrl + Shift + a
  • Alt is the same as Escape
  • control sequences (like colours / moving the cursor around) use the same byte as the Escape key, so that you need to rely on timing to determine if it was a control sequence of the user just meant to press Escape

But all of this was designed in the 70s or 80s or something and then needed to stay the same forever for backwards compatibility, so that’s what we get :)

changing window size

Not everything you can do in a terminal happens via sending bytes back and forth. For example, when the terminal gets resized, we have to tell Linux that the window size has changed in a different way.

Here’s what the Go code in goterm to do that looks like:

syscall.Syscall(
    syscall.SYS_IOCTL,
    tty.Fd(),
    syscall.TIOCSWINSZ,
    uintptr(unsafe.Pointer(&resizeMessage)),
)

This is using the ioctl system call. My understanding of ioctl is that it’s a system call for a bunch of random stuff that isn’t covered by other system calls, generally related to IO I guess.

syscall.TIOCSWINSZ is an integer constant which which tells ioctl which particular thing we want it to to in this case (change the window size of a terminal).

this is also how xterm works

In this post we’ve been talking about remote terminals, where the client and the server are on different computers. But actually if you use a terminal emulator like xterm, all of this works the exact same way, it’s just harder to notice because the bytes aren’t being sent over a network connection.

that’s all for now!

There’s defimitely a lot more to know about terminals (we could talk more about colours, or raw vs cooked mode, or unicode support, or the Linux pseudoterminal interface) but I’ll stop here because it’s 10pm, this is getting kind of long, and I think my brain cannot handle more new information about terminals today.

Thanks to Jesse Luehrs for answering a billion of my questions about terminals, all the mistakes are mine :)

Read the whole story
lousyd
1065 days ago
reply
Some day, late afternoon on a Thursday in the year 3027, some computer tech is gonna be hacking at a floating air terminal on a spaceship and will stop and say, "somebody should redesign all this cruft". And someone else will say, "but it's backwards compatible..."
Wilmington, NC, USA
Share this story
Delete
1 public comment
rraszews
1088 days ago
reply
Linux in the '90s could be very clunky with the keyboard because of these inherited conventions, with basic quality-of-life things like the behavior of the home and end keys not working quite right, backspace and delete doing the opposite of what you'd expect, or the escape key being a de facto modifier key. I think that a big part of what gave vi its staying power: you weren't as dependent on any of the keys whose behavior might not be predictable.
Columbia, MD

SELinux is unmanageable; just turn it off if it gets in your way

1 Comment

Security-Enhanced Linux (SELinux) is a type of Mandatory Access Control (MAC) in the Linux kernel. It can prevent software from performing unexpected — such as abusive or malicious actions — on your Linux systems. However, … it’s also an unmanageable mess, and I have a much greater understanding of why people recommend that people disable it.

Read more …



Read the whole story
lousyd
1167 days ago
reply
No.
Wilmington, NC, USA
Share this story
Delete

Yes, You Can Charge More

2 Comments

Artists, hustlers, consultants … low earners think about merit, top earners think about networks.

Read the whole story
lousyd
1178 days ago
reply
I wouldn't mind charging someone $10K to talk at them for a while. I could make something up.
Wilmington, NC, USA
Share this story
Delete
1 public comment
LeMadChef
1184 days ago
reply
You Have All the Talent You Need Today
Denver, CO
Next Page of Stories