« first day (3590 days earlier)      last day (1358 days later) » 

12:20 AM
Ugh, major revamp of the firefox android app with the last update. Tabs are listed from bottom to top and new tabs open on top. I might get to try that duckduckgo browser more...
SO/SE chat is also sketchy, but that's also an issue on desktop
 
 
7 hours later…
7:15 AM
@Isaac Thank you. I tried searching for this, but didn't get anywhere. I thought initially it might be a 2d array.
@Isaac Ok, I see that section.
 
 
3 hours later…
10:28 AM
1
Q: Prompt is not shown after running a script with an "exec" command redirecting stdout and stderr

yaelAn example script is shown below. The meaning of the syntax - exec > >(tee -a "$file" "$sec_file") 2>&1 , is to print to the console the stdout and sdterr , and also to print to the files - /tmp/log.txt the stdout and sdterr more /tmp/ppl #!/bin/bash file=/tmp/log.txt sec_file=/tmp/log1.txt exec

That's interesting. I guess it has something to do with some buffering or other, but the exec is indeed breaking the prompt until you press enter.
 
 
7 hours later…
5:26 PM
Vague and poorly specified question: does Perl inherit significant parts of its syntax from shell? If so, what?
 
Why Did Larry Create Perl?: "Larry created Perl in the mid-1980s when he was trying to produce some reports from a Usenet-news-like hierarchy of files for a bug-reporting system, and awk ran out of steam. Larry, being the lazy programmer that he is,[8] decided to overkill the problem with a general-purpose tool that he could use in at least one other place. The result was Perl version zero." ...
... "He needed something with the quickness of coding available in shell or awk programming, and with some of the power of more advanced tools like grep, cut, sort, and sed,[9] without having to resort to a language like C.

Perl tries to fill the gap between low-level programming (such as in C or C++ or assembly) and high-level programming (such as “shell” programming)."
 
I'm getting unexpected results when trying to load a JSON file. Fairly complicated and not generated by me. Generated by Discourse, I think. Python's built-in json loader seems to lose most of the file.
I'm not sure how to address this. Should I try to run a JSON validator on this? Or try a different JSON library to load it? Or something else? I'm not even sure where I would report it. I've never worked with JSON. I've used YAML a bit. YAML is mostly a superset of JSON, I think, but it's certainly easier to read. At least the JSON and YAML I've seen.
And should I report it to Discourse? Presumably they would like the generated JSON to be loadable.
 
I'm no JSON expert, but it seems to me I've seen converters online; surely they'd bark if it was invalid
jq may even have a "lint" or "check" mode of some sort
 
@JeffSchaller So I should try an online converter? The JSON Python library (part of the std library) didn't give any warnings or errors or anything.
jq 17973.json
jq: error: syntax error, unexpected IDENT, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:
17973.json
jq: 1 compile error
Can I just feed jq the file directly? It's giving an error, but I don't even know if it is a real error, or user error.
Probably user error.
 
I can't say. I thought you said the python json library was losing most of the file, which seems like a silent "failure" to me
an online converter could at least confirm that you have a broken json bit
 
5:39 PM
@JeffSchaller I guess I could experment.
@JeffSchaller Yes, it seems unexpected. The file is 73kb, but the loaded data is a few lines. The conversion to YAML is 126 bytes, and is pretty much what the Python JSON loads.
(For simple stuff, YAML and JSON look pretty similar.)
 
 
1 hour later…
7:06 PM
@JeffSchaller My bad. Wasn't working because of a stupid blunder on my part. Though I'm now puzzled that any of my code was working, givent that blunder. It's a bit of a mystery.
Oh my, I have two bugs which cancelled themselves out in my use case.
I'd like to say I was drunk, but I wasn't.
 
7:22 PM
is it not possible to live boot centos 7 with no gui? I can only find gnome and kde live boot cds and see no option for no gui
 
7:34 PM
@FaheemMitha humans, it's always the humans ;)
 
 
1 hour later…
8:57 PM
@FaheemMitha then it's not valid JSON. Perhaps jsonlines?
which is more or less multiple lines of JSON concatenated in a file
 
@AndrasDeak It was user error. Nothing wrong with the JSON file.
 
I'm not much of a JSON user myself, but I see plenty of questions involving it on main and in the python chatroom, and I think I've yet to see a problem that was actually python's fault
@FaheemMitha OK :)
Oh, right, I didn't get all the way through the transcript, sorry
 
Really stupid user error, too.
I prefer YAML, personally.
 
the problem with YAML is that it's too general to the point of being insecure
JSON is as complex as a string of spaghetti (I was going to say a wooden stick, but you can beat a person with a stick)
perhaps it's not YAML but PyYAML... understandably I mostly hear the latter being mentioned
But I think the criticism I've heard was fundamental to YAML. Cool kids use TOML these days.
@FaheemMitha we all makes those all the time :) What makes you good is doing each stupid mistake only once.
 
@AndrasDeak YAML seems easier to read.
@AndrasDeak There are lots of dumb errors to be made. Also, I guess I'm rusty.
 
9:07 PM
@FaheemMitha yes, "it's insecure" is a different kind of argument against it :)
perhaps "unsafe" is the right word
Like how pickle is convenient for serialization in python, but you can create malicious payload with 5 lines of code so it's unsafe.
 
@AndrasDeak I'll take your word for it. But security issues do depend on the user case.
 
Well, in these cases it usually means that if you deserialize malicious files you'll be in trouble. So once you work with files that come from untrusted sources (or trusted sourced through untrusted channels), the security concerns are very relevant.
I don't know the details about yaml, but I can go look some up if you want. I'm only aware of the handwaving "it's unsafe" aspect.
similarly to pickle if you only read your own output it's fine (you just have to remember to use something else for unsafe files)
 
9:58 PM
@AndrasDeak The files I'm using are generated automatically from Discourse.
Mostly metadata, with some data too, I suppose.
@AndrasDeak Don't worry about it. But thanks for the offer.
 

« first day (3590 days earlier)      last day (1358 days later) »