Better HN
topnewbestaskshowjobs
Log inSign up

Ao7bei3s

1,549 karma · joined Dec 5, 2012 (13y ago) · 595 submissions

Submissions

comment 8y ago · link · parent

sed -i also has the less obvious advantage that it is atomic.

(It writes to a temporary file, and then atomically renames it to the final location. Whereas if sed expr src > dst is killed, dst may be corrupt. You'd need to handle temporary file management yourself if your script needs to be reliable.)

comment 8y ago · link · parent

Quite the opposite, actually - the announcement was by accident, and the police at the border weren't informed. They caved to the sheer mass of people, unintentionally organized by the party.

It is not clear that if a similar number of people had been organized in another way, the wall would not have fallen.

comment 9y ago · link · parent

  import random
  while True:
      print(random.choice("╱╲"), end="")
How's that for readability?

comment 9y ago · link · parent

The two-sentence "Result of the Check" section ends with "and the strength increased the closer to the Russian helicopter wing".

As professionals, they state the observations and facts and don't cross into the realm of speculation.

comment 9y ago · link · parent

So? Try getting any raw data and/or code from academics.

In my experience, often all you ever get are the papers.

Now the tables are flipped and academics are the ones not getting access.

A culture of real open access would be nice.

comment 9y ago · link · parent

1. Based on the paper, it seems ORCHID by itself (without bandwidth burning. not sure if this is trivial to get right. is there tooling?) is as vulnerable to traffic correlation attacks as one might expect. Are there any other known weaknesses? I would expect a "limitations" section in red letters on the front page, instead of the nebulous and likely wrong "the NSA can't hack it either" claim.

2. Given that todays secure overlay networks generally offer extremely bad performance in the Mbit region compared to using the underlay where 10G uplinks are becoming widespread for servers, and the extra hops increase latency, do you think secure overlays will ever be near enough to underlay speed to become widely used? Do you have experience how well ORCHID scales up? And out?

[edit: Don't mean to sound too harsh. I am very glad you're doing work in this area.]

comment 9y ago · link · parent

Not really. An H1B employee easily transfer their visa to another company and start working even before receiving approval.

But there's L1B employment... that actually binds you to a company.

comment 9y ago · link · parent

> One of the agents even said (paraphrased, of course) "Maybe you downloaded some movies?

What's the correct answer?

comment 9y ago · link · parent

I agree, Clean Code was the most important book for me too. But I wouldn't follow it blindly. Also, it's less useful for non-Java and much less useful for non-OOP languages (it's ok to have a focus, but one has to keep in mind that sometimes, certain idioms, best practices or design patterns are actually workarounds around the limitations of Java).

My favorite example: Overdoing the short functions thing. I've seen this a lot. Unsurprisingly, considering that for most devs, when you ask them what makes good code, "short functions" seems to be the first thing that comes to mind.

Splitting code into extremely short functions has a few disadvantages too: a) in what order they're called is not immediately clear, b) where they can be called from is not immediately clear, c) going up/down the stack can make it harder to follow when debugging interactively. d) It increases the LOC and noise. And e) especially in OOP languages, short methods make it more tempting to turn variables into attributes to avoid passing them around explicitly (bad due to longer lifetime).

Splitting functions should only be done if it makes sense semantically. Each function should make sense on its own. If some logic is highly cohesive (e.g. because it implements a specific algorithm), not independently reusable, and it's subblocks only make sense in one order, and it all fits on a few screenfuls, it might make sense to keep it in one longer function instead of dividing it into fairly arbitrary chunks.

comment 9y ago · link · parent

Literally survivorship bias.

comment 9y ago · link · parent

If you want to save mental bandwidth, I really recommend you reconsider not using Spotify.

Spotify actually frees me from the "what music do I hear in the background" question, manually rearranging playlists, acquiring music and, worst of all, manually keeping my collection tagged. Before I had Spotify, I wasted evenings tagging everything with Picard...

With Spotify, you just give it a starting point, start "song radio" and it'll keep playing and choosing next tracks. You can easily and very comfortably get through the day with only a play/pause hotkey and a next track hotkey. As a bonus, it just carries over between work, phone and home.

comment 9y ago · link · parent

It's mostly about all necessary libraries being available for the same architecture as the binary.

This means either having separate 32bit libraries (typical for closed source applications shipping together with their libraries) or having multiarch libraries (as modern linux distros do).

comment 9y ago · link · parent

The modern at alternative is:

systemd-run --user --on-calendar=23:20 notify-send Example

Or relative with --on-active=60. And you automatically get the normal systemd tooling, e.g. systemctl list-timers.

comment 9y ago · link · parent

No, personal attacks are never acceptable. Doubly so if you're an outsider who has done nothing for the project except attack the main developer.

The legitimate way would be to take part in the development and convince based on technical reasons. If people disagree with you, consider that you might be wrong. If you think you're right anyway, fork it, and see if /other/ people agree with you. Chances are they won't.

The people actually maintaining all the distros didn't all switch to systemd within a few years for no reason.

comment 9y ago · link · parent

As one would expect. The deferred code runs after the normal code in the function has ended, and before the calling code has resumed. Named return values are in scope and can be read and modified.

Try it and see: https://play.golang.org/p/1ozFWDj15a

comment 9y ago · link · parent

Full disclosure ensures that vulnerabilities are known, taken seriously and eventually patched.

It also levels the playing field.

comment 9y ago · link · parent

So? There does not need to be a way to get rich quick. I don't see a problem with forcing chat providers to include proper end to end encryption as a matter of consumer protection. Because we all know that otherwise, security will not be part of the minimum viable product, and the consumer can't tell the difference.

(Obviously, the state of the art answer to your technical questions is the double ratchet algorithm.)

comment 9y ago · link · parent

Is there a way to configure it so it makes zero requests to your servers?

If not (yet), would it at least be technically feasible, and would supporting this be an option for you?

comment 9y ago · link · parent

Who said anything about magic - a) they don't use x86, b) they use boards with few unnecessary peripherals, and c) their vendors are perfectly fine with proprietary drivers (-> can't easily reuse their HW).

Good luck doing a build with an overall 10W consumption target with x86 and what is essentially desktop HW, especially if it should be affordable (relative to a ~250€ commercial solution) and maintainable (no, no custom kernels with weird patchsets that rot away in 6 months, and having to recompile the world).

We have used PCEngine boards. They're fine as network appliances. But even the latest ones only have 1 SATA port (fine, 2 if you count the mSATA port).

comment 9y ago · link · parent

Nice. I've been looking for a low-power "bring-your-own Linux" board for a while. Classic DIY NAS builds consume outrageous amounts of power (35W to >100W) compared to commercial NAS (~10W), and existing single board computers lack GigE and/or >=2 SATA ports.

I just wish they'd have gone for a standard uATX form factor for compatibility with a professional case (and 3.5" disks). It's ironical that the "open hardware" project has to come up with a proprietary form factor :/

I also wish they had ECC RAM and enough of it for ZFS, but I know that is technically impossible with the price and power constraints.

comment 9y ago · link · parent

Also relevant, RedHat currently offers 10 years by default + a few years "extended support" for more money. Wikipedia has a nice visualization:

https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Versi...

Windows Vista was released in 2007, so I'd say it's fine.

comment 9y ago · link · parent

Great!

But I wonder if/when Ansible Tower is going to get open sourced.

I remember some posts from RedHat people saying it'd be open sourced "very soon" ~1.5 years ago, but other than a landing page nothing has come of it...

comment 9y ago · link · parent

> Those who don't understand Unix are doomed to reinvent it, poorly.

Let's avoid hollow arguments to authority that preclude any interesting criticism or discussion. Unix has its fair share of flaws.

> it's important when changes in presentation take effect. [...] They are just not independent streams, period.

Not independent, but separate. Your argument would also apply to stdout and stderr - these are separate even though not independent.

ioctls could very well apply to a specific position in the data stream instead of being immediate. And if you don't like ioctls, there could well be a third output fd instead. In that case, the synchronization problem could be solved with a "barrier" feature.

Can we at least agree that the actual terminal protocol situation as it is now quite frankly sucks? The poor documentation and completely inconsistent implementations have caused me quite some stress.

comment 9y ago · link · parent

Terminal control could (and should) have been out of band, e.g. via ioctls on the fds of the tty between shell and subprocess, instead of in-band via "special characters", which usually (always?) hint at bad design (compare e.g. with SQL injection).

As an example on how to do it right, consider how commands like "git diff" determine whether to paginate/colorize their output: they call the isatty(fd) stdlib function on stdout, which uses ioctl TIOCGETA to get terminal properties. Iff that fails, there's no TTY on the other end of the fd and "git diff" just writes the raw output.

If only there even was a clean, consistently implemented, well-documented protocol... but there is not - few tools properly escape their output, and you can't get much right without a terminfo database, even with you can't get consistent results, and the protocol is a mess.

comment 9y ago · link · parent

Reproducible builds will fix that, soon.

comment 9y ago · link · parent

Modern ciphers are designed to resist chosen plaintext attacks.
1
111213
20