HNHacker News
TopNewBestAskShowJobs

mwpmaybe

907 karma · joined July 27, 2015

[ my public key: https://keybase.io/mwp; my proof: https://keybase.io/mwp/sigs/IgRJbBXIMpIG5ILaErmbmjkyttiEoe4ov_JqABTpuoQ ]
submissionscomments
mwpmaybe··on Twitter’s Chief Technology Officer to Leave Company
Thanks!
mwpmaybe··on Twitter’s Chief Technology Officer to Leave Company
Even if it does appear, you can simply remove it and Twitter will preserve the reply/threading regardless.
mwpmaybe··on Twitter’s Chief Technology Officer to Leave Company
It's a great tool, but I have one request: the slash line of the last tweet should ideally indicate how many total there were in the storm. For example, the friendly howto on your site should end with "6/6 Share and have fun. It's FREE!" This gives the individual tweet context when someone shares/quotes/screenshots it and it's being passed around: you know where the tweetstorm ends (instead of having to scroll down and look for a non-existent 7/ tweet).

Actually, since you're queuing up all the tweets to post them in one go, it should be feasible to add the out-of count to every tweet in the storm! That would be neat. But the last tweet should have it by convention.

mwpmaybe··on Ask HN: Is it ok to use traditional server-side rendering these days?
You likely have a simple HTML page that bootstraps the SPA; just put your meta tags there! UPDATE: Ah, set in JavaScript. Yes, tricky. Reading is good.
mwpmaybe··on Basic project template for golang, slightly opinionated
"S/he wrote his own command-line utility to create projects from templates? Why didn't s/he just use cookiecutter?"
mwpmaybe··on Amazon Lightsail vs. DigitalOcean
Sure, and pay for egress.

    Data Transfer OUT From Amazon RDS To Internet
    First 1 GB / month	$0.000 per GB
    Up to 10 TB / month	$0.090 per GB
    Next 40 TB / month	$0.085 per GB
mwpmaybe··on It's Python, Not Python 2, Not Python 3
Ansible.
mwpmaybe··on Lua: A Guide for Redis Users
Or you could use a Redis transaction for a transaction. :-)

http://redis.io/topics/transactions

mwpmaybe··on I’m a Muslim, a woman and an immigrant. I voted for Trump
> George W. Bush was well-known for sticking his foot in his mouth by making up words (e.g.: "strategery")

Generally true, but "strategery" was actually coined by SNL writers for Will Ferrell, although it is frequently misattributed to Bush. The Bush administration did start using it internally tongue-in-cheek.

mwpmaybe··on How Sidekiq makes $80,000 a month
This always makes me laugh when I randomly come across it: https://github.com/mperham/sidekiq/blob/659dea9601b3a283d9c8...
mwpmaybe··on Lesser known Git commands
Or even better than patch, git apply.
mwpmaybe··on DevOps from Scratch, Part 1: Vagrant and Ansible
Your strategy of calling everything a provisioning system and then decrying the surfeit and complexity of provisioning systems is deeply flawed. Kubernetes is not a provisioning system. Docker and runC are not used to provision systems. Vagrant is not "an entire provisioning and/or configuration management engine," and its functionality cannot be trivially implemented with a "simple variable expansion function." You say you are familiar with these technologies, but your familiarity is insufficient. Your comparison of Docker and Kubernetes to OS packages, Kickstart, and PXE is outright laughable. You clearly do not understand the various purposes of these tools.

You point to imgadm and vmadm as superior solutions, but these appear to be "proprietary" (to use your own word) to SmartOS. Why not add SmartOS to your list of unnecessarily technologies and apply the same critical thinking? Triton appears to occupy the same space as OpenStack (Triton DataCenter), Kubernetes (Triton ContainerPilot), CoreOS (Triton SmartOS), and possibly other components, and it appears to use the same kernel-level containerization facilities as Docker and runC. You're using a competitor's vertically-integrated solution, so no, you don't need another stack. If you weren't using Triton you would be researching these alternatives. Your argument is akin to saying you don't need a car because you have a Buick, people who drive cars are using an unnecessary, proprietary mode of transport, and they should all just drive Buicks instead.

That brings us back to configuration management tools. You keep calling them proprietary, but the cores of all these products are open source! And while I agree with you that the client/server model used by Puppet, Chef, and SaltStack is unnecessary—although it does have benefits at scale—it's worth noting that Chef Zero and Ansible just use ssh-sshd. These tools are making the same system calls as your shell scripts, they're just doing them from Ruby or Python instead. So just to recap:

> I don't have to use proprietary, discrete systems;

They're not proprietary, they're open source, and you only need one of the four.

> I can leverage technology already built into the operating system;

They do: Ruby or Python and system calls.

> I don't need a client-server architecture like Chef or Puppet, ever (ssh-sshd is just fine, thank you!)

Okay, so use Chef Zero or Ansible.

Finally, your other main argument, against abstraction, does not hold water. Everything we do is an abstraction. Shell scripts are an abstraction. Why aren't you writing your configuration management in C? (Wait, why are you writing it in C instead of assembler?) On one hand, you have a portable, open source tool with a domain-specific language. On the other hand, you have each company creating their own proprietary (this is the correct use of "proprietary," by the way) tooling, and an engineer has to learn it from scratch every time they change jobs. You may think any engineer can walk in off the street and instantly grok your homegrown shell- and AWK-based big ball of mud, but you are probably wrong. If your solution is as good as you think it is—if it's portable, extensible, and easy to maintain—you should release it and we can add it to the list of available CM tools. If it's not, why are you reinventing the wheel?

mwpmaybe··on DevOps from Scratch, Part 1: Vagrant and Ansible
I'm not sure what you mean by "flapping," but the technologies in your list do not all address the same problem space. You might as well ask why we need both Solaris and C++. Only the first four (Chef, Puppet, Ansible, and Salt) are configuration management tools, which take the place of "writing shell scripts and encapsulating them in OS packaging." If you're well-versed in one, there's no need (short of a job change) to learn the others.

Vagrant allows you to create reproducible development environments using shell scripts (by default), so it should be right up your ally. Docker is used to containerize applications. runC is the container runtime used by Docker. Kubernetes orchestrates containerized applications across a fleet of CoreOS (a minimal "Docker host" Linux) machines. OpenStack orchestrates your data center. They are discrete solutions because they do different things. Each piece of the puzzle does one thing and (hopefully) does it well. That philosophy should sound familiar to you!

Back to "writing shell scripts and encapsulating them in OS packaging": have you tried a configuration management tool? I used to be old school like you; specifically, maintaining a fleet of AIX instances using a healthy mix of Perl, ksh, and RPM. I too was resistant to the tide of new, quickly-evolving technologies. I started using Ansible about a year ago and it's changed my life. Don't be so quick to pooh pooh the idea that there just might be a better way to do things.

mwpmaybe··on DevOps from Scratch, Part 1: Vagrant and Ansible
It already has been replaced by systemd as of 15.04 (and 16.04 LTS).
mwpmaybe··on Bash 4.4 released
Having a, "Holy shit, why didn't I think of that?" moment over here. Thanks for the tip!
mwpmaybe··on Varnish Cache 5.0
If you're already using Nginx and its caching subsystem is working for your use case(s), then I wouldn't worry about it. A typical web stack is composed of load balancing, SSL termination, caching and compression, and static and dynamic content serving. Nginx is capable of all these things (including dynamic content serving using OpenResty).

Once you start breaking your stack apart to 1) add redundancy, 2) isolate hardware for different workloads, and 3) scale the components independently of each other, the situation gets a little more interesting. Sure, you could run different clusters of Nginx for each of SSL termination, static content, cache and compress, etc. and have them reverse proxy to each other (and some people probably do this), but when you get to this evolution of your architecture, it's worth evaluating the different options for each layer of the stack. There's an argument to be made that e.g. HAProxy is a better load balancer, Nginx is a better static content server, Pound is a better SSL terminator, Varnish is a better caching and compressing reverse proxy, etc. (N.B. that I am not saying these things, I am just saying that they can be said.) If you're not serving static content at all—let's say you're presenting an API written in Elixir/Phoenix—it may not make sense to go with Nginx in the first place!

Regarding Varnish, specifically, I've found that it offers unparalleled power and flexibility when it comes to caching and compression. Yes, that power and flexibility comes at the cost of more complexity, but it's there when you need it. It offers different storage backends, including a pure memory backend; the ability to serve gzipped content directly from cache (for supported clients); PURGE and BAN HTTP verbs; synthetic responses; query string sorting; the ability to serve stale content while updating; ESI; and probably a whole bunch of other stuff I'm forgetting and/or have never used. Nginx and Nginx Plus may support some or all of these things, built-in or as modules... I'm not sure.

mwpmaybe··on How I spent two weeks hunting a memory leak in Ruby (2015)
Yeah, it's one of those rare Ruby gotchas. If you assign some kind of a data structure to a constant, you'll get a warning if you try to reassign the constant, but the data structure itself will silently mutable. To disallow this behavior, simply freeze the data structure. If you have nested data structures, you must freeze deeply.

  ENUM = [0, 1, 2].freeze

  LOOKUP = {
    :A => [1, 2, 3].freeze,
    :B => [4, 5, 6].freeze
  }.freeze

  # or:

  LOOKUP = {
    :A => [1, 2, 3],
    :B => [4, 5, 6]
  }.tap { |s| s.values.each(&:freeze) }.freeze
mwpmaybe··on How I spent two weeks hunting a memory leak in Ruby (2015)
Freeze your constants!
mwpmaybe··on Regular Expression That Checks If A Number Is Prime
Very interesting. Thanks for writing this up.

This is a bit more Perlish (not that I'm an authority):

    sub is_prime {
      (1x$_[0]) !~ /^(?:.?|(.{2,}?)\1+)$/;
    }
But perhaps less clear to a novice reader. You can also leave off the semicolon.
mwpmaybe··on What typing ^D does on Unix (2009)
¯\_(ツ)_/¯
mwpmaybe··on What typing ^D does on Unix (2009)
For the vi-adherents out there, `set -o vi` will let you navigate your prompt and history with vi-like keybindings. I'm amazed by how many vi users don't know this.
mwpmaybe··on Legendary Apple Engineer Gets Rejected for Genius Bar Job
That thread is amazing. My favorite part is the inventors of Tarsnap and Dropbox basically saying to each other, "oh hey, I'm working on the same thing as you!"
mwpmaybe··on Scientists find 3.7B-year-old fossil, oldest yet
OK, maybe I should have gone with, "And men were real men, women were real women, and small, furry creatures from Alpha Centauri were real small, furry creatures from Alpha Centauri."
mwpmaybe··on Scientists find 3.7B-year-old fossil, oldest yet
And men were men, and women liked it!
mwpmaybe··on Apple Event on September 7th
It's dependent on what you are hypothetically upgrading from. I'll be upgrading from a 2012 MacBook Pro w/ Retina, so I'm looking for:

* Thunderbolt 3 (from 1)

* USB 3.1 (from 3.0)

* NVMe (from SATA)

* LPDDR4 (from DDR3)

* An integrated GPU with sufficient power so as to eliminate the need for a dedicated GPU for my typical usage (from a 650M)

* More battery life / power efficiency

The specs for the MBPs that came out in late-2012 through mid-2015 weren't significant enough to justify an upgrade. It's not that I'm "desperate," and I can't speak for the GP, but this machine is starting to show its age (battery life, fan noise, etc.) and I really don't want to drop $2-3K for a new unit with mid-2015 specs.

mwpmaybe··on Linode-hosted DNS zones were down
My monitors started going berserk around 3:36 PM CT. Here's an example of the problem (I am not hostmaster for The Onion, but they are a well-known Linode customer):

    $ whois theonion.com | grep -i 'name server'
       Name Server: NS1.LINODE.COM
       Name Server: NS2.LINODE.COM
       Name Server: NS3.LINODE.COM
       Name Server: NS4.LINODE.COM
       Name Server: NS5.LINODE.COM
    $ dig @ns1.linode.com theonion.com ns +short
    $ dig @ns1.linode.com theonion.com a +short
mwpmaybe··on Server Side TLS
Wow, this might actually be good enough / full-featured enough to let me stop copying around my huge HAproxy configuration boilerplate and Ansible roles for every project I spin up. Very cool!
mwpmaybe··on Server Side TLS
This recently changed. Google is no longer penalizing redirects, and is in fact rewarding http->https redirects. Hopefully other search engines will follow suit.

https://moz.com/blog/301-redirection-rules-for-seo

mwpmaybe··on Why don't companies use FreeBSD as much in production as Linux?
> if they only have Ubuntu / Docker on their resume its trash

I hope there's some wiggle room in there for folks who may know more but cater their resumes to what they want to do and/or the buzzwords recruiters are filtering by.

mwpmaybe··on Why don't companies use FreeBSD as much in production as Linux?
It's kind of a virtuous cycle (or vicious cycle, if you prefer BSD): more people use Linux; more guides are written to help others, more software is readily available, and more testing is done by virtue of having a larger user base; so more people use Linux. I don't think there's much to say about qualitative comparisons between Linux and BSD that hasn't already been said to death, but I do think the two are borrowing from each other in healthy ways and approaching parity, at least in an "on paper" sense.
← PreviousPage 8 of 12Next →