474 karma · joined Jul 29, 2017 (9y ago) · 170 submissions
1.
Merkle log defragmentation: exploiting our key space to compress an index(turnkey.com ↗)
1 points · by Avi-D-coder · 2w ago · discuss
5.
Show HN: Whisper.nvim – local speech to text in Neovim(github.com ↗)
1 points · by Avi-D-coder · 11mo ago · 2 comments
comment 1y ago · link · parent
Too many promises have been made.
Rust needs more unsafe opt outs. Ironically simd has this so it does not bother me.
comment 1y ago · link · parent
They have barely even monetized users. I think it's possible the bubble pops and openai still continues to win.
So much of this article is copium pretending the world is not radically changing. Even if progress stops today massive numbers of jobs will be and are being replaced. I wish it wasn't true but what I wish has no bearing on reality.
comment 1y ago · link · parent
Perhaps allowing them to drive around school buses is not a good idea, although personally I have felt far safer biking or walking in front of a Waymo than a human. But rules few humans follow, like rolling stops, and allowing them to go 5 over seems like a no-brainer. We have a real opportunity here to br more sensible with road rules; let’s not mess it up by limiting robots to our human laws.
comment 1y ago · link · parent
The author is right there's no way an individual can audit all that code. Currently all that code can run arbitrary build code at compile time on the devs machine, it can also run arbitrary unsafe code at runtime, make system calls, etc..
Software is not getting simpler, the abundance of high quality libraries is great for Rust, but there are bound to be supply chain attacks.
AI and cooperative auditing can help, but ultimately the compiler must provide more guarantees. A future addition of Rust should come with an inescapable effect system. Work on effects in Rust has already started, I am not sure if security is a goal, but it needs to be.
comment 1y ago · link · parent
A zkVM makes encoding the arbitrary logic as easy as writing a normal Rust program. A proof is a probabilistic statement that a specific program run with some public inputs and maybe some private inputs was executed correctly.
For crypto zk proofs are mostly for their succinctness property, not for privacy.
Outside of crypto privacy is the more important property, let's say a government issues a signed document, I could prove any arbitrary statement about that document without revealing the document. We could use zk proofs for anything we use canonical documents for today and we would gain privacy. Will we do this, probably not, but it would be an improvement.
comment 2y ago · link · parent
Don't start by saying how can I unit test this tiny bit of logic against several mocks, start with a simple integration test of your real routes.
As you add abstractions you are trading maintainable straightforward code for more granular testing. It's a hard trade off not a set of principles for good code.
comment 2y ago · link · parent
It's recommended to not split the low level details from. your business logic, in fact it's not just recommended the compiler slowly forces your hand.
If you write overly abstract code like the author recommends you will leave a large amount of performance on the table. Code like that doesn't play nicely with lifetimes, by trying to separate memory management from business logic you're left with only the least restrictive scheme owned heap allocated data.
The Rust type system teaches you not separate concerns, without giving up the ability to reason about your code.
comment 2y ago · link · parent
Attempting these design patterns is a common part of getting over OOP when new to Rust. The result: over-abstracted, verbose, unmaintainable C++/Java written as Rust. Every layer of indirection ossifies the underlying concrete implementations. The abstractions inevitably leak, and project velocity declines.
I have seen the same types and logic literally copied into three different repositories in the name of separation of concerns.
Luckily people usually get over this phase of their Rust career after a couple of failures.
If you’d like to skip that part, here are a few rules:
1. Always start with concrete types. Don’t abstract until you have at least two, preferably three, concrete implementations.
2. Separation of concerns is a myth.
3. K.I.S.S.
comment 2y ago · link · parent
Any dev who has fully gone down the haskell rabbit hole can definitely grok any other paradigm. The challenge isn't technical skills with devs like this.
comment 2y ago · link · parent
This is currently the case in rust. IO and other effects are frequently implicit. You don’t have to use ? or await they are *sugar. I have frequently seen reinventions of exceptions, unwind nonsense, adhoc interpreted tagged effects, etc..
Explicit syntax for effectfull calls should not be a goal. We don’t actually have that today.
28.
Angzarr: A Unicode character that has an unknown origin(en.wikipedia.org ↗)
5 points · by Avi-D-coder · 2y ago · 1 comment