HNHacker News
TopNewBestAskShowJobs

102030485868

50 karma · joined August 13, 2015

submissionscomments
102030485868··on The Efficiency of Vim
> My experience with modality is that almost every time I want to do something I'm in the wrong mode.

Vim tells you the mode though!

Insert -> Normal/Visual: ESC, Ctrl+c, or Ctrl+[. You could also do something like, while in Insert mode press Ctrl+o to do "one movement" (e.g. "i234[Ctrl+o]^1[Ctrl+c]", or maybe, "ihelo world[Ctrl+o]2Fll[Ctrl+o]$![Ctrl+c]" -- don't type the "[" and "]").

Normal -> Insert: well... it depends on where you want to insert.

> But in practice I can't count so I cut the wrong number of lines

Sometimes you don't need to keep track of the number of lines. But, if you really wanted to, you could do something like:

    :set relativenumber
If you're deleting 5 lines in, say, a CSV, this helps.

If it's code or text you could also use sentence ("(" and ")") or paragraph ("{" and "}") movements like "5d)" (delete the next 5 sentences); "d{" (delete up to the previous paragraph). There's a bit of jank when it comes to code though, but there's some support for it (or maybe I'm just doing it wrong).

> then I have to look up how to undo because obviously Ctrl+Z doesn't work

"u" for Undo, Ctrl+r for "redo". ":help undo" goes into _way_ more detail, and it does get complicated. I don't think I've needed anything past section 2.

> I just can't see where this "efficiency" is supposed to be at all.

The "efficiency" comes with investment, which you can get with any editor.

> If you tell me I'm supposed to spend 4 weeks reading VimTutor to gain efficiency in Vim

I didn't go through vimtutor for a very long time. You can become a reasonably okay Vim user, but it does take some investment. On the order of weeks is probably correct.

But honestly, VSCode is fine too. Notepad is... probably fine.

102030485868··on A coding error caused Rogers outage that left millions without service
our federal industry minister and rogers execs answer some questions: https://www.cpac.ca/episode?id=84243ade-0b57-45f6-8144-c4d62...

i feel like there's a lot of passing the buck in the video

102030485868··on The Lil License
"distribute and sell": but what if I just want to distribute?

Oxford commas are important.

See: https://www.nytimes.com/2017/03/16/us/oxford-comma-lawsuit.h...

102030485868··on Facebook recruiting and Unix systems
Give me a sphere and I'll do it!

Two parallel lines though....

102030485868··on How do you cut a monolith in half?
I interpreted that as, "Concurrency is a bitch...".
102030485868··on GnuPG Fundraising Rally
Both GnuPG and Signal are great projects, but GnuPG has a different use case from Signal.

You should, ideally, try to fund improvements to both projects.

102030485868··on Announcing Rust 1.14
It hurts to type sometimes. Typing at work isn't really an issue since I have an ergonomic keyboard, but big side projects can sometimes hurt.

? is far easier and faster to type than .unwrap().

So no, there's nothing horrible that I see, there is something horrible that I feel though.

102030485868··on I'm giving up on PGP
Hah: http://i.imgur.com/YphQVru.png
102030485868··on Go’s march to low-latency GC
That's changing now, thankfully. Most people at the company I work for use Clojure every day.
102030485868··on Go’s march to low-latency GC
Unless you specifically tell the JVM otherwise using the -Xmx flag.

See: https://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrd...

102030485868··on Vivaldi 1.2 release
Given that you use/run a sync node.
102030485868··on GoBGP: BGP Implemented in Go
I can understand why there hasn't been much movement in the SMTP world. SMTP is pretty hard to get right, as is maybe hinted at by the many RFCs. You really don't want to be making any mistakes because it's a somewhat unforgiving protocol... unless you send an error code.
102030485868··on Oracle wants $9.3B for Google’s use of Java in Android
I can't see this ending well for Oracle.
102030485868··on Don’t Use Markdown for Documentation
Ah. This reminds me of a great discussion that happened over at the Rust Internals forum about which markup language to use for documentation. [0]

tl;dr: Markdown won.

[0]: https://internals.rust-lang.org/t/rustdoc-restructuredtext-v...

102030485868··on SSHKeyDistribut0r: A tool to make SSH key distribution easier for sysop teams
As opposed to every new member having to figure out this new project?

Documentation is your best bet. It would be better to teach students about things that are currently being used instead of making up your own solutions.

Though, there is a lot to gain from rolling your own solutions, so: ¯\_(ツ)_/¯

102030485868··on Glibc getaddrinfo stack-based buffer overflow
Woah, I didn't know that is a thing. Thank you!

It seems as if symbol versioning in Rust is nicer than in C. I'll have to play around with that a little bit.

I'm hoping I never to have to deal with writing version scripts or inline assembly again -- or at least having to write less.

102030485868··on Glibc getaddrinfo stack-based buffer overflow
I'm not sure how likely that'll be. It's definitely possible, but I think there are going to be a few hurdles. The main one being, symbol versioning.

This is important if you export multiple symbols for a function, that is, have a program that depends on a specific implementation of a function. That could mean you depend on different versions of the same library ("functionname@@VERSION_1, functionname@@VERSION_2"), or completely different implementations of a function ("functionname@@IMPL_X_VER_1", "functionname@@IMPL_Y_VER_2").

Wait a second. That seems like a strange feature to want, right? Well. It's particularly useful for runtime library fun stuff. LD_PRELOAD in a library that magically changes the implementation of function. A cool example of this is of preeny[1], a collection of libraries to help with debugging.

Additionally, it's useful for replacing libraries that would depend on C implementations without having to recompile them, though some preloading magic at runtime may be required.

This is only the thing, for me at least, that's blocking for making Rust system libraries. Now, any sane person may say, "Cargo will take care of versions and stuff", and that's true. Sadly, that's not the case if you ever want to use those nice and safe Rust libraries from C though.

Though, I may be completely wrong about the state of symbol versioning in Rust. I simply ran 'nm -g libopenssl.so' on sfackler's rust-openssl project and failed to see any @@<version> in the output -- that is specifically being exported, and not re-exported, by libopenssl. There may be better libraries to use, but eh.

I could be completely wrong on this though. I've been mainly going off of what I read here[2], and here[3] (alternatively, for a more in-depth version, try here[4]).

TL;DR: symbol versioning may not be a thing.

Disclaimer: I've had to use symbol versioning pretty heavily, so it's important to me. I could also be completely wrong about Rust not having it.

[1]: https://github.com/zardus/preeny [2]: https://gcc.gnu.org/wiki/SymbolVersioning [3]: https://www.akkadia.org/drepper/symbol-versioning [4]: https://www.akkadia.org/drepper/dsohowto.pdf

102030485868··on Build your own Twitch using MPEG-DASH and HLS live streaming
I did something similar to this a few months ago using nginx, rtmp, and vlc in hopes of making an HTML5 only streaming service.

In the end, I found out that using a VM for transcoding is not a great idea. Having a > 3 minute lag time between input and output was... difficult to work with.

I'm not willing to pay for Amazon's transcoding service because of uh, student wages, so I scrapped that project.

Fun weekend project at the very least.

102030485868··on OpenSSL Security Advisory
The one the OpenSSL follows is documented here[0]. There's also the CVSS[1] which covers a broader scope.

[0]: https://www.openssl.org/policies/secpolicy.html

[1]: https://en.wikipedia.org/wiki/CVSS

102030485868··on Swift is Open Source
Hahaha, I'm amazed that the Rust developers were able to do that.

Saying it was "quite a pain" is the understatement of the year.

102030485868··on State of emergency declared across France after Paris shootings and explosions
Such as?
102030485868··on Why Johnny Still Can't Encrypt: Evaluating the Usability of a Modern PGP Client
Some part of a key exchange needs to be out-of-band.

Alice communicating to Bob what the hash of her public key is over the phone, in person, or otherwise is good enough. Doing that allows Bob to verify whether or not a specific public key belongs to Alice.

The problem with hosting a key on a website is that it only really works if the domain has an extended validation certificate, i.e. someone proved their identity to their domain registrar. Then things just become a question of how much you trust the CA.

102030485868··on Effective Cryptography in the JVM
Why is it hazardous to use in practice?
102030485868··on Fluentd: a high performance unified logging layer
Well, in terms of maintenance it's a little bit more work.

Sure, it has the features and reliability. But does that really justify having to maintain a completely new environment? Maybe it does, maybe it doesn't; it depends.

No you may not be embedding it in your app, but it's now a part of your stack. You'll need to keep an eye on updates, etc for a completely different environment.

Plus there are other factors, like approved languages. Certain companies only allow using languages X and Y. Don't even think about language Z. I had to re-write an 80loc Python script to a much larger Perl one because I just didn't grok Perl all too well at the time. It didn't matter that Python was installed on the system. All that mattered was that Perl was approved and Python was not.

102030485868··on Show HN: QOTR – Go off-the record, quickly
`AES-CBC` is used if no mode is specified (none currently specified: see [1]). Relevant forge documentation. [2]

Currently the README file states that `AES-CES` is being used.

[1] https://github.com/crodjer/qotr/blob/master/app/models/chann... [2] https://github.com/digitalbazaar/forge/blob/e14eb1e17fbabcc8...