« first day (1937 days earlier)      last day (3016 days later) » 

1:14 AM
For posterity, with zsh it would be jobs -p | awk '{print $3}' | xargs kill. ZSH isn't better at everything. — bahamat Jul 22 '12 at 18:54
Is that really the best way to kill all jobs in zsh? :O
 
@muru not sure why using -p instead of -l
mm.... apparently builtin jobs ignore parameters >:/
➜  ~  jobs -p
[1]  + 8931 suspended  bc
➜  ~  jobs -l
[1]  + 8931 suspended  bc
➜  ~  jobs
[1]  + suspended  bc
➜  ~  jobs -l bc
[1]  + 8931 suspended  bc
➜  ~  jobs -l %bc
[1]  + 8931 suspended  bc
➜  ~  type jobs
jobs is a shell builtin
 
1:43 AM
@Braiam yes, jobs -p and jobs -l had no difference when I tried it, and with more than two jobs, the + and - will only appear for two of them, so you can't rely on $3 either. :(
 
bug report time!
 
@Braiam To report a zsh bug we have to mail them, right?
 
The truth is that there are animals on here that think that because shell scripting questions are on topic, then any question about any command itself is on topic. Which isn't. They're command line programs. Animals. — Will 10 hours ago
 
 
4 hours later…
 
2 hours later…
7:40 AM
@cuonglm so what was it?
 
8:01 AM
@muru: It seems to be annoyed from Perl 6
perl6 -e 'say Signal::SIGSTOP.kv'
return (SIGSTOP 17)
 
 
1 hour later…
9:30 AM
@bahamat That doesn't actually work since the PID may be in field 2 or 3 depending on whether the job is one of %+ or %- or not. What works is kill ${${jobstates#*:*:}%%=*} which is indeed pretty long. — Gilles 9 secs ago
 
9:45 AM
@muru: Well, that's my mistake
Signal.enums return OS independent (close to POSIX standard) signals
We need $*KERNEL.signals
 
@Gilles So is the jobs -l/-p behaviour we saw a bug?
@cuonglm Ah..
 
10:07 AM
actually I missed that getting the PIDs wasn't the goal, the goal was to list the jobs for killing
@bahamat That doesn't actually work since the PID may be in field 2 or 3 depending on whether the job is one of %+ or %- or not. What works is kill %${(k)^jobdirs}, which is indeed longer; if you need to list the PIDs then you can use the even longer ${${jobstates#*:*:}%%=*}. — Gilles 56 secs ago
@muru what bug?
there's very little difference between jobs -l and jobs -p: -l lists the PID, -p lists the PGID, usually they're the same
 
9 hours ago, by Braiam
mm.... apparently builtin jobs ignore parameters >:/
@Gilles Oh, okay. So jobs provides no way to list just the PIDs.
 
@muru ??? not with a version of zsh I remember seeing
@muru not in zsh, no
 
Ok, I'll stick to bash for scripting. :D
 
@muru stick to ksh
 
Unfortunately not installed on that many systems.
 
10:11 AM
how would you even arrange to have a different PGID and PID in this context?
 
I have no idea... So when is jobs p useful?
 
 
2 hours later…
12:27 PM
@cuonglm printf(3)?
 
12:47 PM
@Pandya man 3 printf
 
 
2 hours later…
2:44 PM
@terdon thanks for recognizing as dupe and closing question. this is helpful; unfortunately I missed that question!
 
No problem. It was a good try :)
 
greetings
1
Q: Compare Audio Files

AngeloI want to set up a test-system for an embedded board, so I can automatically test both the audio out and the audio in jacks (LO, LI, HP, MIC). So I thought of recording an audio-file (with a sinus, or something), which I play on the same board, loop the LO to LI and HP to MIC. So I can use aplay...

this question is really interesting but I don't know if it really belongs here
As the OP states it, there's no way to compare the file at the byte level
 
3:01 PM
@Braiam actually that was comment on unix.stackexchange.com/questions/258193/…
 
3:16 PM
@Pandya: Sorry, what do you mean?
 
 
2 hours later…
5:15 PM
@casey @FaheemMitha well, finally went in to work today... and guess what new toy the Line-X guys next door have...
 
@derobert overkill for a parking lot hah
around here they just bring out the bulldozers and other heavy equipment and make monster piles of the snow that last until may in one corner of the lot
 
@casey They've got a bunch of plows and salt trucks, I'm guessing they've gotten in to the snow removal biz
 
@derobert probably in that case then, especially that they got a dump truck to collect the blown snow to clear streets rather than plow cars in or onto sidewalks
 
yeah
 
@derobert Were you working remotely?
 
5:23 PM
@FaheemMitha yep
 
i wish they did that around here. My driveway is always terrible with caked ice and dense plowed snow from the trucks here. A huge pain to clear and I usually never finish it until it naturally melts :/
 
@casey We've got complaints in our TH community about the huge piles of snow.
Including one where they built a 10ft tall, equally wide pile of snow right in front of someone's driveway...
We're having them come back to fix that one.
 
ouch, I would complain about that one
the 1 to 3 foot plow-created drifts at the foot of my driveway though, everyday life up here and nothing they'll do about that
 
@casey yeah, probably not much they can do. Without spending a lot more money.
 
5:27 PM
Im just glad our primary car as 8" clearance underneath.
 
must suck if you're driving one of those sport cars with 3" clearance.
 
@derobert yep. thankfully I'm not on a primary street, so we only get plowed the morning before garbage pickup (once a week) and if the street isn't too bad and primarily packed snow, they'll just level it instead of trying to plow down to pavement
@derobert my miata had about that and anything deeper than 4" was no-go.
snow tires don't help when the whole car is floating on the snow
 
hah, yeah. No one has snow tires around here.
 
and last year I bottomed out the toyota at the end of the driveway and had to dig it out :)
I thought if I got enough speed I could plow through it, but didn't take into account the lack of traction due to ice on the driveway it got stuck. Especially embarassing when the 80 year old neighbor comes over with a shovel to help
 
LOL
Clearly, you had to go faster still. That's what people around here try...
Especially once they're already stuck. Best time to floor it, right?
 
5:32 PM
@derobert i know better than trying that one hah
just melt the snow underneath the tires and sink further in, go for it!
 
yeah. And extra fun without a limited-slip differential
 
Random question: are ABC dry power fire extinguishers the way to go?
 
yep. between the snow and the sand dunes here in MI most people know how not to make it worse
 
Based on some preliminary reading, it appears so...
 
@FaheemMitha depends on what kind of fire you are planning to fight
 
5:34 PM
Comments, anyone?
@casey No idea. It's for home use.
ABC is supposed to cover most common/standard scenarios, I think.
 
probably then. ABC dry would be pretty general purpose I'd think
 
Actually, fire extinguishers don't seem terribly common in the West.
 
@FaheemMitha yeah, there are sometimes you want a CO₂ extinguisher instead, but the ABC are a pretty good one to have around to grab when "OH @*@!# FIRE!"
 
@derobert Do you have one?
 
@FaheemMitha three
 
5:38 PM
@derobert All ABC dry powder? What brand?
Would a 2 Kg one be enough for home use?
 
@FaheemMitha Not sure which brand, but yeah ABC dry chemical
 
So, brand? Amerex seems popular.
Also, ever actually used any of them?
Three seems like a lot. Any reason to have so many?
 
@FaheemMitha One per floor. For quicker access.
Haven't had to use one myself, thankfully.
 
An Amazon review said: don't get one with plastic parts. I'm not sure if this is good advice or not.
@derobert Oh, I forgot you have a townhouse.
Kind of pricey for something with plastic parts, imo.
 
I think you normally want as big as you can reasonably maneuver.
 
5:42 PM
@FaheemMitha id probably opt for metal myself
@FaheemMitha i'd say they are pretty common here
 
@casey Ah, Ok. I think the logic of that reviewer is that plastic is more likely to melt.
 
that does seem expensive. I don't recall mine being anywhere near that
 
every apartment will have at least one, most homeowners are smart enough to keep at least one around
 
@casey Oh, well. Maybe I wasn't paying attention.
 
apartment buildings sometimes will have sprinklers instead of portable extinguishers, but they'll have one or the other
 
5:44 PM
I think I had one at one point. I'm not sure I would have been able to find it at a moments notice, or operate it.
 
@FaheemMitha the point is to extinguish small fires... at least here, it makes sense to run from the big fires and let the fire department handle them
 
@derobert I'm not sure that would work here.
 
yea, something like a small grease fire in the kitchen or a fireplace / firepit that gets out of hand
 
@FaheemMitha Yeah. Then maybe you need bigger ones than we use here...
 
if the structure is burning, I'm getting out and calling 911
 
5:45 PM
What size do you guys have? I suppose you measure in pounds.
 
@casey or my parents used one when someone left something flammable on top of a halogen light. Made a nice mess, but put out the fire
 
Yes, halogen lights get hot. Nasty things.
 
@FaheemMitha I'd have to go look, not at home currently.
 
also prone to explosion if not handled properly
 
Would 4 Kg be sufficient, do you think?
 
5:46 PM
The one I have at home is larger than the one we have at work
 
I had a halogen light once. I liked the light quality, but it always made me vaguely uneasy.
 
i miss the portable halon extinguishers we had in the airplane
 
Which airplane?
 
@FaheemMitha the bigger it is, the larger a fire it can put out... I suspect 4kg would be something that anyone in the US would just run from.
 
@derobert Hmm. If we had a fire here, I'm not sure how useful the local fire brigade would be.
And this house has a lot of wood in it.
Mostly ceilings. Walls are not visibly wooden, but I'm not sure how flammable they are.
 
5:49 PM
@FaheemMitha ^^^
that one
but most if not all airplanes will have them
 
@FaheemMitha Well, the point of running isn't to save the structure. It's to save the people.
 
@casey Did you used to fly that?
 
@casey yep, pretty hard to say "darn, plane on fire, time to run!" when you're in the air
 
@derobert True, but we'd like to save the structure, hypothetically.
 
@FaheemMitha yes. i can't see the registration number on that one, but statistically it is likely I've flown that specific airplane
 
5:51 PM
@casey I meant the model, not the actual plane. :-)
 
@FaheemMitha big fires put out a lot of heat, toxic fumes, etc. At some point, you can't fight it without professional firefighting gear.
 
@derobert Yes, good point.
 
That article I posted gives some size guidelines. In lbs, of course, but you can convert.
 
well if i've flown that actual plane that implies I've flown that model. But yes, I'm typed in the EMB-145 which covers the EMB-135 and EMB-145 and I have experience in the 135-ER, 135-LR, 145-ER, 145-EP, 145-LR and 145-XR variants
 
@casey There must be a zillion planes in that model, though. Why do you think you've flown that one?
 
5:53 PM
@derobert and even if you can put out the flames, hot wood and embers can re-ignite the fire
@FaheemMitha because it is wearing my company paint and I've flown about 90% of the fleet
 
@casey Wow.
 
we had 274 airplanes, I've flown most of them
over the span of 4 years and 2500 flight hours
 
@casey That's a lot of flying.
 
I suspect mine is either KIDDE or First Alert, those are pretty common brands here.
No idea about brands there...
@FaheemMitha Pretty sure casey is/was a professional airline pilot
 
@derobert Yes, but it's still a lot of flying.
 
5:57 PM
@FaheemMitha nah, that is only an average of 625 hours / year. average schedules would be around 900/year. I'm closer to that in reality if you account for training months and vacation and some other things.
maximum is 1000/year per FAA regs.
 
Ok. So, do you miss the flying? Or not?
 
I miss flying, I don't miss the job. I need to get back into flying small airplanes.
@derobert was, until I chose family over the airline lifestyle.
 
@casey Did you ever fly small ones?
 
@casey I guess you're hardly ever home when you're flying planes?
 
Like private planes?
God, I get so sick of shopping online. Though the only thing worse than shopping online is shopping in real life. Infinitely worse.
 
6:01 PM
@derobert if you live in base and are very senior you could hold day-trip schedules at my airline and be home every night. If you lived out of base and commuted in you tended to want productive 3-day or commutable 4-day trips. A junior schedule only had 11 days off per month and reassignments could lower that number. As a captain I was very very junior and my schedule for a year was roughly 36 hours home, drive to work, gone for 5 or 6 days, come home, repeat.
with a 4 hour drive each way home/work
@FaheemMitha I learned to fly in a Cessna 172 (single engine piston prop) and then flew piper seminoles (twin engine piston prop) and then instructed in both of those kinds of airplanes.
 
@casey Are those the kind of planes that people might own?
@casey Sounds like a rough schedule.
 
@FaheemMitha the 172 perhaps, but twins aren't common for recreational owners, they cost too much to operate.
 
@casey Ok.
 
e.g. renting a capable twin-engine airplane will run you $ 200-400 / flight hour
 
I've read about rich Americans who have their private planes. They seem to like it.
 
6:04 PM
owning it an operating it will still cost you most of that
 
Greenspun comes to mine. Of the Law.
@casey That's really expensive.
 
@FaheemMitha well, if you have a billion lying around, you can afford that easily...
Most of us, unfortunately, do not have a billion lying around.
 
A Cessna 172 is cheaper and depending on what gas costs in your area you could probably operate one for around $60-$80 / flight hour
 
@derobert Well, Greenspun isn't that rich, I don't think.
@casey That's more reasonable.
 
6:06 PM
Still an expensive hobby, though.
But I suppose a lot of fun.
 
@derobert when you have that much laying around you might end up like that ^^^
 
@derobert Like I said, people who do it seem positive about it.
Though I suppose there is an element of survivor bias in there.
I mean, if you died in a plane crash, you'd probably be less positive about it.
 
@casey wow, that's a lot of money... is that a four-engine jet?
 
@casey Who does that belong to?
 
Who's place is that?
 
6:08 PM
I remember seeing Travolta's layout. It was quite improbable.
 
Well, I could guess from the V on the tail...
 
@derobert yes, that is a 707. that is (or was, no idea if he still owns it) john travolta's house
 
I'm surprised he has that kind of money.
 
@casey ah, ok... wonder what he did with a 707. Must go flying with quite a few friends.
 
@derobert not sure, he's only rated to act as second in command so he needs a PIC rated pilot to do anything with it (and you'd need 2 pilots no matter what to fly it legally). I always assumed it was his party bus.
 
6:10 PM
@casey expensive party bus!
 
grab 50 of your closest friends and fly to hollywood for a movie premier i guess.
 
I guess.
 
@derobert yea, I'd imaging the smaller jets get a lot more utility
and that tiny straight-wing jet can be flown single-pilot
 
well, if he can afford to buy a 707, I'm sure he can hire a pilot or two
 
Still surprised he has that kind of money. Maybe he's a good businessman. Or has one working for him.
 
6:13 PM
which costs more, the fuel to fly the 707 or the two pilots? I'd guess the fuel...
 
the fuel for sure
transcon would be in the 4-5 hour range and probably bill somewhere between $500-$1000 for a pilot (I'd guess). Fuel would be considerably more expensive. A 707 will burn around 12,000 - 13,000 lbs fuel per hour or around 1800 - 1900 gallons per hour. jet fuel is running around $0.87 / gallon, lets just call it $1600 / hour fuel cost. For a 4 hour trip that is $6400 for fuel.
and i have no idea what the maintenance budget per flight hour is on a plane like that, but probably not cheap
 
It would be fun to learn to fly. Probably scary though. I find climbing a ladder scary - I don't have much of a head for heights.
 
 
4 hours later…
10:07 PM
@FaheemMitha You're one of those people too scared to eat soup out of a bowl??? ;-)
 

« first day (1937 days earlier)      last day (3016 days later) »