« first day (2749 days earlier)      last day (2213 days later) » 

10:25 AM
Hmm, Stéphane just edited an answer of mine to change a shell script from:
for var in "$@"
do
to
for var do
Does anyone understand why?
I am assuming he's right, of course, but I don't know why one would be better than the other. I don't like the implicit use of "$@", I personally never use for var alone since I like knowing where the values come from, but since he changed it, there is probably some edge case or portability issue I am missing.
for i do is the Bourne/POSIX<2016 syntax. for i\ndo is the most portable if you ever come across ancient BSDs. for i; do is now also standard with the 2016 edition of the standard. for i in "$@" has a number of issues with a number of shells in corner cases. It's discussed in some Q&A here I beleive. — Stéphane Chazelas 3 mins ago
ok
@StéphaneChazelas fair enough, thanks.
 
10:48 AM
Oy! @StephenKitt you passed me in the rep leagues! Well done :)
 
10:59 AM
@terdon for i in "$@" doesn't work in Bourne or ksh88 if IFS doesn't contain SPC. It doesn't work correctly in some versions of the Bourne shell if $# == 0. There are issues with set -u in some versions of some shells for $# == 0 as well. "for i do" is canonical. All 3 are standard as of SUSv4TC2
 
@StéphaneChazelas Huh. I never use the for i do myself, so it looks odd and kinda cryptic to me. But thanks!
 
@StéphaneChazelas Ah. I'd already upvoted your answer too, so presumably I read it at some point. But didn't remember.
 
 
1 hour later…
12:20 PM
I don't know if anyone has advice to offer, but suggestions on where to hire a freelance web developer appreciated.
I looked at upwork, but it looks offputtingly large.
 
 
4 hours later…
4:12 PM
Hi @Jesse_b
 
@Kusalananda if you'll settle for a simple touch instead of a full-blown script, I've added an example
 
@FaheemMitha Salutations
 
@Jesse_b That's a fancy hello.
Trying to create a login for upwork, despite my reservations.
 
@FaheemMitha Hah, are you going to start freelancing?
 
@Jesse_b No, want to hire someone to make me a website for my rental.
I've been using Airbnb, but having my own site is probably a good idea.
Also, Airbnb sucks.
Anyone happen to know a good site to measure password strength?
 
4:33 PM
@FaheemMitha As far as I know it's all about length. Complexity doesn't actually mean much but the longer it is the harder it will be to crack
 
@Jesse_b The site I just tried disagrees.
 
@FaheemMitha How will you be hosting your site? Have you looked into wordpress or something similar
 
Not that it's necessarily right, of course.
@Jesse_b Not really sure. I hate PHP and all its works with a passion, but they seem to be quite dominant in this space.
I might just contact some web devs and ask them what they think.
I'd prefer not to pay much for a web site. I already have a VPS. Maybe I can host it there.
 
You also hate node.js so what DO you like? :p
 
@Jesse_b When did I say I hate node.js?
@Jesse_b I'm ok with Ruby and Python. Both of which are occasionally used to write web sites.
But I'm not sure if they have support for the sorts of things that a booking web site needs to have.
I could also live with Java. Really not a fan, but it's less stomach-churning than PHP. Which is the spawn of Satan.
 
4:38 PM
@FaheemMitha I don't think you said you "hate" it but you weren't very keen to the idea of me trying to learn it
IIRC your reaction was "eww"
 
@Jesse_b I wasn't? Well, that sounds likely.
There are much better languages out there.
 
@JeffSchaller Good. One day I'll collect these and put them in a script somewhere.
 
Unless you have practical reasons for wanting to do so.
Career stuff, getting a job, etc.
 
node and probably angular are the main replacements for php though
 
People learn all sorts of horrible things for work.
@Jesse_b If you say so. I thought Java, Ruby, Python and even Perl had reasonable representation in the web space.
 
4:40 PM
@JeffSchaller I'm also half thinking about writing a shell script that depends on unexpected word splitting and filename globbing etc. to run correctly ;-)
 
node and angular are javascript
 
I mean, learning a language like JS for "pleasure" is just weird, imo.
@Jesse_b Yes, I got that.
Any of Common Lisp, Schema, Haskell, O'Caml would probably offer a better experience.
Also Rust seems to have quite a lot of buzz these days, though I don't know anything about it.
Oh, also Clojure.
The Mercurial folks are talking about adding Rust to Mercurial. Amusingly called the Oxidation Plan.
Curious thought - rust and fire are basically the same chemical process.
But they occur at different speeds.
No one ever says - head for the exits! the building is rusting.
 
as far as I know javascript is one of, if not the most popular language for web applications. If your developers already know javascript for writing client side stuff it would make sense to just use node, angular, or something similar to handle the server side stuff
 
@Jesse_b Yes, I know it's popular.
Anyway, is that relevant to my web site plan?
 
Maybe, although I'm guessing you will be able to select the desired language on upwork
 
4:53 PM
@Jesse_b I expect so.
 
 
1 hour later…
6:13 PM
@Kusalananda a shell version of the IOCCC?!
 
@JeffSchaller :-) Something like that, yes.
 
Junior admin comes in and goes "oh! I should go quote these variables." break
 
Hurray, my crazy LVM answer got an upvote.
 
@Kusalananda That is actually pretty common in forms such as for n in $var, curl $opts, etc
 
@Jesse_b You're giving me ideas here... for n in $var1, $var2; do. Notice the comma... :-)
Oh, my cat just broke: instagram.com/p/Bhwwu9XgeK-
 
6:25 PM
$ cat script.sh && ./script.sh
#!/bin/bash
var1=Hello
var2=World
for n in $var1, $var2; do
	echo $n
done
Hello,
World
I'm now trying to come up with the most obfuscated way to write a hello world bash script
 
That's what apt shows you when you tell it to remove a package with required priority, right?
 
Yup.
o/ BTW...
It doesn't take unicode into account, so if you type in Hindi, it doesn't calculate the added entropy, but except for that, it's pretty nifty and funny.
 
8:16 PM
@Fabby Definitely not using Hindi passwords. In most cases I doubt that's even possible.
 
@FaheemMitha It should be: Windows 2000 was the furst fully unicode OS and that was 18 years ago...
 
@Fabby Hmm, I admit I've not tried.
And hi @Fabby. Long time no see! How are you doing?
Huh, I see someone starred my comment above. I wonder who it was.
Well, upwork is certainly busy. I just posted a job description, and already got three replies.
 
@FaheemMitha Not me!
On holiday and now going to watch a movie and fall asleep next to it...
 
One of them from Navi Mumbai (that's New Bombay).
Which is particularly remarkable since it must have been posted after 1 am.
Apparently freelancers work really hard...
 
@FaheemMitha Hopefully you'll find someone half decent (compared to yourself)
 
8:20 PM
@Fabby Not me what?
@Fabby I don't follow.
@Fabby What movie?
I was just watching Season 4 of Coupling when the power went out.
 
Ghost in the shell
 
It's back now, but it really does look like my UPS needs a new battery.
@Fabby I think I've heard of that. Animated, is it?
 
I dunno yet, just pressed play when you pinged me...
:p
 
@Fabby I bought the soundtrack for that, because I liked the music. It came with a soundtrack DVD which was much of the actual movie, but without characters. Just the scenery, and the music.
 
Cool!
 
8:23 PM
No, not animated.
 
(that was the original Ghost in the shell though, not the recent non-anime one)
 
I never read saw the anime, so I won't be dissapointed.
 
I'm off to bed. Take care.
 
@Kusalananda "Dvorak-keyboard user, but a nice guy really" made me LOL
Good night!
 
@Fabby I'm guessing you're watching the Scarlett Johannsen one.
 
8:26 PM
I dunno yet: I keep being interrupted!
:D
good night!
I got up at 07:30
|-)
 
@Fabby at least OP continues "and it was the worst decision ever ." — so maybe some learning has occurred...
 
8:42 PM
Probably not the worst decision ever.
So, do I replace my UPS battery, or the UPS itself? Decisions, decisions...
 
depends on what costs less
I think with smaller UPS's it's cheaper to just replace the whole unit but larger ones probably the battery
 
@Jesse_b Is that the only criterion?
I really hate researching stuff. But I have to do it all the time.
Maybe that's why people have families. They can get their families to do the research.
I'm not even sure what my UPS model is...
 
9:30 PM
@Jesse_b I've never had an UPS where replacing the battery costs more than the unit.
Even when using the official batteries, as opposed to a third-party one (which is usually half the price that APC wants...)
Besides, the batteries are often hot-swap, so you can replace them without having to reboot. Can't do that with the UPS. And who wants to reboot? :-D
 
@Jesse_b That doesn't have a replaceable battery, supposedly.
(give or take, as who knows the form factor)
 
Well I have never bothered on one of the smaller UPSs of that size. Most of the companies I have worked for will only buy parts from specific vendors too (CDW, PCConnection, etc) and they usually make it more appealing to buy a new unit than a new battery
but I get your point
 
9:48 PM
@derobert How has your experience with third-party batteries been? I'll probably go with an "official" one.
And I would like a UPS with an LED display, but the ones here mostly don't come with one, for some reason.
 
@FaheemMitha they've always worked for me. Sometimes you have to reuse some of the electrical bits (connectors) from the old battery, but that's mainly on bigger UPSes
 
@derobert Is the quality as good? I suppose that can be hard to tell.
 
10:05 PM
@FaheemMitha I think lead acid UPS batteries are pretty much all the same.
 
@derobert What, no quality differences at all?
That seems a bit surprising.
 
Never done a side by side test. But I've never noticed any.
 
Or maybe I'm just naive.
I've occasionally been told I'm overly influenced by branding. Perhaps the term brainwashed was used.
 
And it's not like APC is actually making those batteries, pretty sure they're buying them from one of a few large battery manufacturers.
 
@derobert Have you used many?
@derobert Good point.
And rebranding them.
 
10:08 PM
Err, I have 6 UPSes at home another another 8 or so at work. Go through plenty of batteries!
 
@derobert Ah. I don't. But based on this morning's outage, my UPS battery is definitely close to dead. It was making the most alarming noise.
Or the UPS itself might be dying. Hard to say.
I've had it since 2011 or thereabouts. I forget. I didn't buy it on Amazon, and I'm not good at keeping track of receipts.
 
Well, they don't make a different noise when in need of replacement (well, except the UPS beeper)... they just don't last long.
 
Oh, well it was definitely making some strange noises.
A whooshing noise, like an A/C.
 
Beeper, some clicking (relays), maybe a bit of hum (transformers) are all normal noises. I guess airflow noises are fine too if it has fans.
Some of them buzz a little on battery too.
 
@derobert I don't think it has fans. But maybe I was hallucinating. In any case, my computer crashed fairly quickly. So clearly some maintenance is in order.
 
10:12 PM
I prefer when my UPSs make explosion noises
 
@Jesse_b Why?
 
@FaheemMitha I was joking :)
 
@Jesse_b oh
We had a power outage a couple of days ago too. It gets old fast. You sit in the darkness and contemplate your life. Not recommended.
 
It's fun though. I have seen a UPS explode after being daisy chained with another UPS, apparently that is not a good thing to do as they start charging each other back and forth or something causing the batteries to overheat
 
@FaheemMitha don't move to Puerto Rico, then
 
10:15 PM
@derobert Puerto Rico?
 
@FaheemMitha the home of power outages!
 
@derobert Oh. I thought that was here, maybe.
 
Ever since Hurricane Maria destroyed the island... Much of the island had no electricity for months.
Even now, the power still goes out for the whole island for a day or two every month or so, it seems
 
@derobert That sounds really unpleasant.
 
10:19 PM
> “It’s frustrating,” said José Carrillo, 55, whose power was out for three months before being restored in November.
Eek. 3 months! How is that possible?
 
@Jesse_b Wait... did someone plug each UPS into the other UPS's battery outlets? That'd be silly...
@FaheemMitha Exactly... I'm glad that isn't known about so much abroad, as it's an embarrassment :-(
 
> Wednesday’s blackout did not really affect Mr. Jiménez: Though the hurricane was seven months ago, his power had never been restored.
Even worse.
@derobert Is Puerto Rico actually part of the US? I thought it was a protectorate.
 
@FaheemMitha territory, not a state, but yes it's part of the US
 
@derobert oh
I had a friend who was a big fan of Puerto Rico. He used to sign his emails "Pura Vida".
Or something like that.
Costa Rican culture has been heavily influenced by Spanish culture ever since the Spanish colonization of the Americas including the territory which today forms Costa Rica. Parts of the country have other strong cultural influences, including the Caribbean province of Limón and the Cordillera de Talamanca which are influenced by Jamaican immigrants and indigenous native people, respectively. == Ethnic groups == As of 2012 most Costa Ricans are of primarily Spanish or Spanish/Mixed ancestry with minorities of German, Italian, French, Dutch, British, Swedish and Greek ancestry. Whites, Castizo and...
 
Costa Rica is a different place....
 
10:25 PM
@derobert Different from...?
 
Puerto Rico
 
@derobert Oh, right. Sorry, was confused.
Yes, Costa Rica is a country.
 
@derobert I don't remember, these were super old UPS's though
 
I don't know anything about the place, but it sounds kind of nice.
 
and we were also running them on unclean generator power which may have been the cause of everything but the generator guys said it was because they were plugged into each other which also probably shouldn't have been done
 
10:30 PM
@Jesse_b I imagine you must have had generator → UPS1 → UPS2, which yeah might not work well depending on UPS involved. I imagine you'd get fun results if you had UPS1 ←→ UPS2
Would hope it doesn't explode, though... Should fail safely :-/
 
I don't even remember the models of these things but I had never seen anything like it before or after
They looked like giant white computer towers
 
11:15 PM
@derobert Err... that list is headed first by us, Venezuela, Brazil and then PR.
 
11:29 PM
@Braiam better tell @FaheemMitha not to visit, then.
 
Well, actually he shouldn't visit us for the following:
in Root Access, Nov 14 '13 at 16:19, by Jimmy Hoffa
@Braiam you're lucky to live there though I gotta say: Driving through Santo Domingo was like driving in an arcade game. That was pure insanity, one of the most exhilirating, scary, hilarious things I'd ever done in a car.
 

« first day (2749 days earlier)      last day (2213 days later) »