Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
shepmaster
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
shepmaster
3y ago
Primary maintainer of the Rust Playground here. I'm glad to see open source doing the open source thing! I'll try to answer any questions from the Rust point of view, and it will be good to hear of any large differences between th
62.
▲
by
shepmaster
3y ago
> used as complements to time-based profilers, not to replace them Sure. I also use hyperfine to run a bigger test as a user would see the system. I cross reference that with the instruction counts. I use these hardware metrics in a free
63.
▲
by
shepmaster
3y ago
> With cloud CI runners you'd still have issues with hardware differences For my project it really is the diff of each commit, which means that I start from a parent commit that isn’t part of the PR and re-measure that, then for e
64.
▲
by
shepmaster
3y ago
A solution is mentioned in the article, but perhaps obliquely: > while I also wanted to measure hardware counters As I understand it, hardware counters would remain consistent in the face of the normal noisy CI runner. The article talks
65.
▲
by
shepmaster
3y ago
Leading a team is tiring work, so I hope Pietro has some time to recharge and then get back to the fun stuff. Honestly, I’m not even sure why this has as many upvotes as it does: this is a pretty boring change, all things considered.
66.
▲
by
shepmaster
3y ago
Not the person you are replying to, but the JSON performance of Emacs was a well-known thorn in the side for using LSP. Further details... ... from the same source as the top post: https://www.masteringemacs.org/article&#x
67.
▲
by
shepmaster
3y ago
I've been seeing a lot of talk about htmx but I've been blissfully ignoring it as I've been reasonably successfully using Turbo and Hotwire. This move is a sign for me to take a deeper look into htmx as a potential replacem
68.
▲
by
shepmaster
3y ago
How would signing malware prevent that malware from being distributed? I feel like there’s something implicit you haven’t stated that I’m missing.
69.
▲
by
shepmaster
3y ago
> and presumably there’s a backtrace option too There is [0]. However, I'm not personally a fan of backtraces (or the lightweight location information, really). I'd much rather provide what I call a "semantic backtrace&quo
70.
▲
by
shepmaster
3y ago
You will want to use `Location::caller` [0] instead of the `line` macro (and friends). You will need to annotate enough places with `#[track_caller]` so the location is correct. [0]: https://doc.rust-lang.org/std/panic&
71.
▲
by
shepmaster
3y ago
In SNAFU, you can add a Location [0] type to your error which will automatically capture that information when you add context to your error [0] https://docs.rs/snafu/latest/snafu/struct.Location.html
72.
▲
by
shepmaster
3y ago
I often want to sort within a line: [“zoo”, “cow”] Would become [“cow”, “zoo”] Any tips on how to do that? Ideally using just built in functions… I usually insert newlines between the elements, use a line-based sort, then
73.
▲
Just One Single History – combine the advantages of monorepos with multirepos
(josh-project.github.io)
1 points
by
shepmaster
3y ago
|
0 comments
74.
▲
by
shepmaster
3y ago
FWIW, I believe the person you are replying to means "paged" as in "an alert was sent to my pager at 3AM that the entire system is down and I need to wake up and fix it", not the paging in/out of memory.
75.
▲
by
shepmaster
3y ago
> Which operates by immediately dumping the "errors" to terminal without any error types involved whatsoever I haven't looked at your code, but if I take this sentence at face value, I'd be very hesitant to use your l
76.
▲
by
shepmaster
3y ago
> Why expose it I read "expose" in two possible ways: (1) as a public- / user-facing API (2) existing at all. When an error type is a public API that is bound by semver, I do think you should be very careful about what you
77.
▲
by
shepmaster
3y ago
> as opposed to the article being discussed. I'd actually say that the article and my suggestion are basically compatible. If you check out my gist [1], you'll see that I have basically the same number of user-facing types (or
78.
▲
by
shepmaster
3y ago
That's an interesting question that I find difficult to answer. To me, it's as if you are asking "why provide any detail about what happened?". The nonsense end result of that line of logic is that you return a single bo
79.
▲
by
shepmaster
3y ago
I encourage people to check out my SNAFU crate [1]. I urge users to create many distinct error types (usually enums but also structs) and compose them — so much so that I advocate that you never create each specific error in more than one s
80.
▲
by
shepmaster
4y ago
Pedantically, `yield` is already a keyword [1]. As the project's README states, generators [2] are an unstable part of Rust, and the `yield` keyword goes with them. [1]: https://doc.rust-lang.org/reference/keywords
81.
▲
by
shepmaster
4y ago
> So mostly people writing high performance code I would have assumed those people would be deliberately using another allocator with known/documented/guaranteed qualities instead of whatever ambient allocator was in play at th
82.
▲
by
shepmaster
4y ago
> Rust had a chance to fix this, but also dropped the ball. By default , a Rust project will panic on integer overflow in debug builds and will overflow on release builds. Two key points to note, however: 1. You can change the setting s
83.
▲
Rust Foundation – Introducing Our Newest Project Grantees
(foundation.rust-lang.org)
8 points
by
shepmaster
4y ago
|
0 comments
84.
▲
by
shepmaster
4y ago
If you enjoy reading Rust code, you can see some examples I have... 1. This example [1] compares a SIMD-accelerated implementation of an algorithm vs the naive implementation. This is usually referred to as an "oracle". 2. This ex
85.
▲
by
shepmaster
4y ago
Thanks! This page is familiar so I've definitely read it before, but didn't recall it when remembering examples. I like that it links to the site I provided; maybe I should try to search for other articles that also link there to
86.
▲
by
shepmaster
4y ago
Thanks; I've added that to my Christmas gift ideas!
87.
▲
by
shepmaster
4y ago
Most posts about property-based testing focus on convincing the reader to do property-based tests and the mechanics of writing the tests. Unfortunately, I'm already convinced and know how to write the tests — what I wish I could find i
88.
▲
by
shepmaster
4y ago
I like using https://altsysrq.github.io/proptest-book/intro.html for those very reasons. https://github.com/BurntSushi/quickcheck came first, but I prefer proptest’s implementation more than quick
89.
▲
by
shepmaster
4y ago
> public errors shouldn't have From's for concrete types > enum errors are more generally too tied to implementation details to be used in libraries I generally agree. SNAFU addresses these problems in two ways: 1. The `From
90.
▲
by
shepmaster
4y ago
> Something we are discussing is changing `defaut-features = false` I’d be generally in favor of such a change as this is what I use for all of my projects when I start out. I find it much more comfortable to deliberately opt in to thing
More ›