HNHacker News
TopNewBestAskShowJobs

zwp

601 karma · joined March 24, 2011

submissionscomments
zwp··on The hammer-feather drop in the world’s biggest vacuum chamber [video]
Fortunately you beat me to it. I was going to post the later sequence at: https://www.youtube.com/watch?v=E43-CfukEgs&feature=youtu.be...

But on closer viewing that is a disastrous montage: the first few seconds (before cut away) show the feathers fluttering and the bowling ball starting to accelerate away; the slow-motion segue is under vacuum conditions though. The film editor's intention is that the two shots appear contiguous. We can speculate why they might have done this (no close up shot taken under vacuum conditions?) but it really tramples the whole point of the article :(

zwp··on The Magic CmdLine and how I got it back
while, true, do, done are all [bash] shell builtins. They are not running processes that can be suspended.

sleep(1) is the only process that can be suspended in this command. When you "fg", the suspended sleep(1) is signaled, and resumes. And then it exits.

When you do this in a subshell (in parens), you suspend/resume the subshell in its entirety, which capture the loop construct.

Why does it work in zsh?!

zwp··on The Roots of Lisp (2002) [pdf]
> representing HTML

You may like Clojure's Hiccup:

https://github.com/weavejester/hiccup

http://www.rkn.io/2014/03/13/clojure-cookbook-hiccup/

These representations underline how anomalous <IMG...>, <BR>, etc are in "standard" HTML.

zwp··on Project Gitenberg
Perhaps "git diff --word-diff" helps? I don't see a similar option for "git show" though and that seems important :(

I think you're right: if the diff-viewing infrastructure was abstracted (plugin?) it could do this and more (eg word-diff-by-paragraph, image-diff).

zwp··on OpenSSH 6.5 Released
Just for interest [I'm not saying it's broken either] but this is interesting DLP progress announced within the last 12 hours:

https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;23651c...

zwp··on From carpool to deadpool: Ridejoy’s startup journey
blablacar discuss their model here (I think (via whois) these guys are also the covoiturage and comuto brands):

http://allthingsd.com/20131202/europes-blablacar-has-created...

"The company last raised funding in 2011 — $10 million led by Accel Partners"

zwp··on Further improving digital certificate security
ANSSI is not just a "French certificate authority". It's a government defence agency.

http://www.ssi.gouv.fr/fr/anssi/presentation/ "The agency is attached to the secretary general of defence and national security".

What is the CA hierarchy "linking back to ANSSI" that chrome is/was trusting? Is the root of that hierarchy still trusted by chrome?

Edit: following link from seszett's post below, hierarchy is at: http://www.ssi.gouv.fr/fr/anssi/services-securises/igc-a/ and the IGC/A certificate is under PM/SGDN in Chrome's authority store.

zwp··on Bash Pitfalls
Shellcheck recently found a bug in one of my old scripts. You can use the web interface or compile it for local use:

http://www.shellcheck.net/

https://github.com/koalaman/shellcheck

zwp··on Devops Horror Stories
So tmpwatch traverses filesystems. Is that a bug? (thinks: "-xdev").

Edit: Reading tmpwatch.c: "Try hard not to go onto a different device". Perhaps old bug?

zwp··on Researchers find critical vulnerabilities in Yahoo site, offered $12.50 per bug
On the flip side, HT Bridge have got way more than 12.50 USD publicity out of this.
zwp··on Thwarted Linux backdoor hints at smarter hacks (2003)
FYI, sometimes called "Yoda condition". I _think_ I was taught to do this when I learnt C (~20 years ago). Wikipedia indicates that the name at least has been around since 2005.
zwp··on Wildfire threatening the power grid that supplies San Francisco
If you mean "cyber-blow-up" there's https://www.sans.org/netwars/cybercity

I've no idea if it lives up to its own hype.

zwp··on How the NSA taps fiber at the bottom of the oceans
"Time how long the round-trip takes and you can pinpoint where the break is"

Make breaks A and B near the endpoints. Make a third break X, between A and B, and install splitter at X.

zwp··on Anatomy of a Compiler Bug
> newer snprintf

Also see C11's sprintf_s() and similarly-named friends.

zwp··on Linux local privilege escalation 0day, 2.6.37 - 3.8.10
Minimal explanation (allegedly by author "sd") at: http://packetstormsecurity.com/files/121616/semtex.c
zwp··on How zsh is more useful than bash
Isn't the issue the pipe, not while?

  export a=0
  while read line ; do
    a=$(expr $a + 1)
  done < $file
  echo $a
(Some old shells fork on < but bash isn't one of them).
zwp··on Tesla Model S Sales Exceed Target
"Comprehensive Experimental Analyses of Automotive Attack Surfaces", Checkoway et al.

http://www.autosec.org/publications.html

From the FAQ:

"We explore a number of other communications channels in our August 2011 paper "Comprehensive Experimental Analyses of Automotive Attack Surfaces", including long- and short-range wireless communications, the networked diagnostic tools used by automobile mechanics and the car's CD player."

zwp··on Python trademark at risk in Europe
Yes, lots. A quick sample below just based on searching amazon.{fr,it,es,de}. Good luck.

French:

Apprendre à programmer avec Python 3 (Learn to program with python 3) http://www.amazon.fr/Apprendre-%C3%A0-programmer-avec-Python...

Python - Les Fondamentaux du langage (Python: foundations of the language) http://www.amazon.fr/Python-fondamentaux-langage-Nouvelle-%C...

German:

Python 3: Das umfassende Handbuch (Python 3: The Comprehensive Handbook) http://www.amazon.de/Python-umfassende-Handbuch-Galileo-Comp...

Python von Kopf bis Fuß (Python from Head to Toe) http://www.amazon.de/Python-von-Kopf-bis-Fu%C3%9F/dp/3897213...

Einstieg in Python (Starting python) http://www.amazon.de/Einstieg-Python-Programmieranf%C3%A4nge...

Spanish:

Python para administración de sistemas Unix y Linux (Python for Unix and Linux System Administration) http://www.amazon.es/Python-administraci%C3%B3n-sistemas-Ore...

Python 3 - al descubierto (Python 3 Discovered) http://www.amazon.es/Python-descubierto-Arturo-Fernandez-Mon...

Python. Guía de referencia (Python Reference Guide) http://www.amazon.es/Python-referencia-Oreilly-anaya-Multime...

Italian:

Programmazione in Python (Programming in Python) http://www.amazon.it/s/ref=nb_sb_noss_1/276-0254377-1517700?...

Imparare Python (Learn Python) http://www.amazon.it/Imparare-Python-Mark-Lutz/dp/8848125956...

zwp··on Writing Rules: Advice From The Times on Writing Well
> the voice in your head

I recommend "The Writer's Voice" (Alvarez) for more on this.

zwp··on (Pidgin's) SSL support appears to have been written by a lobotomy victim
I think it's fair to say that it's still not really clear.

Twitter(!) has the news as it broke/continues to break:

https://twitter.com/0xabad1dea/status/243095210819715072

zwp··on Programming as a Foreign Language
I'm certain real-world languages are much harder too. I'm surprised that the author, a perler, didn't make the connection to Wall's "Natural Language Principles in Perl":

http://www.wall.org/~larry/natural.html

This document is quite old and I disagree with some of those things now (in particular Perl's "more than one way to do [say] it" lead to a lack of enforced standard idioms; compare python). But other points eg "acceptable levels of competence" are valuable for the humble programmer to keep in mind.

Similarly, I like the idea of a programming "accent": the effects of previous programming languages on your current language. For example a (ahem) rubyist that starts to write in python might reach for map() when they perhaps ought to use list comprehensions. A speaker with a heavy accent can still however make themselves usefully understood.

zwp··on Pretty RFC
Cute, I like the way ASCII art is preserved.

Small bug: RFCs < 1000 that are not prettifiable have a extraneous zero in the datatracker.ietf.org link.

Eg: http://pretty-rfc.herokuapp.com/RFC123

redirects to: http://pretty-rfc.herokuapp.com/RFC0123 (left padding is probably a mistake here; some day we will have >9999 RFCs)

links to: http://datatracker.ietf.org/doc/rfc0123/ (404)

should link to: http://datatracker.ietf.org/doc/rfc123/

ps. XML format for RFCs that this leans on: http://pretty-rfc.herokuapp.com/RFC2629

zwp··on Jeff Atwood's security blunder regarding email
> GMail does not require STARTTLS.

    $ telnet smtp.gmail.com 587
    Trying 173.194.67.108...
    Connected to gmail-smtp-msa.l.google.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP ea6sm27303065wib.5
    HELO zwp
    250 mx.google.com at your service
    AUTH PLAIN [elided]
    530 5.7.0 Must issue a STARTTLS command first. ea6sm27303065wib.5



    $ telnet smtp.gmail.com 587 
    Trying 173.194.67.109...
    Connected to gmail-smtp-msa.l.google.com.
    Escape character is '^]'.
    220 mx.google.com ESMTP ff2sm43397967wib.9
    HELO zwp
    250 mx.google.com at your service
    MAIL FROM:<test@example.com>
    530 5.7.0 Must issue a STARTTLS command first. ff2sm43397967wib.9
zwp··on Google's Python style guide
> like

One significant difference: when running python from a shell there's a fork() and an exec(). env(1) doesn't fork: there are not two processes. (In other words: the shell does not exit when you run a command, env vanishes).

There is obviously still some overhead to using env (and I just learnt from the source that env has argument processing). I tried to replicate AncientPC's test but on my machine both invocations take around 0.015s. (Perhaps their username is an indication as to why they see a (2%!) difference...).

But okay. What I really came here to say is: security. You can make all the efforts in the world to ensure that all programs get called with full pathnames but then one env shebang and you're suddenly open to running whatever's first in the user's $PATH and happens to call itself "python".

EDIT: eg http://portaudit.freebsd.org/d42e5b66-6ea0-11df-9c8d-00e0815...

zwp··on In praise of... text files and protocols
> JSON is a bit less-wrong than XML here, because you know what's a number, what's a string, what's a list

http://www.w3.org/TR/xmlschema-2/#typesystem

zwp··on Legit. Git for humans
> examples

    git tag
Lists tags; does not create new tag

    git stash
Stashes current changes; creates new stash

List tags/stashes:

    git stash list
    git tag [-l]
zwp··on Shelling Out Sucks
The article does not address another significant point: filenames should also be classified as untrusted input. Using -- to separate flags from arguments can help:

    /tmp$ mkdir x
    /tmp$ cd x
    /tmp/x$ echo hello > a 
    /tmp/x$ grep hello *
    hello
    /tmp/x$ touch -- -q 
    /tmp/x$ grep hello *
    /tmp/x$ grep hello -- *
    a:hello
    /tmp/x$
It's rare to see protection against this problem either when shelling out or in native shell scripts.
zwp··on Super Cheap Virtual Private Servers - the Wild West of Hosting
I've used their cheapest monthly VPS for about 18 months. Provisioning was excellent, uptime also. On the one occasion I needed support they were responsive and my problem was solved promptly. Web-based console access a nice feature.

They experienced a break-in a few months back. Communication to customers was clear, timely and reassuring. (All companies experience problems at some point, it's how they react to those problems that is important. Hetzner's response was very good).

Some small amount of their site/documentation is in German. That's not a big deal (google translate or whatever) and generally it is only the more obscure corners.

Disk size might be limiting on the cheaper offerings (20GB / 7.90 EUR).

I have not experienced the "heavy firewalling" mentioned elsewhere in this thread but I haven't tried putting any serious traffic through it.

Overall very positive.

zwp··on Elevator Algorithms
Security mindset edw?

(a), (c) I press all buttons as I exit elevator.

(b) gummi bear attack or similar.

(d) Arrive carrying large cumbersome object "Heh, can you call the elevator for me?" (then run away)

(f) is easily reversible: should send people as far away as possible from their intended destination instead.

(g) throw dumbells into passing elevators.

zwp··on Fail Upwards
> themes [...] wall to climb over

Urban dictionary (http://www.urbandictionary.com/define.php?term=fail upwards) dates this term 2009.

I originally saw "fail upwards" in alpinist Mark Twight's writings[1] ten years before that: his sense is to keep going up and over the summit even when things have gone terribly wrong: you may no longer have the option to descend the way you came up.

[1] "Extreme alpinism" (passage can be found on google books)

← PreviousPage 5 of 7Next →