« first day (2813 days earlier)      last day (2134 days later) » 

2:41 AM
Hi
Can anyone help me with editing json file in unix
I don't want to use awk or a lengthy script..
I have tried with sed but somehow the values for the keys I want I am not able to edit those
any pointers will be helpful
 
 
3 hours later…
5:50 AM
@Yougandhara The most common tool for parsing JSON data in shell scripts is jq (see stedolan.github.io/jq). It doesn't really have "editing capability" apart from being able to take user variables on the command line, similarly to what an awk script would be able to do. See also the jq tag on the main site.
 
 
1 hour later…
7:09 AM
@FaheemMitha the C standard, or extensions to it; 18661-1 is part of the floating-point extensions for C (TS 18661), see iso.org/standard/63146.html for the first part of it which is nearing the end of its review period and introduces a number of new functions, many of which are already in glibc
as Anthony said the C standard itself is being refreshed, as C2x, and is due for publication in 2022
if you look for kernel versions (“4.17”, “4.16” etc.) you’ll see the large number of commits related to features added in the kernel
and then there’s new instruction intrinsics, or optimisations using new instructions such as the recent AVX2 strcmp implementation, or even updating micro-architecture characteristics (e.g. the ULPS values which were updated recently for Haswell)
 
 
1 hour later…
8:40 AM
@Kusalananda can you help me with the editing tool which can used in my case
 
@Yougandhara use jq, it can be used for editing — or rather, it can filter JSON streams, editing values as they go through the filters; you can build arbitrarily complex JSON filters with it
if you need more help you should ask a question on the main site
 
@Yougandhara You should ask a question on the main site, which should include examples of the type of changes that you would want to make. That would make it possible for anyone with the skills to answer.
I only answer questions that I find interesting. This includes JSON questions occasionally.
 
 
4 hours later…
1:08 PM
I think my dog is getting into the dark arts
 
@Jesse_b Do tell.
 
@Jesse_b Your dog is doing assembly programming?!
 
He is just starting to act out
I also think he might be part dog and part bison
because he eats a lot of grass
 
1:36 PM
@Jesse_b This gave me the best misreading of today: "In fact, most vegetarians consider it a normal dog behavior."
 
Hah
Yeah, he doesn't actually throw up from it either. I've read that it causes some dogs to throw up and others seem unaffected by it, which is probably why he does it so often
 
 
1 hour later…
3:05 PM
@terdon around?
 
@ThomasWard sup?
 
not here, got anywhere else we can chat? (stuff related to the U&L site, but diamonds-only and site-scope-related)
actually i just sent you a room invite, but since apparently you aren't pingable in other rooms and I didn't want to bug you in TL i pinged here
when you get a minute, not ultra-important but somewhat related to current things on the site
 
 
2 hours later…
5:19 PM
does the -mtime option in find care about date barriers or just 24 hour barriers?
$ ll
total 3
-rw-r--r--   1 jbutryn  staff          0 Jun 22 17:17 file1
-rw-r--r--   1 jbutryn  staff          0 Jun 21 16:00 file2
-rw-r--r--   1 jbutryn  staff          0 Jun 21 23:00 file3
$ find . -mtime 0
.
./file3
./file1
 
@Jesse_b It should care about 24h.
 
:-(
 
-mtime n  The primary shall evaluate as true if the file modification
          time subtracted from the initialization time, divided by
          86400 (with any remainder discarded), is n.
 
I think I might use this solution: stackoverflow.com/a/801108/8239155
 
@Jesse_b hopefully a less tmp-racy version of it.
 
5:32 PM
@Jesse_b If you want to care about dates, then creating a reference file with touch with a specific timestamp and then using -newer is better, yes.
 
@derobert What do you mean
 
/tmp/$$ is a bad idea
 
@Jesse_b Use mktemp for the timestamp file. Then touch it.
 
Got it, thanks
 
Hi folks.
 
5:36 PM
Or alternatively, don't use /tmp (or /var/tmp, or any other a+wt dir)
 
Dia duit Faheem
 
@Jesse_b tmpfile=$( TMPDIR=. mktemp )
 
@Jesse_b I see we're still playing this little game.
 
@FaheemMitha I can't help it :s
 
Though Google Translate seems to think this means "He's money" in Malay.
 
5:38 PM
@Jesse_b Dia I've heard of, but what's duit?
 
Probably not what you intended.
But perhaps it's some slang I'm not familiar with.
 
Dia Duit is "hello" in irish according to google translate
 
@derobert I think he meant to write "do it".
@Jesse_b I submit that Google Translate is terminally confused.
 
I concur
 
Could be worse. Try feeding Google Translate Japanese.
 
5:40 PM
Yes, I see that if I switch the language manually to Irish I get "hello".
 
although considering it's free and I can remember a time when such services didn't exist, I think it's still quite amazing
 
Apparently "dia duit" literally translates to "God be with you."
The Irish, they are a religious folk.
 
@Jesse_b oh noes, are you younger than AltaVista's Babelfish?
 
@derobert We've got to face it, we are aged.
 
@derobert No. I'm almost older than the internet
Certainly older than the general public knowing what the internet is
 
5:43 PM
You don't look that old in your picture...
 
As a character is "New Girl" put it, "they have never heard of 'Saved by the Bell', and they have never felt pain."
 
But I guess it depends on what you mean by the Internet.
 
@derobert The "internet" predates me by 3 years
 
@derobert The net goes back to the 70s, at least, in some form.
Possibly even earlier.
 
ARPANet started in '69, I believe.
 
5:44 PM
ARPANET adopted TCP/IP on January 1, 1983, and from there researchers began to assemble the “network of networks” that became the modern Internet. The online world then took on a more recognizable form in 1990, when computer scientist Tim Berners-Lee invented the World Wide Web.
 
@Jesse_b TCP/IP only goes back to 1983? I thought it was much older.
 
well it says they adopted it then so I imagine it existed before then
 
'74, according to the wiki
 
they also had a defense network, as derobert says long before that
but I think that statement is saying 83 is when it started becoming a public thing
 
Oh, right, they adopted it. Sorry, was reading carelessly.
 
5:46 PM
NFSnet wasn't until '86
 
I remember in India reading about the Lisa, and feeling jealous. That was an early Apple, I think.
@StephenKitt probably owned one...
 
The history of the Internet begins with the development of electronic computers in the 1950s. Initial concepts of wide area networking originated in several computer science laboratories in the United States, United Kingdom, and France. The US Department of Defense awarded contracts as early as the 1960s, including for the development of the ARPANET project, directed by Robert Taylor and managed by Lawrence Roberts. The first message was sent over the ARPANET in 1969 from computer science Professor Leonard Kleinrock's laboratory at University of California, Los Angeles (UCLA) to the second network...
I don't think you can really have a firm date the Internet was created on — it's too vague.
 
Wow, USD 10K. That's a lot of money.
@derobert Agreed.
 
Well, by internet I mostly mean the www
Which is admittedly miscommunication on my part
but services like google translate certainly didn't exist before www
 
There are a bunch of dates you could pick. TCP/IP flag day (Jan 1, 1983) is one of them. (In which case, I'm older than the Internet.)
But you could also pick the start of ARPANet, or NSFNet, or first use of TCP (not TCP/IP), etc.
 
5:50 PM
@Jesse_b The web was a late arrival. In fact, I saw it arrive. I was at the University of Illinois at Chicago and saw the Mosiac browser.
Of course, I didn't realise it was starting a revolution, because I'm clueless...
Once there were things like Gopher.
 
I think I built my first PC in 1992
 
Before the web, I mean.
@Jesse_b Do you remember Gopher?
 
I do not
 
I remember Gopher...
 
The Gopher protocol is a TCP/IP application layer protocol designed for distributing, searching, and retrieving documents over the Internet. The Gopher protocol was strongly oriented towards a menu-document design and presented an alternative to the World Wide Web in its early stages, but ultimately Hypertext Transfer Protocol (HTTP) became the dominant protocol. The Gopher ecosystem is often regarded as the effective predecessor of the World Wide Web. The protocol was invented by a team led by Mark P. McCahill at the University of Minnesota. It offers some features not natively supported by the...
@derobert I expected that you would.
I think it was mostly a text thing. I used it a little bit. But the Web took over very quickly, I think.
 
5:53 PM
I don't think I met anyone with internet access until like 1998
 
I remember using Mosiac on Sun Workstations in Chicago.
That was 1994.
@Jesse_b For a while net penetration in the US was increasing very fast. But I suppose it's long since been saturated.
I imagine there are few people in the US who don't have broadband now. Assuming they want it.
If only to watch Netflix. Which I read accounts for much of US traffic.
 
Yeah, I don't think my schools even had the internet until I was in middle school
 
Game of Thrones and so on, I suppose.
 
I have read that netflix accounts for more than 60% of the world's traffic
 
Is it true that Netflix is now mainly streaming? When I was last in the US, in 2009, they were still doing the DVD rental thing in a big way.
 
5:58 PM
Mainly streaming now.
 
Yeah I used to get dvds from them before they even offered streaming services
 
Does the DVD option still exist?
 
yes, though you have to find it—don't think it's on their home page anymore, for example
 
@derobert oh
 
it's a separate subscription too
 
5:59 PM
Huh, times have changed.
 
which is lame because they offer some movies via mail that aren't available to stream
 
I expect there is stuff available on DVD that isn't available on streaming, though.
Digital agreements and so forth.
 
Which reminds me, I still have a DVD subscription, and I haven't sent a DVD back for ages... I should either start using it again (indeed, there is a lot not available for streaming) or cancel it.
 
I don't even have a dvd player other than in my pc
 
@derobert Do you have time to watch a lot of stuff? It's very time-consuming.
As I recall, life in the US is busy. Or can be.
 
6:01 PM
@FaheemMitha Well, depends on how much I want to do anything else. Streaming alone can fill all available time...
 
@derobert I'm sure it can.
 
I spend a lot of time watching/listening to podcasts but am normally doing something else and just playing them in the background
 
But watching TV is a sucky way to spend the time. Unless you are really, really tired, perhaps.
I know, I do a lot of it.
 
@FaheemMitha Depends on what you're watching. But yeah, you can definitely watch a lot of, errr, low-quality shows.
 
@derobert Even the best stuff in the world isn't a particularly good way of spending the time.
And most US TV, at least, isn't exactly great.
Though there is more variation in quality than there used to be.
Compared to the days when Lucy was the Queen of American TV.
Even as a child I recognized Lucy was low brow.
Growing up in India, there was one tv channel. Called Doordharshan. Sometimes it got US and British shows, and that was considered very exciting.
It was kind of Soviet.
 
6:06 PM
There are plenty of good movies and series that don't last forever.
 
@derobert One would hope they wouldn't last forever.
Or that would be a new kind of Groundhog Day.
 
hah I'm dumb :/
I'm making that tmp file in my script and have been troubleshooting why my find -newer command isn't working
I never touched the tmp file to change the timestamp
 
@FaheemMitha Well, some TV shows have hundreds of episodes. Ok, some have thousands. That's close enough to lasting forever.
 
@derobert A lot of the big, mainstream ones do.
5 or 6 seasons is already a lot of stuff.
@derobert Have you watched "Person of Interest"?
Now that's a TV show that really doesn't drag.
 
Nope, haven't seen it
 
6:09 PM
Watching it is a bit like being strapped to a rocket, watching the world fly by.
@derobert You should check it out. Warning: it might be addictive.
On second thoughts, maybe you shouldn't check it out.
 
Apparently it's on Netflix
 
@derobert I'd expect it to be.
 
Hah, and already in my list
 
netflix makes $1.2B/month, they should have everything
 
Bigger than Disney now (by market cap, at least)
 
6:18 PM
I hope they stay number 1 though, I despise amazon
Hey @FaheemMitha: Have you looked into apps for your phone that will record calls (instead of needing a separate recording device)
 
You have a list?
 
@Jesse_b I've thought about it. Though that would then only work for phone calls.
And maybe really nice phones have good mics, but mine don't, I think.
 
@FaheemMitha Yeah but phones can also act as personal recorders too
 
@Jesse_b Sure, but they need good mics.
There typically isn't space one for one, though.
 
6:24 PM
I suppose although how good does the recording need to be, as long as it's legible it should be fine, no?
 
@Jesse_b Is that net income?
 
It's also easy to conceal a phone or even have it right out in the open without suspicion
 
@Jesse_b Yes, but I don't think it is necessarily comprehensible. (You wrote legible.)
 
@FaheemMitha Naw, not even accurate. They have 118~million subscribers X $10/month in subscription fees
 
@Jesse_b Ok, so that's just part of their income, then.
The subscription fees.
 
6:27 PM
I would say the bulk of their income although they are also a data mining company, but it doesn't account for what I imagine to be massive expenses
I think they recently paid $150 mil to Dave chappelle and significantly more than that to jerry seinfeld
which is a completely ludicrous thing in my opinion, jerry seinfeld is not funny or entertaining
 
@Jesse_b That's certainly a lot of money. For what?
But presumably they did their research.
What's the US Netflix subscriber strength?
 
@FaheemMitha I've heard Dave Chappelle got $50 mil per special for three specials, and they have some large deal with seinfeld for like 3 shows and some comedy specials worth something like $300 mil if I remember correctly
 
@Jesse_b Certainly a lot of money.
 
no seinfeld only got $100 mil
(only lol)
 
But probably they have people in back doing statistical prediction and so forth, planning stuff.
 
6:32 PM
and chappelle got $60 mil for all 3. I guess the numbers I heard were way off
 
Could someone please hand me only $100 million? I mean, actually, I'd be perfectly happy with half that, a paltry $50 million :-/
 
I agree, I don't understand what makes Seinfeld so special.
 
Well I think they are also willing to lose money at the moment in order to bring the largest variety of content
 
His TV show was clever, but not really special either.
 
I am quite certain amazon is losing money on their prime video department right now
trying to overtake netflix
 
6:33 PM
@derobert Me too. Even $1 million would work for me.
 
I wouldn't turn down any amount of money :p
 
@Jesse_b In India they are basically giving it away for nothing.
 
Bonjour
 
Hi @PrabhjotSingh
 
hi @FaheemMitha how are you?
 
6:34 PM
@PrabhjotSingh Сайн уу
 
@Jesse_b I see you are infectious.
@PrabhjotSingh Still alive.
@Jesse_b Good grief.
 
@FaheemMitha Glad to hear that
 
@PrabhjotSingh Yes, it's preferable to the alternative.
You guys should check out "Person of Interest". Not a dull moment. Which is probably more than you can say for "Game of Thrones".
 
@FaheemMitha preferable to the alternative?
 
@Jesse_b I must say, the business models of these new-fangled net companies is a mystery to me. E.g. Amazon.
@PrabhjotSingh Commonly known as "being dead".
So, Amazon doesn't make much money at all. Yet it's considered extremely valuable.
In fact, it only started turning a profit relatively recently. After making losses for a long time.
 
6:38 PM
@Jesse_b I will write a Mongolian hello world program, this time with if-else starement.
 
It is that the stock market just likes companies that are trying to take over the world?
 
@FaheemMitha Can i ask you one thing about Netflix?
 
@PrabhjotSingh I don't know anything about it, but ok.
 
@FaheemMitha Can Netflix kill Theatres and TV channels. Murdoch sold sky just 'cause of Netflix. Your thoughts?
 
I think Hollywood in general has been trying to kill theaters for years
 
6:43 PM
+1 for @Jesse_b
 
Theaters get really screwed. They often make no money at all from ticket sales which is why they have to sell $8 candy bars
Most people just sneak food in the theater anymore so they probably have extremely low profit margins
 
Thanks fir coming back in action @Jesse_b.
 
@PrabhjotSingh Hard to say. But I personally don't understand why people go to movie theaters any longer.
It doesn't make a lot of sense in terms of time spent, for example.
Especially in busy places like the US.
@Jesse_b They don't? Why bother then?
 
@FaheemMitha This too. You can get an obnoxiously large flat screen tv for super cheap anymore. Why go into a crowded room with sticky floors and way too loud volume and subject yourself to people coughing all over and talking during the movie
@FaheemMitha Yeah they generally either have one of two deals
 
@Jesse_b Yes, exactly. Also, ads.
 
6:47 PM
1) They buy the rights to play the movie for a very high flat fee and hope they can sell enough tickets to make it back
2) They pay nothing for the rights to play the movie but must give 100% of ticket sales to the movie studio. They make money only off concession sales
I think the second in the most popular today
 
@PrabhjotSingh Add the time going to the theatre, leaving the threatre, queuing to buy tickets, watching ads. It's a lot of wasted time.
 
@FaheemMitha but my apprehension is that this may kill independent or parallel cinema. I don't have sympathy for TV channels.
 
@Jesse_b Sounds like a great deal for the movie studios.
@PrabhjotSingh I thought Netflix does some independent cinema sponsorship. I could be wrong.
 
@FaheemMitha I too read that. Dibaker is doing lust stories if i am not wrong.
 
@PrabhjotSingh It's just an impression.
 
6:59 PM
@FaheemMitha Say if theatres fail, then the cost of viewing TV channels and Amazon/Netflix will go up.
 
@PrabhjotSingh I don't know if I agree, I think they are different markets
Theaters are only still alive today because they generally show films not yet available on tv or streaming services
Those films will just become available sooner as a pay-per-view type service which shouldn't affect general subscription prices, and if anything would likely be cheaper than viewing in the theater
 
@Jesse_b In India almost every film hit theatres before screening on TV
 
same here
but when theaters go away (pretty much inevitable), they aren't going to start going straight to tv, they will go to pay-per-view services
 
If Netflix is like stock market , this may twist neck of film makers as does Amazon to writers.
 
@PrabhjotSingh Why? Because some revenue will have gone?
@Jesse_b It's unclear if they will ever go away. It seems some people just like the experience. And have free time on their hands. I wonder how the US cinema going demographic skews these days. Young, I imagine.
The last time I watched a movie, personally, was in 2008. That was one of the Harry Potter films. And I didn't watch the whole thing. I got bored and went home. I had things to do.
It might have been Half Blood Prince. I remember it was the one where Umbridge got her comeuppance.
 
7:14 PM
@FaheemMitha I think some will remain for a while but I would wager within the next 10 years there will only be 1-2 theaters in each major city and most towns will lose their local theater
 
And that was in Durham, at a local mall. I used to go there for a massage, get some icecream, then walk around a bit. Sometimes browse the bookstore. Occasionally I would watch a movie.
@Jesse_b I'd like to take that bet.
 
@FaheemMitha I'll bet you one half-handful of pocket lint and three internets
 
@Jesse_b I didn't realise internets were multiple.
 
@FaheemMitha They will be in 10 years
 
@FaheemMitha Then why only one stock market of entertainment?
 
7:22 PM
@Jesse_b oh?
 
I wonder why so many people still haven't gotten the message that they shouldn't use kali
 
Google is working on disabling ad blockes.
 
@PrabhjotSingh Huh?
@Jesse_b Well, Gilles tried.
Maybe it's a cult?
 
"New linux user with some obscure laptop. Use it primarily for looking at reddit and watching youtube so my obvious first move was to delete windows and install kali. Nothing works, what do?"
 
@FaheemMitha thehindu.com/opinion/op-ed/online-revenue-battle/…. This is not that link that I read before. but this is close.
Now newspaper websites have problem with ad blockers?
 
7:28 PM
@PrabhjotSingh everyone does. You don't make any money if someone visits your site with an ad blocker
even youtube videos don't make money for views with ad blocker
 
@PrabhjotSingh Let's hope this doesn't take off. it sounds dreadful.
 
@Jesse_b But what if someone don't want to see same ad every now and then.
 
Anyway, the whole advertisement system is broken.
 
Youtube is a nightmare website.
I use cliqz browser, now this won't work.
why there is no no 2 for Google, YouTube or Amazon?
 
@PrabhjotSingh Network effects.
But there is competition in individual markets. E.g. Flipkart.
 
7:47 PM
@FaheemMitha Now in Flipkart, Google has 10% share. but i agree this is no 2 here.
 
8:43 PM
Random question: was just reading
29
Q: What advantages do students have who learn how to touch type?

studentWould a student's overall CS education benefit by having such a skill, and if so why not make it a required prerequisite? An editor notes that there are three (at least) different ideas here that may be confused. Does the user hunt and peck searching for each key for each use? Does the u...

How many of you guys can actually touch type? I can't.
Though I suppose none of us have to look at the keyboard while typing.
If we had to we'd quickly develop neck and back problems.
 
@FaheemMitha I never learnt how to touch type. I just catch myself doing it from time to time, but probably doing it incorrectly.
 
@Kusalananda Do you use all 9 fingers?
 
@FaheemMitha Never.
And I often look at the keyboard.
 
I doubt I do. I do use most of them, I think. But I'm sure my technique is wildly incorrect.
@Kusalananda I do when I type numbers.
Oh, and special symbols.
 
At least I don't only use my index fingers.
 
8:48 PM
@Kusalananda Me too
Well I occasionally use my middle fingers for the far out keys
I can type 80-130 wpm too
I read that wrong lol
 
:-)
 
I do only use my index fingers
I also never look at the keyboard though
 
Index fingers? That's a lot of work for two fingers.
 
@FaheemMitha Well I use my thumbs for the space key
 
@Jesse_b Oh. I see I don't use my last two fingers much at all.
 
8:52 PM
I type extremely fast though, although I will often make a lot of mistakes if I am trying to type too fast, or I'm getting all fired up about something
 
Ok. I'm fairly slow. But still make a lot of mistakes.
I suppose it would be possible to learn to touch type properly.
Probably would be a good idea too.
I could take a video of myself typing.
 
@FaheemMitha I took a typing class in high school but I don't think I learned anything from it because I had already been typing since elementary school
 
Actually, using something other than QWERTY might be more of a win.
 
One of the things that I think helped was we always had to type with a towel draped over our hands so we could not look at the keyboard at all
 
@Jesse_b You need to be willing to modify your style.
 
8:55 PM
@FaheemMitha Yeah but I already type faster than most people I meet, even in this field so why would I want to change? :p
 
@Jesse_b Repetitive Stress Injuries? :-)
@Kusalananda you use Dvorak, right?
 
@FaheemMitha I have slight carpal? tunnel in my right hand but I believe it's only from mouse use and I do some stretches that make it not affect me at all
 
I have somewhat fat fingers, which is great for typing on a keyboard; I can press multiple keys at once. It definitely speeds up my typing. (not)
 
@Kusalananda Heh
 
@FaheemMitha Yeah, it's Dvorak and me.
 
8:57 PM
@Jesse_b It could get worse.
 
@FaheemMitha It mostly has gotten better since I started using mouses that properly fit my hand and wrist pads
 
Well, sleep time.
@Jesse_b mice, not mouses. Yes, it's important to have a comfortable mouse.
 
@FaheemMitha Here too.
Be well
 
@FaheemMitha Mice refers to an animal, when referring to the computer peripheral it's mouses :-P
 
@Jesse_b Moose
 
8:59 PM
@Kusalananda geeses?
 
"guesses"
My first ever computer class was at the age of about 17. We got taught very basic stuff about hardware ("this is a printer", "this is a screen") and we did some Pascal programming. The teacher kept referring to the mouse as "the rat".
... and we were all given a 5.25 inch floppy each onto which we could save all our files!
 
9:40 PM
always fun when the new guys go around restarting things without asking anyone -_-
 

« first day (2813 days earlier)      last day (2134 days later) »