News for hackers. Stuff that matters.

102030485868

Re:The Efficiency of Vim on Wednesday February 26, 2025 @11:13PM (#43191290)
> 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.

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

Re:The Lil License on Wednesday September 20, 2017 @11:26AM (#15294806)
"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...

Re:Facebook recruiting and Unix systems on Wednesday September 06, 2017 @09:53PM (#15188602)
Give me a sphere and I'll do it!

Two parallel lines though....

Re:How do you cut a monolith in half? on Friday June 30, 2017 @01:01PM (#14672020)
I interpreted that as, "Concurrency is a bitch...".
Re:GnuPG Fundraising Rally on Tuesday June 06, 2017 @07:59AM (#14496545)
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.

Re:Announcing Rust 1.14 on Thursday December 22, 2016 @03:42PM (#13240213)
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.

Re:I'm giving up on PGP on Tuesday December 06, 2016 @11:39AM (#13115937)
Re:Go’s march to low-latency GC on Wednesday July 06, 2016 @11:28PM (#12047326)
That's changing now, thankfully. Most people at the company I work for use Clojure every day.
Re:Go’s march to low-latency GC on Wednesday July 06, 2016 @11:24PM (#12047317)
Unless you specifically tell the JVM otherwise using the -Xmx flag.

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

Re:Vivaldi 1.2 release on Friday June 03, 2016 @10:14AM (#11830404)
Given that you use/run a sync node.
Re:GoBGP: BGP Implemented in Go on Monday April 18, 2016 @02:43PM (#11522188)
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.
I can't see this ending well for Oracle.
Re:Don’t Use Markdown for Documentation on Tuesday March 15, 2016 @03:48PM (#11292447)
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...

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: ¯\_(ツ)_/¯

Re:Glibc getaddrinfo stack-based buffer overflow on Wednesday February 17, 2016 @12:46PM (#11119643)
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.

Re:Glibc getaddrinfo stack-based buffer overflow on Tuesday February 16, 2016 @11:12AM (#11110802)
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

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.

Re:OpenSSL Security Advisory on Thursday December 03, 2015 @04:50PM (#10672938)
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

Re:Swift is Open Source on Thursday December 03, 2015 @04:42PM (#10672880)
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.

Such as?
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.

Re:Effective Cryptography in the JVM on Tuesday October 06, 2015 @05:51PM (#10342667)
Why is it hazardous to use in practice?
Re:Fluentd: a high performance unified logging layer on Friday August 21, 2015 @10:12AM (#10097569)
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.

Re:Show HN: QOTR – Go off-the record, quickly on Thursday August 13, 2015 @01:36PM (#10055875)
`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...