Better HN
topnewbestaskshowjobs
Log inSign up

killercup

940 karma · joined May 12, 2012 (14y ago) · 212 submissions

I'm @killercup on twitter.
Submissions

comment 9y ago · link · parent

One post about how you actually rewrote a thing in Rust (like ripgrep or exa) is worth 50 that suggest this general idea.

comment 9y ago · link · parent

Not sure if APFS has such a thing, but I think I heard about it a while back:

Could they introduce a directory-level option to automatically normalize all files below that node? (Same with case-sensitivity, which I think Adobe software still has problems with.)

comment 9y ago · link · parent

Couldn't find an open issue, but agreed that navigation should not be triggered when a modifier key is pressed, so I opened one: https://github.com/azerupi/mdBook/issues/224

comment 9y ago · link · parent

Very cool! Took me a while to find the rendered version, though: https://brson.github.io/rust-cookbook/

comment 9y ago · link · parent

> It ignores all of the important things that make usability good

Can you give some examples?

To me the approach presented here is not just about coming up with an initial design (where I agree there are more aspects to be considered), but iterating on existing design aspects (in this case language syntax and semantics) to make them more useable. Seeing the first dimension the author mentions is 'Applicability' it seems they pay attention to consistency, but I can see it is not explicitly mentioned.

comment 9y ago · link · parent

I especially like this approach:

> Often, the heart of the matter is the question of what to make implicit. In the rest of this post, I’ll present a basic framework for thinking about this question, and then apply that framework to three areas of Rust […]

What's proposed here is a universally good way to think about what to make implicit. The proposed changes to Rust are just some applications of this.

comment 9y ago · link · parent

Thanks for the great report!

I'm looking forward to seeing how Rust (as well as its standard library) will be tweaked to become easier to learn (which is a goal for 2017). I don't think you'll be able to reduce these 2 weeks to 2 days this time next year, though.

You are one of the first people/companies using diesel in production, btw, which is really awesome! I hope we can help you get rid of your dependency on plain postgres sooner rather than later :)

comment 9y ago · link · parent

The literal `"Ferris"` is a slice, i.e. a (const) pointer, which in this case will even point a part of to the data section of the binary. The String version is dynamically allocated and can be changed, can grow, etc.

comment 9y ago · link · parent

That's why I'm really looking forward to the point in time where "non-lexical borrows in Rust stable" and "clippy installable via rustup" converge.

70.

Parallelizing Enjarify in Go and Rust(medium.com ↗)

3 points · by killercup · 9y ago · 1 comment

comment 9y ago · link · parent

Sadly, HDMI alternate mode currently only supports HDMI 1.4b.

comment 9y ago · link · parent

> We're experiencing unusually high traffic so we'll email you when it's complete.

That's a nice touch!

comment 9y ago · link · parent

Oh, that reminds me: I rewrote that bash script (and a bit more) as a Rust lib (+ CLI) for fun last year. If anyone wants to build on it: https://github.com/killercup/english-lint

comment 9y ago · link · parent

Ah, good times when I adapted my own color scheme[1] for ST2 in 2013. Funny thing is, it's a Textmate theme (`tmTheme`) file and will work in a lot of other editors as well. E.g., it's trivial to use/convert it to Atom or VSCode.

[1]: https://github.com/killercup/sublime-scheme-shiny

comment 9y ago · link · parent

> A rust vdom wasm library would probably be blazing fast.

Even regardless of performance, it would be quite nice to have! I've been meaning[1] to build a small prototype to do something clever[2] with it, but didn't have the time yet. Feel free to steal these ideas :)

[1]: https://scribbles.pascalhertleif.de/impl-virtual-dom-cli-lib... [2]: https://scribbles.pascalhertleif.de/rich-diffs-of-rendered-h...

comment 9y ago · link · parent

There's a crate for that™: https://crates.io/crates/yolo

comment 9y ago · link · parent

The empty tuple/unit is not the same as void. It has exactly one possible value, void has zero possible values. A way to write it in Rust is `enum Void {}` (an enumeration with no options).

78.

TRust-DNS: implementing futures-rs and tokio-rs support(bluejekyll.github.io ↗)

121 points · by killercup · 10y ago · 17 comments

comment 10y ago · link · parent

FYI: from 4.5 years ago

comment 10y ago · link · parent

Legend has it that after completing his mission, he returned to a future where performant JIT compilers have ensured world peace and the prosperity of mankind for thousands of years.

comment 10y ago · link · parent

> How much advantage is there to rust implementation vs c++ if unsafe is used so liberally?

I'm no expert on the topic. IIRC, Rust does not have the same kind/amount of unspecified behavior as C/C++ do.

FYI: This is a "highly optimized version of SeaHash" (see comment in first line) with "optimized" meaning fiddling with raw pointers. You can find a version without any unsafe code is in `reference.rs`. I have no idea how fast the reference implementation is.

comment 10y ago · link · parent

IIRC postmodernism is related to post-structuralism, which would be quite ironic considering this is about data _structures_.

comment 10y ago · link · parent

Not in the type system itself, but you could write a lint to forbid heap allocation. This way, you could annotate a function (with e.g. `#[forbid(allocations)]`) to get a compile error when your function (or code your function calls) tries to allocate. This might not be easy, though :)

comment 10y ago · link · parent

Came here to say that for the specific problem at hand (`ConnectionState`) you should probably use session types in Rust -- but someone on /r/rust beat me to it _and_ the author already added it to the post while I was reading! :)

comment 10y ago · link · parent

The "server" in "language server" does not mean "server you access over the network" but "other process (on your machine) your editor talks to". (This is just the spec for a protocol.)

comment 10y ago · link · parent

Cool!

It seems to not recognize shapes and instead renders them using a bunch of lines, though (just like in the ASCII version). This is visible, at least in Safari 10.

comment 10y ago · link · parent

Interesting, but the only 'Pro' I can actually see here is ES6 support when you were previously using uglify. I think using Closure Compiler on TypeScript output with the right JSDoc comments can yield much better results as there is much more information the minifier can work with.

comment 10y ago · link · parent

Heard a talk about this at the last Elixir meetup in Cologne, looks pretty amazing – especially because of the focus on great explanations.

(Should copy more lints from https://github.com/Manishearth/rust-clippy though! ;))

comment 10y ago · link · parent

On Reddit [1], Alex mentioned that the single-thread case was not optimized (yet). What do the numbers for multi-threading look like?

[1]: http://reddit.com/r/rust/comments/4x8jqt/zerocost_futures_in...

comment 10y ago · link · parent

Nice, but too bad this is not in JSON Schema (it's a custom bunch of html strings in functions). I would love a more complete JSON Schema for package.json (with custom stuff like browserify or babel config) as VSCode is able to autocomplete JSON files from that.
12345
8