« first day (3297 days earlier)      last day (1651 days later) » 

12:03 AM
@FaheemMitha ha, well there I disagree. I think her twist endings are great. A bit weak in some of her early work (e.g. The Ogre Downstairs ending is not amazing, though it is happy), but for the most part excellent.
 
 
4 hours later…
cas
3:34 AM
@Jesse_b you've never been on rpg.stackexchange.com then. They dogpile on anything that even slightly resembles an answer in a comment. if you ever thought that computer geeks were excessively pedantic rules-lawyer fascists, they've got nothing on roleplaying geeks. A shame, I'd be a lot more active on rpg.se if it weren't for the heavy-handed moderation (and, worse, the dog-piling sycophants who take every opportunity to suck up to the mods with their awesomely glorious mod powers).
tech sites like U&L and SO etc are far more tolerant of answers in comments. and there's an explicit cultural "you-snooze-you-lose rule" that comments are fair game for poaching into answers (e.g. meta.serverfault.com/q/1886/12539).
it's even common to leave such comments as hints for someone else to use in their answer (i know I do that when I don't have the time to write a full answer) - it helps the OP immediately and gives someone an opportunity to gain some rep by putting in the time and effort to write it up properly.
 
 
1 hour later…
5:09 AM
@Wildcard They tend to be overly complex, and often confused. And confusing.
 
 
5 hours later…
10:04 AM
@Wildcard I liked "The Ogre Downstairs" ending. It was low-key, but I thought it was a nice way to end the story. I also liked that the supposed villain wasn't really a villain at all. How often does that happen? But that was before she became ambitious with her endings.
Actually "The Ogre Downstairs" was one of the first of her books I read, sometime in the late 1970s. The Puffin edition, I think.
The one with floating children on the cover.
The one at the top here - abebooks.com/9780140308983/…
It says it was published 1977, which sounds about right. And that's probably about when I read it. Though "The Ogre Downstairs" was originally published 1974.
I also have a copy of "Wilkin's Tooth" somewhere. That was a very early work. But you could see her style forming, and even then a lot of her characteristic trademarks were in evidence.
Like the playful approach to fantasy tropes. In this case, "Puss in Boots".
I remember very clearly first reading "Charmed Life" around 1980, which is when my school library got it. And I remember being excited to read it, so I already knew who she was.
> last night, I got to the bit in the last chapter of Diana Wynne Jones's The Ogre Downstairs, when the Hell's Angels grown from Dragon's teeth start speaking in Greek, I remembered all I could and started sounding the words in Greek letters out to Maddy. Only to discover, to my amusement if not hers, that the Hell's Angels were speaking English, and colloquial English at that.
I only discovered that long after I first read it.
That if one transliterated the Greek letters that the Hells Angels were speaking to their English equivalent, they were speaking some version of English.
I remember one was "Fulla spirit, aren't they?". And another was "Let's get 'em!"
Given the context, the first was possibly intended as a pun.
That book clearly descend in a direct line from Nesbit. That was before she really branched out on her own. Most of her stuff after that doesn't inherit from anyone else, really. She's nothing if not original.
 
 
4 hours later…
1:51 PM
0
Q: hostname attribute in docker-compose

overexchangeIn the below docker-compose file, dbc: image: mysql:5.6 hostname: db expose: - "3386" environment: MYSQL_DATABASE: somebackenddb MYSQL_USER: user1 MYSQL_PASSWORD: pswd MYSQL_ROOT_PASSWORD: pswd agent: image: somedockerhub/ansible volumes: - ../../whatever/x.y...

 
Is it fair to say that every question (or at least virtually every question) about jq is a question about text-processing?
 
2:29 PM
@Jesse_b No. Not in the same way that every sed or awk question is a text-processing question. jq questions are often also curl questions, others are often about modifying JSON data structures. If a jq question is tagged "text-processing", it may be due to a misguided attempt at running sed or awk or grep over a JSON document.
 
@Kusalananda Yes but either way the entire purpose of jq is to process JSON data (aka text)
 
JSON data is not text though.
It's JSON data.
Not newline-delimited strings.
 
By what definition of text though
 
That's from a data-processing point of view.
 
> data in the form of words or alphabetic characters.
are csv/xml/yaml considered text?
 
2:33 PM
Two JSON documents can differ significantly as text files, but still be the same JSON document depending on the placement of newlines.
 
Yeah but I don't see any definition of "text" that even mentions newlines
 
POSIX "Text File": A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the <newline> character. Although POSIX.1-2017 does not distinguish between text files and binary files (see the ISO C standard), many utilities only produce predictable or meaningful output when operating on text files. [...]
POSIX "Line": A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
 
> zero or more lines.
By that definition technically no newline is required for a file to be considered a text file
 
Sure, but only if the file is empty.
 
> A file that contains characters organized into zero or more lines.
as long as it contains characters
 
2:37 PM
If it contains anything, that has to be newline-terminated for it to be a text file.
 
@Kusalananda Not by the definition you posted. You need a newline in order for it to be a line but you don't need lines for it to be a text file
 
Explain.
 
> POSIX "Text File": A file that contains characters organized into zero or more lines.
If it contains characters without a newline it doesn't have a line but does have characters
 
You've repeated that 3 times.
 
and therefore is a text file
 
2:39 PM
There's a Q on the site about this. I'll see if I can find it.
 
It may be misguided. I feel like the text file definition you posted is very clear
I've repeated it three times because I feel that line is all one needs to read to see what I'm saying :p
 
22
Q: What conditions must be met for a file to be a text file as defined by POSIX?

Harold FischerPOSIX defines a text file as: A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the <newline> character. Although POSIX.1-2017 does not distinguish between text files and binary ...

 
see here
>That character must be a <newline>, or this isn't a line, and so the file it's in isn't a text file. A file containing exactly byte 0A is a single-line text file. An empty line is a valid line.
Nowhere in the definition you pasted does it say a text file requires a newline
A line requires a newline but it says nothing about newlines in a text file
and it specifically says a text file does not need to contain lines
 
Your issue is with incomplete lines. Can a text file contain incomplete lines? I would say no.
 
@Kusalananda Where is incomplete line defined?
 
I would just say it's not a line at all unless it is terminated by a newline. Otherwise it is a string of characters
@Kusalananda What if it's at the beginning of the file? :p
 
And then a newline?
Then it's a line.
 
@Kusalananda Nope just a string of characters
 
Then it's also at the end.
 
fair enough
Still an incomplete line would be "zero lines"
and therefore a text file
 
2:44 PM
(I'm reading)
 
> In computing, JavaScript Object Notation (JSON) (/ˈdʒeɪsən/ "Jason"[1][2]) is an open-standard file format that uses human-readable text
> Type code TEXT
In computing, JavaScript Object Notation (JSON) ( "Jason") is an open-standard file format that uses human-readable text to transmit data objects consisting of attribute–value pairs and array data types (or any other serializable value). It is a very common data format, with a diverse range of applications, such as serving as replacement for XML in AJAX systems.JSON is a language-independent data format. It was derived from JavaScript, but many modern programming languages include code to generate and parse JSON-format data. The official Internet media type for JSON is application/json. JSO...
 
@Jesse_b From the POSIX Rationale: The definition allows a file with a single <newline>, or a totally empty file, to be called a text file. If a file ends with an incomplete line it is not strictly a text file by this definition.
 
@Kusalananda Which definition?
 
The POSIX definition.
That I pasted.
 
Where does it mention incomplete lines
 
2:47 PM
It's a vague definition and depends on whether you consider lines to be continuous or discrete. If you define a line as something ending with a newline, then foo is not a line, but could be taken to be a partial line. But that requires that there can be such a thing as a partial line and that isn't clear by the definition.
 
So maybe foo is 0.4 lines.
 
@terdon Yes I agree that foo would not be a line but text file specifically says it does not require lines
 
Sorry, that was the wrong link
The Rationale is a set of clarifying comments. The Rationale for the definition of "Text File" say that a text file must be empty or contain at least one line.
 
@Jesse_b It doesn't specifically say either, that's the problem. Both your interpretation and @Kusalananda's make sense.
 
2:49 PM
@terdon Naw @Kusalananda is right
I still consider JSON to be text though and would say that in order for a json file to be a proper file it should also terminate with a newline
It's just a specific format of text but I don't consider it something else
 
The definition says "0 or more lines", but whether or not a string with no newline is actually 0 lines isn't entirely clear. It's a partial line, but is that allowed? Is <1 line but >0 lines a line?
 
@terdon The link @Kusalananda most recently posted says:
> If a file ends with an incomplete line it is not strictly a text file by this definition.
 
Note that the input to some utilities (e.g. sh) is allowed to be non-text. For example, the last line of a shell script does not need to end with a newline.
 
So I am wrong about that :P
 
Ah, great. Yes, that one is indeed clearer.
 
2:51 PM
Shell scripts, I think, are also allowed to have lines longer than LINE_MAX.
 
Dammit. I wish I had that when I'd gotten into an argument with another user who was trying to convince me that newlines aren't required for something to be a file.
I had to agree that the POSIX definition didn't make it 100% clear.
 
:-)
So, @Jesse_b, I see no issue with JSON not having what POSIX defines as "text file" input.
 
I think the newline thing is pretty arbitrary in this case though. When I think of text or text file I think of something that can be properly rendered by a text editor (Which I believe is more applicable to the text-processing tag than a newline) vs say a microsoft word document which requires a specific application to interpret
 
The standard editors vi and ex has the following input file requirement in POSIX: Input files shall be text files or files that would be text files except for an incomplete last line that is not longer than {LINE_MAX}-1 bytes in length and contains no NUL characters. By default, any incomplete last line shall be treated as if it had a trailing <newline>. The editing of other forms of files may optionally be allowed by ex implementations.
 
So it seems they are more reasonable about it. "Ah I see that you forgot the trailing newline but this is clearly a file full of text so instead of being overly pedantic I'll just add it for you because I know that's what you wanted anyway ;)"
 
3:11 PM
@Kusalananda yes. It does say the input must otherwise be a text file, but don't see it say anything about incomplete trailing lines :)
 
@ilkkachu That was me misremembering.
 
I wonder if there's an sh-like shell that would care about the last newline being missing
 
IIRC @terdon has that tool on his machine that can loop through all his shells and attempt to run a command/script against them
I forgot to steal it last time I saw it
 
$ type checkshell
checkshell is a function
checkshell ()
{
    awk -F"/" '!/^#/ && NF>1{print $NF}' /etc/shells | sort | uniq | while read s; do
        printf '%s\t:      ' "${s##*/}";
        "$s" -c "$@";
    done
}
2
 
Thanks Homie
 
3:23 PM
np
EliahKagan had some good suggestions for improvement last time I'd posted that. Let me see if I can find them.
Here, and a few messages after that:
Aug 4 at 10:52, by Eliah Kagan
@terdon I think a separate list of shells may be better, either in checkshell itself or its own file. /etc/shells can have conceptual non-shells (/usr/bin/screen and /usr/bin/tmux), the same shell with the same behavior (/bin/zsh vs. /usr/bin/zsh), the same shell with different names/behavior that you may prefer not to test with (/bin/bash` vs. /bin/rbash), and may not have shells that are good to test with like busybox ash and any installed in your home directory for testing.
 
3:46 PM
^^ Sorry about the mangled code formatting in that message. I missed a backtick somewhere, or something.
 
 
3 hours later…
6:30 PM
Do answers which answer a question other than the question they’re posted in answer to (there’s a mouthful) qualify as “not an answer”?
-1
A: Where is the command line that is passed to the kernel, stored by the bootloader?

rastafile"Motivation/Multiboot2:" "Every operating system ever created tends to have its own boot loader." "Getting multiple operating systems to coexist reliably on one machine through typical chaining mechanisms can be a nightmare. " "If the [bootloader] that ... you’re screwed." "...a few people in...

 
I still don't really understand the not an answer close vote. What I got from the last conversation about it was that if they tried to answer the question it shouldn't be closed as not an answer
 
@Jesse_b yes, that’s what I gathered too. But in this case, the answerer thought of another question based on my answer, and answered that, not the original question...
 
Well I flagged it, lets see how the vote goes
 
6:47 PM
does that post actually answer some question? I'm not sure of even that
 
@ilkkachu I think it’s supposed to answer “Is the Linux initramfs a multiboot module?”
 
what with the disconnected quotes and the excursion to LILO and floppies, it's really hard to tell.
 
7:57 PM
@StephenKitt: I guess that user is on a roll with non-answers today
0
A: bash colored completion doesn't obey LS_COLORS environment variable

rastafileYou got me mixed up now! Let's see both side by side: colored-completion-prefix (Off) If set to On, when listing completions, readline displays the common prefix of the set of possible completions using a different color. The color definitions are taken from the value...

 
8:27 PM
@Jesse_b it also says the the characters must be organized into lines, though.
"Zero or more" but still into lines.
 
@Wildcard That makes sense
It's all lawyer jargon at this level
 
@Jesse_b yep.
 
I'm trying to use patch to apply a rather large diff file. It isn't the right tool, but I'm trying to use it out of desperation.
Some background: Mercurial has something called Mercurial Queues. This isn't part of Mercurial proper, but it's what they call an extension.
Anyway, MQ stores patches which you can apply to your Mercurial repository.
I'm not longer actively using MQ, but so have a lot of stuff in MQ, all of it in one patch.
Really bad usage, I guess, but that's history. And that patch is no longer applying.
I get:
hg qpush
applying smyt
abort: conflicting local changes found
(did you forget to qrefresh?)
Not exactly helpful. And in the past bug reports about this sort of thing have been ignored. Anyway...
I tried using patch to apply the MQ patch directly.
  patch -p0 .hg/patches/smyt
but it's just hanging.
The patch smyt to a first approximation is just a patch file. It usually works with patch, unless something has changed.
 
@FaheemMitha: I understood a few of the words you said but unfortunately I definitely can be of no help with this issue
 
I used to have a better idea how to resolve these sorts of issues, but with my declining use of MQ, my memory has become fuzzy.
This isn't exactly an emergency, but I'd like to be able to continue to access my MQ changes. The idea is to gradually merge them into the repository.
@Jesse_b No problem.
 
8:39 PM
@FaheemMitha Just didn't want you to think I was ignoring you :p. I honestly have never heard of Mercurial other than you mentioning it in the past
 
Perhaps someone can tell me what patch hanging signifies? It does seem to be doing anything from the processes list. Though I've only checked top so far.
@Jesse_b My question is at least partly about patch.
 
No experience with that either :p
 
I've tried #mercurial too. But it's a lot slower than it used to. Fast responses are no longer that common.
And there are no longer many people using MQ, either.
patch -p0 .hg/patches/smyt
is correct syntax, right?
 
doesn't patch usually read the patch file from stdin?
 
I guess I could try SO. But that would be desperate, considering that #mercurial has all the experts.
@ilkkachu Yes, that's what I was wondering.
But man patch has
patch -pnum <patchfile
right at the top.
I don't often use patch, either.
 
8:42 PM
yes
there's the redirection to stdin :)
 
Oh, hang on. That < is an inward director.
Right, so I was using it wrong. One sec.
Ah, ok. Looks like we're in business. Thanks for the help @ilkkachu.
Note to the man page writer:
A space between < and patchfile would be helpful.
 
it would be clearer like that, yes
 
Hmm:
File b/business/download/mtnl_plan_change.pdf: git binary diffs are not supported.
Looks like patch isn't going to handle everything for me.
Does anyone know of any alternatives that would handle "git binary diffs"?
In case anyone is wondering, Mercurial using Git's extended diff format. Or something like that.
Hmm.
13
Q: How to apply git diff --binary patches without git installed?

Taras MankovskiI use to git diff to generate patches that can be applied to remote server to update a project. Locally, I run: git diff --no-prefix HEAD~1 HEAD > example.patch Upload example.patch to remote server and run: patch --dry-run -p0 < example.patch If dry-run is successful, I run: patch -p0 < ...

Not terribly helpful.
Apparently the answer is to use git to apply the patch? Not sure if that is an option here.
I guess I could ask on a Git forum.
 
https://savannah.gnu.org/forum/forum.php?forum_id=7361
"GNU patch version 2.7 released" -- "Support for most features of the "diff --git" format, including renames and copies, permission changes, and symlink diffs. Binary diffs are not supported yet; patch will complain and skip them."
this one's an odd one, they mention downgrading patch because of binary diffs(??!): bytefreaks.net/gnulinux/…
 
Oh, perhaps git doesn't require the destination to be a Git repos.
@ilkkachu Yes, that looks weird. Why downgrade?
And patch really should support git binary diffs. It's been around for a long time, and at this point, it's practically an extended diff standard.
Does git apply give sensible error messages?
Let me try #git. I hope they don't laugh at me.
Does SE have a Git room anywhere?
 
9:03 PM
I think the inventor of gnu-parallel should be given a complimentary gold badge in the gnu-parallel tag
 
Apparently git apply will work outside a Git repos.
And it worked. Which is odd. Because hg mq didn't.
 
9:44 PM
Ok, this looks like something that Unix tools could easily do.
How can I get a list of all the files that diffstat outputs?
The format looks like:
TODO                                                      |   15
So the format is:
filename | number
on multiple lines. And I want all the filenames on one line.
I could do it with Python too, I guess.
 
 
1 hour later…
10:46 PM
@JeffSchaller: I smell ed
0
Q: Unix: Copy all words in a file that contains the word "Justin" to another file

Justin TrudeauI have a text file containing all the usernames in a website. I am trying to copy all words in that file containing the word "Justin" (for example, "JustinLee1", "JustinWang04") to another file. Is there a command (more specifically, a grep command) that would enable me to accomplish this?

 
11:03 PM
@Jesse_b ed's getting a little old; sometimes he smells :)
reading with a kid now, so I'll pass -- thanks for the heads up!
 
=)
 

« first day (3297 days earlier)      last day (1651 days later) »