HN user

seorphates

328 karma
Posts0
Comments82
View on HN
No posts found.

You should learn vim if you want to deal with systems. You can learn vim or not if you don't.

lookback: vi, sh and unix have become your vim, bash and linux systems of today. Now, while they have forward compatibility, of sorts, vi and sh, the same cannot be said in reverse, as a rule. Modern bash folks have bent bourne shell syntax into foreign looking contortions where bourne shell syntax is a) performant and conformant, b)a lot simpler when simpler is better and c) is why bash maintains posix.

I agree, learn basic vim. And bash. But not really to program with. It's more of a burden than not for a million languages and formats.

I can appreciate the quip, especially given my curmundgeonly entry. But the point remains. The shell needs to be able to call any command on the system reliably. Even aged old counting methods. At no point in that loop would the expr subprocess return other than zero. Try to break out of that loop with that bash switch.

One should not rely on these magics, the ones that alter runtime behaviors, without truly understanding what you're after and what you're writing. Or mostly understand. They're fine and good if you have narrow routines with a very strict focus - "I'm in, I'm out, bang."

The best switches available to the shell without a bunch of feature and package and library this or that bloat are exactly

  -x
  -n
That's all that you need to ensure that your scripting is what you need it to be. Introduce the magic after you've written the thing. When it's ready and it passes your tests then test it again.

Every single utility and package on that system is at your fingertips. Demand accuracy. I do.

Ok, "garbage" may have been harsh but how about a fun example? Try this with and without -e

  #!/usr/bin/env bash

  bell=`tput bel`
  tock='Blastoff!'

  do_ring()
  {
    if [ "$1" ]; then # true
      echo -n $bell; sleep 0.1
      echo -n $bell; sleep 0.1
      echo -n $bell; sleep 0.1
      echo $tock
    else
      echo -n $bell; sleep 0.1
    fi
  }

  i=3
  while [ "$i" -ge "0" ];
  do
    if [ $i = 0 ]; then
      sleep 0.5
      echo ok
    else
      echo $i $bell
      sleep 0.5
    fi
    i=`expr $i - 1`
  done

  do_ring $1 # do something different if arg
  sleep 1
  echo neat.
  
Semantic qualities aside there is something here that breaks with -e and if you're used to using -e by default you might be baffled and think shell sucks, for example.

Not to be that guy but this is mostly garbage. I suggest simply paying attention and testing. Switches can be a useful part of the tool but they can break things. It doesn't make things better rather it alters behaviors of the shell in sometimes unintended ways. Try some loops with some -eo. If you have a pipe that fails your script you're just ripping the heart and potential out of your script. I think you might just be looking for one-liners. It can be good to catch your failures and try other things vs "woop, damn, nope." Maybe you need things to fail first.

"Quote liberally" - also ripe. Mind your aPostrophes and Quotes because they do things.

I like writing for me and what I need done, not what or how others might have me write or how others might think it should be done.

The shell is a base orchestration and interface tool for your os. If you think it's just that bad then just stick to your language of choice but please refrain from suggesting lazy habits make a better shell, they don't.

Fly your own kite. It's much more fun.

I found it distasteful to even click it and I definitely can't stomach a full read.

It's extraordinary to me how we so willingly accept policy that directly and negatively affects so, so many facets of society and economy.

You want to maintain all the effects of growth, profits and budgets of a drug war economy? If so then you're a fucking idiot.

Sorry, I got a little discombobulated with your life in macos is better than unix/linux comment, but only because macos is unix. Thus life is better because macos is unix - unix with an excellent window treatment, no less.

But the trolling is a serious problem and more effort needs to go into addressing it directly. This is the stuff that righteous idiots grab a hold of - it's basically an iron buoy thrown to people that can't swim.

To top poster: these two things are not the same. They are wholly different classes where at the very base level one cannot exist without the other, literally. One is a utility provisioning and the other an appliance, figuratively.

This actually feels more like what I would expect police work to be like given the situation.

They most certainly do not have cause to demand access to swaths of comms no matter whose comms they're after and most assuredly when that access actually entails enabling access to all of the comms.

I posit there is no authority that should be able to demand this as a matter of the right to human existence. Law, order, society and government should not have ultimate authority on private communications no matter what the tech is capable of. We, as humans in a modern world, can speak and if desired do so in private. This is our right as individuals and if encryption helps us accomplish and enforce that right then so be it.

If they have probable cause then they need to beat feet or beat heads but either way they need to get to work. And by work I do not mean trying to impose a different reality than the one that we currently have - where math is fact, compute is cheap and source is open.

What's it going to be? 100 go free or six lines from everyone?

Right, for the masses, but for focused enterprise, like a well resourced gang, for instance, refortifying your security is just another build away. Add on some sneakernet transport and side-load instructions and the only people affected by a weakened platform is everyone else.

I might go so far as to say that our potential for a publicly operated social network is already here, or right close, but is being severely and intentionally hampered by ISPs more than anything or anyone else - and by extension recalcitrant, ignorant or paid-for representation.

Unrestricted symmetrical broadband would be a more than adequate foothold for robust frameworks that could fulfill the aspirations of one voice among billions in a truly decentralized fashion as well as provide a true springboard for thoughts, ideas and actions.

I believe the only role government should have here is ensuring access to the pipes that are regulated as an unhindered, affordable utility whose content is regulated only by you.

I also believe there are no words worth censoring. Yes, even nazi fucks. Let them speak and their words will prosper or fail on their own merit. We can't treat symptoms or causes if we drive unwanted words into darkness where they can fester and puss.

I suppose, yeah. Maybe that's a valid point in that until we can (want to?) cordon off core social services (for the whole of society) from the reach of private capital then we will inherently continue to create and sustain a market that zeroes in on the truly vulnerable. For example services just like healthcare including aging with dignity in assisted living after they've either been taxed out or need help or both.

For that latter part I've witnessed two mind-numbingly ugly siphoning of all assets to the tune of thousands and thousands of dollars a month until assets are gone and then they're forced out and into pretty sub-optimal situations and neither of these two examples started off anywhere near the edges of being poor but they certainly did die that way.

Having been peripherally involved with a small handful of that aging crop and their experiences with "security" I'm not sure you're being entirely fair by lumping all their ills together because they over-consumed. I'm not sure you noticed life around you but we're all but force-fed raw, unadulterated consumerism. Be that as it may, sure, careless spending seems like it would definitely be a contributing factor - credit where credit is due.

Unless one is a ff rich elder (or at least well above moderately wealthy) the suction of any wealth is aggressive and unrelenting, especially if any services are required. Not until someone is totally insolvent do the "real" safety nets (what's left of them) begin to kick in. If you can't afford your ever escalating healthcare costs then you will likely not get the care you need until your assets total $0.00 and you're living ss check to ss check.

There has been and continues to be a sickly draw on any wealth and an unrelenting hacking away of the security of society as a whole. We are surrounded by vultures that eat the living in what seems like an "I've got mine and now I want yours." agenda that does nothing for society, rich or poor and continues practically unabated.

Bankruptcy seems like a perfectly good, viable and reliable option when considering the stacked deck.

One person per lane is generally guaranteed only in competition. You can get your own lane if your pool is lightly loaded but by no means would your lane be off limits to others, normally.

It's crowded when you're finger tips to toes or you smash into the oncoming swimmer off the wall (the ones following you) which is typically the mistake of the one turning and not the oncoming swimmer but not always. You try to stick to lanes moving at your preferred pace. It's a little like driving - sometimes you get your own lane and sometimes you don't.

You haz kwestuns we haz anserz

I don't know. If they're not going to expense your meals because you're away on official business and chose wrong then I'm not sure I'd be down with that. As for on premise and coordinated business events, sure, I'm down with that. Business trips where you're someplace new well away from home "if you want us to pay for a meal while we send you to this place then no meat" is.. a little too close to too personal. That seems mean and self-righteous. I don't think I wouldn't be interested in weWork even were I a vegetarian.

We can all try or not. Screw coercion, especially in excess.

I mean, I got 17 out of 21. Subhuman? I see nothing about having to do any of those well, either, so I may human, yet. It's that last one I may have some trouble with. I think I'd much rather sleep through it. I think.

I can't just let this go by because I'm fearful and hopeful so I'm designing my own scenarios and outcomes for this because I'd rather it end well. This should be a prelude to a bigger, longer story, no? One where the hero makes it past chapter 1. One where a mother doesn't actually read that note because it was never sent. One where our hero catches a single, tiny glimpse of what life is and can be and manages to hold on against furious odds and for many chapters.

A tiny glimpse, a blade of grass or a chattering wren. Anything. A perspective through the eyes of another and reflection through the eyes of a mother. You against you is a battle that only you can win but you simply cannot win if the field is empty. One will always be grabbing on to the slimmest of threads and weaving a garden even through horrors and dread. And there's help. There is definitely help.

It looks like you're in that place where serenity and reason is a mask for an inhospitable calm, a dreamscape that is not a dream where security and sense of self can be left behind simply by dropping what you're holding on to and no longer or or realize that you were holding onto anything at all.. Find the thread and pick it up. Please. You've just penned the beginning of a story that many are now reading. It's the little things and, in a larger sense, this is no longer just you and your mother. Consider the offers here. You've reached out now grab a hold.

How an individual's data is or is not handled is not pertinent to that individual? That seems an absurd position to take much less impose onto others via some sort of princely directive.

It would seem like you have skin in the game of free-wheeling and dealing with folks and their data. That or just some passion without premise. What's good for the nation is (re)adapting to privacy - likewise its peoples and doubly so for the state. I also don't see your directive influencing those people's actions either, so it appears some other people disagree, too.

1. That's certainly one way to observe reality.

2. Competition for your otherwise private or your public data sets?

3. Right, because China has bad habits therefore all your data should for sale.

I'm kind of leaning the other way, really. I'll take the privacy laws and let tech adapt or die. The only part that I actually need is the pipe anyway (sort of the antithesis to big content AND data brokers, I guess, but there you go).

I'm disturbed how "human rights" somehow equates to mandatory acceptance of geo-political agendas.

I'm even more disturbed that ""hypocritical and self-serving" and "makes a mockery of human rights"" is now a place called home.

[dead] 8 years ago

The argument over the semantics of the word cage is a pretty shitty distraction. I mean, can they leave? Are they not incarcerated? Incommunicato? Isn't that an extreme form of imprisonment? If not extreme it certainly seems pretty deranged. It is a trivial matter what the walls are or are not made from. Your attention is needed elsewhere.

And there's nothing wrong with trying to influence the behavior of the company you work for. If the company I worked for did something similarly disagreeable I'd feel like a pretty shitty person if I ignored it. .. but for a paycheck.

I'd say it's commendable so far but "Up in Arms" .. we'll see. If this is a valid angle of rejecting the behavior of your government then it's as good as any.

Not sure what your platforms are or what your workflows would be but if you have potentially dozens or hundreds of these and you have some level of deterministic target names and, like me, the memory of a dead elephant then customizing a wee wrapper or three can go a long way. I am pretty adverse to switching apps/UIs for doing single tasking items of this sort. Very annoying.

For instance for ssh I use a small combo wrap 'ot' (open tab(s)) that opens a terminal tab and parses my args to start terminal tab batches of ssh sessions. Your wrap could be as simple or complex as you need. I parse my args as necessary like:

ot lead1(app) lead2(envid) [lead3(tier)] [lead4(instance/role)]

as so: cmdprmpt% ot coolapp dev1 app app1 # will open a single term tab to the coolapp app tier instance 1

leaving off the instance/role will open a tab session to each instance (ot coolapp dev1 db) leaving off the tier will open a tab to each node on every tier for that app env (ot coolapp dev1) leaving off the envid doesn't work because that would just be a lot of tabs.

Barring that type of approach aliases are definitely your friend. The same could be done for opening browser sessions and/or curl/wgets whatever etc..

Barring that and for anything over, say, 100 targets (or excruciatingly non-deterministic target names) I'd probably have a single file with a bunch of key pairs and wrap against that (or some sort of wee db for 1000's).

Well, it is summer, so there's that. Your compute situation is unfortunate but your rental situation is surprising. Three days, court, eviction? I was always under the impression that there were some number of weeks involved with a legal eviction having some process before the sheriff can come knocking. Clearly I'm mistaken and/or there's a longer story there.

You have to keep the faith and cannot allow yourself to spiral out. Find grit. It is frustrating but you're going to have to temper that. You seem to be doing the right things so do keep on keeping on. If homelessness is truly a risk then you and your spouse will need to dig deep, reach out to friends and family if possible, identify any root that you have and cling to it. Maybe that's just each other but hold onto it regardless. You're already taking inventory so you're already planning and adapting. Camping seems like a good suggestion. Reach out to some agencies if you haven't already. The more people working your case the better your chances will be. RH got my foot in the door after a (not so) nice five month shutout that started early in Sep. 2001 when myriad opportunities locked down tight literally overnight. I was at the end of a nice, well earned six week vacation from tech after our startup shut down. Just lying around. I regretted that little timeout for the next few months, to say the least. The money was about done and stress was running pretty high for a small family. You'll pull out, man, keep your chin up, your eyes peeled and don't balk if an offer comes up short. Find a comfort zone and shore up. You'll need a way to keep your comms open, for sure. I think that's all I've got. Good luck and god speed.

"Facebook Gave..."

Well, that's like problem number 15. Number one is to look at what you're giving to facebook.

Number 2 is to look at how much control you have over the intimacy of your own life and those around you, using or not.

Number 3 might be to look at how many phones/devices you can root, rip and reset (I mean, c'mon, the personal data sink on a phone is enormous and most have little to no say about what can be on it and when much less port and comms control).

Number 4 is maybe that any middlin' IQ ass with a badge or a note with some letterhead can scoop your kit. (See Number 1.)

Number 5 - Who makes the rules? (Don't think too hard on it, please.)

Et cetera.

Facebook is easy. Fasebook is sleezy. Facebook is free. So? I think I'll trust my peers well before I trust any piece of must-have with a logo that gives you only tactile controls, at best. The masses do not choose wisely. (See Number 5.)

If you do the sharing then you need to do the caring. Button it up and bring it down. Believe it or not your likes are your own and if you don't like what they're doing now then shut it down. I know it's easier said than done for some but the keys to the kingdom are in corporate hands now. Good luck.

It looks like you believe stability is simply a matter of 100% good decision making and that lower middle class is just one bus fare and two transfer passes away. You're painting a picture with a brush as wide as your canvas and with only one color on your palette.

I think we are mostly products of our surroundings so, yes, good decisions can help a lot. It just seems placing that level of "blame" is counter-productive and just does not represent reality on the ground. Trapped is trapped, you used the word yourself. I'd wager you have little idea the sorts of life traps that are laid out there. Having debt is pretty easy even with a better than average stability matrix. A single hit with bad luck is simply made worse as the "socially permitted" trolls eat their prey where no "socially permitted" social safety net exists that could possibly save them.

What is that? Trickle-down blame? You got yours? I simply don't understand the economics of "it's your own damn fault" with the force of a gavel.