« first day (3941 days earlier)      last day (996 days later) » 

7:33 AM
what do you guys think of this workaround to kill processes in D state? safe?
I need to port this to multiple servers, can I compile in a single server and then use the created file in other servers?
 
8:33 AM
@Freedo Why would it be safe? What level of "safe" are you requiring? If you have issues with processes in uninterruptible sleep, I would suggest that you opt for fixing those/that program rather than introducing hacky kernel modules that you (or I or anyone who's not a kernel developer) don't understand the consequences of running.
 
It's impossible to fix the program causing it, it's not mine
 
Well, it's impossible to say that that kernel module is "safe".
 
 
2 hours later…
10:29 AM
This author seems to have forgotten to include the filename in his answer, unless I'm missing something.
I'm looking for a way to dump a file as Unicode codepoints in their customary hex format. (Still not sure why hex, but I'm going with it.)
 
@FaheemMitha The user in the question mentions standard input and also about "input" without saying what form this is in. The answer can be used as a part of a pipeline, as it would read from standard input.
 
@Kusalananda I don't see a mention of standard input. Just input.
Regardless, the answer as written just hangs, which isn't very useful.
 
@FaheemMitha "file/stdin/string"
 
As a rule of thumb, answers should do something as written.
 
It does. It reads from standard input.
 
10:41 AM
@Kusalananda I stand corrected. I should have said not only as standard input.
@Kusalananda Oh.
Well, that should have been mentioned, then.
 
Well, as it stands now, the answer is in the most generic form.
 
No doubt I'm missing the obvious, but how do I send std input to it?
 
Well, you either just tuck a filename in before the pipe symbol (iconv would open the file and read from it), or you use < file somewhere on the left hand side of the pipe, or you pipe from cat file into it.
 
@Kusalananda Ah. Yes, I did the first one. So it's not supposed to be used exactly as written?
 
I.e., iconv -f utf-8 -t ucs-4le file | od -tx4 or iconv -f utf-8 -t ucs-4le <file | od -tx4, or cat file | iconv -f utf-8 -t ucs-4le | od -tx4.
The command can be used exactly as written. You also need to understand what it does and how to use it, obviously.
You can't take solutions from here without thinking.
 
10:46 AM
@Kusalananda I prefer answers that expect less of me.
So, I was pointed to superuser.com/q/377793 on TeX SE.
But all those answer seem very complicated for such a simple question.
 
Well, I'm afraid that you will have to understand the tool that is given to you before you can use it effectively.
@FaheemMitha What's the meaning of life? ... is also a simple question. It's difficult to find the answer to it though. And the anwer may be verry complicated.
 
@Kusalananda Well, when I post an answer to a question, it works as written. But I guess that's just me.
 
Celada's answer works as written. The question asked about printing out unicode values from standard input. That's the actual title, and the answer tells us how to do literally that.
In this case, I believe you are expecting Celada's answer to answer some other question too.
 
11:40 AM
I always thought that pipelines and redirection were really fundamental knowledge
Not the details and even syntax specifics, but the concepts
 
12:00 PM
For some reason SQLite3 writes files with DOS character endings.
 
 
2 hours later…
1:43 PM
@FaheemMitha When you do what?
 
 
2 hours later…
4:09 PM
@Kusalananda Sorry, I don't follow.
 
4:30 PM
@FaheemMitha When does SQLite3 create DOS text files? What do you do to make it create DOS text files?
 
@Kusalananda When it writes out a CSV file.
 
@FaheemMitha Could you give an example? If I create a table with a single TEXT column and then insert some data into that, and then select all data from that table, I don not get a DOS formatted text file.
 
@Kusalananda Huh. You mean a complete self-contained recipe?
That might require some effort. It's weird you can't reproduce it, though.
 
@FaheemMitha Does SQLite3 have some special CSV-formatting output thing, or do you create CSV "manually" by quoting fields and concatenating them with commas?
 
@Kusalananda You have to set .mode csv. I used a recipe. One sec, let me try to find the link.
 
4:41 PM
Ah, that's when it writes DOS.
 
285
A: SQLite: How do I save the result of a query as a CSV file?

gdw2From here and d5e5's comment: You'll have to switch the output to csv-mode and switch to file output. sqlite> .mode csv sqlite> .output test.csv sqlite> select * from tbl1; sqlite> .output stdout

I used @gdw2's answer. Verbatim.
Still don't see why it would produce a file with DOS endings, though. Let me know if you can reproduce it.
 
That's actually in line with RFC4180 (datatracker.ietf.org/doc/html/rfc4180). That's the RFC that defines the CSV format. It requires that lines end in CRLF.
Yes, I can reproduce it.
If it's an issue, then simply run it through dos2unix or some other transformation that deletes the \r at the end of each line.
 
@Kusalananda Wow. I didn't know that.
@Kusalananda It's not an issue. I just thought it was strange.
CSV files need to have DOS endings? I didn't know that.
 
I think I knew about that form a long time before, but I don't think I've ever seen a piece of software actually using CRLF when producing CSV output on Unix.
 
That thread is rather disorganized. A whole bunch of people with very similar answers.
Someone should really clean it up, but the posters are presumably not interested.
@Kusalananda It sounds like you use SQLite3.
 
4:47 PM
@FaheemMitha I do, on and off, and I use software that uses SQLite3 under the hood. I've never used it for producing CSV before though.
We mostly use PostgreSQL at work though.
 
@Kusalananda I use it with LuaTeX. Because PG would be unreasonable overhead.
Just trying to debug a Lua issue with the Lua SQLite driver.
 
 
3 hours later…
7:41 PM
in TeX, LaTeX and Friends, 27 secs ago, by Faheem Mitha
Does anyone feel like commenting on this? I'm considering posting this on StackOverflow, but I thought I would first ask if I was doing something obviously wrong.
 

« first day (3941 days earlier)      last day (996 days later) »