Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dtolnay
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
31.
▲
by
dtolnay
6y ago
I appreciate it! Someone drops that link into just about every discussion about CXX. I have to respect the mindshare that your blog gets!
32.
▲
by
dtolnay
6y ago
> If for any reason a C++ project integrates Rust in a way that is permanently through an FFI, then the development costs to use the unsafe non-ergonomic FFI are worth the effort for this unique situation. I don't follow this train
33.
▲
by
dtolnay
6y ago
This is outdated and does not apply to the library today. The resolution is discussed at the bottom of your link.
34.
▲
by
dtolnay
6y ago
std::string and std::vector are not things that can exist by value in Rust, because it's possible for them to be implemented using internal pointers which are incompatible with how Rust does move semantics. Some easy and efficient ways
35.
▲
by
dtolnay
6y ago
At T+01:11 with 3 engines still lit ( https://youtu.be/_zZ7fIkpBgs?t=397 ). Not the apogee one at T+04:34.
36.
▲
by
dtolnay
6y ago
I've been planning on the cxx side to update my attribute macro to require `unsafe mod ffi {...}` or `unsafe extern "C" {...}` to signal presence of a proof obligation. I think that resolves all concerns from the January disc
37.
▲
by
dtolnay
6y ago
> Just serialisation (which is almost invariable Serde) will pull in at least 54 dependencies (if you only use serde and serde_json). What is this number referring to? Serde + serde_json with all their transitive dependencies is maximum
38.
▲
by
dtolnay
6y ago
The article isn't supposed to imply that any regret was involved. People used early libc and early serde to get a massive benefit (respectively: talk to C code, and process JSON). Independent of version numbers those are things people
39.
▲
by
dtolnay
6y ago
Under the Global Wealth heading, in the sidebar it shows a Chinese flag and next to it says "Wealth: $63.8 trillion; Number of Millionaires: 4,447 (in USD terms)". What is that second number? Surely there are more than 4,447 peopl
40.
▲
by
dtolnay
6y ago
Dividing by the LoC is a mistaken way of looking at this data. Regardless of the amount of code in a browser or in Windows, an attacker may only need ONE exploitable bug to cause mischief. If the amount of code in Windows grows by a factor
41.
▲
by
dtolnay
6y ago
Here is the data from Microsoft Security Response Center on this [1]. Slide 5 shows double as many CVEs as 4-5 years prior, triple as many as 6-8 years prior. Further, slide 10 shows 70% of CVEs are memory safety and that ratio has been con
42.
▲
by
dtolnay
6y ago
My comment is in response to "super cool idea, but I don't think it's going to help Rust compile speeds". Even a compiler that emits garbage IR from the frontend would get 20x faster with a magic instant backend if 95% o
43.
▲
by
dtolnay
6y ago
Rustc normally spends way more time in LLVM than in the frontend. Rust parsing and type checking are very fast in comparison to LLVM's codegen. Here is a chart from last September showing where the time goes in compiling a large Rust c
44.
▲
by
dtolnay
7y ago
Fn is spelled differently than auto but it sounds more like C++ than you might think. // C++ auto f() -> int32_t { return 1; } // Rust fn f() -> i32 { return 1; }
45.
▲
by
dtolnay
7y ago
Revised down to 2.6: https://threadreaderapp.com/thread/1221132573340061697.html
46.
▲
Why async fn in traits are hard in Rust
(smallcultfollowing.com)
3 points
by
dtolnay
7y ago
|
0 comments
47.
▲
Accurate mental model for Rust's reference types
(docs.rs)
2 points
by
dtolnay
7y ago
|
0 comments
48.
▲
by
dtolnay
7y ago
Here is an example of the impact of pipelined compilation: https://gistpreview.github.io/?b19f31756dc76a050cf4fe55f348a... In the blue/purple graph, only the blue typechecking portion of a dependency's build needs
49.
▲
by
dtolnay
7y ago
Here is some context for the event at which these notes were taken, and a summary writeup: https://users.rust-lang.org/t/rust-in-large-organizations-me... This was a meeting between a few employees of large organizatio
50.
▲
by
dtolnay
8y ago
> I feel like there should be a helper for simple parse operations. > parse!("#{} @ {},{}: {}x{}", id, x, y, w, h); > This would be a clean inverse of println!. The text_io crate does this exactly. https:/&#
51.
▲
by
dtolnay
8y ago
This library no longer requires proc_macro_hygiene. I added support for the stable compiler in https://github.com/bodil/typed-html/pull/1 .
52.
▲
by
dtolnay
8y ago
This library represents HTML in types. The <p> tag turns into a typed_html::elements::p [1], inside of which the attributes are held by a typed_html::elements::Attrs_p [2]. [1] https://docs.rs/typed-html/0.1.0
53.
▲
by
dtolnay
8y ago
To see how this fares against native code, I ported their benchmark to Rust's JSON library https://serde.rs/ . Disclaimer: I am a maintainer of Serde. Numbers and graphs: https://github.com/serde-rs/
54.
▲
by
dtolnay
9y ago
The visual explanation makes it look like overlaying any sufficiently high single frequency high intensity signal would achieve the detectable threshold passing events. Is that true? Why does the article mainly focus on white noise?
55.
▲
by
dtolnay
9y ago
Here is the "Redox Crash Challenge": https://github.com/redox-os/redox/issues/1136 According to the Redox book, at last count they had 70 cases of unsafe across 4500 total lines of kernel code. htt
56.
▲
Retooling the Rust Libs Team for 2018
(aturon.github.io)
3 points
by
dtolnay
9y ago
|
0 comments
57.
▲
by
dtolnay
9y ago
The equivalent C needs a second const -- your first one refers to the data behind the string but not the string pointer, and is more like Rust's `let usage: &str`. const char * const USAGE = "usage: blah blah";
58.
▲
by
dtolnay
9y ago
This site was launched today to coincide with the beginning of the "impl period". We plan to finish off our 2017 roadmap goals by spinning down the RFC process for 2017 and spending the rest of the year focused purely on implement
59.
▲
Compile-time Safety is for Everybody
(tockos.org)
3 points
by
dtolnay
9y ago
|
0 comments
60.
▲
by
dtolnay
9y ago
Yes! The statically checkable ones will be checked by rustc or Clippy. Though some of the guidelines are at a higher level than what those would be able to check. For example: rustc wouldn't be able to tell whether a particular one of
More ›