HNHacker News
TopNewBestAskShowJobs

dikaiosune

4,199 karma · joined December 10, 2014

http://blog.adamperry.me
submissionscomments
dikaiosune··on Introducing Create React Native App
Hi! I wrote a bunch of the code for CRNA (although it obviously builds on a lot of great work from Facebook and Expo people). Happy to answer questions.

I'll be doing a brief demo during my lightning talk at ReactConf -- livestreamed at ~5:45pm pacific time today at http://conf.reactjs.org/livestream.

dikaiosune··on Apple starts rejecting apps with “hot code push” features
Webkit is the only acceptable browser engine on iOS. Firefox and Chrome both use webkit on iOS.
dikaiosune··on Google Hangouts temporarily won’t support phone/video calls on Firefox
I am betting that there are Chrome devs who feel that Firefox didn't deprecated NPAPI quickly enough - it was something like two and a half years ago when Chrome did the same.
dikaiosune··on One Year with Rust: I wrote a full featured application in rust, and so can you
There are definitely areas where rust and python are closer in abstraction level than you might initially think. For example, rust's iterator trait enables things which are remarkably powerful when compared against python comprehensions.

Another example is the rayon library which is incredibly succinct compared to the multiprocess module in python.

dikaiosune··on List of Sites Affected by Cloudflare's HTTPS Traffic Leak
Hey! Super useful, thanks.

Quick question: news.ycombinator.com (as an example) is listed in the README as a potentially affected site, but I don't see it in the raw dump that I've downloaded. Am I crazy?

dikaiosune··on List of Sites Affected by Cloudflare's HTTPS Traffic Leak
I've been tinkering with a Python notebook for a few minutes to try to quickly assess how much of my LastPass vault is affected:

https://gist.github.com/dikaiosune/0ca7829884b3b3f790418f0f1...

Improvements welcome.

One interesting thing: the raw dump that's linked from the list's README doesn't seem to include a couple of notable domains from the README itself, like news.ycombinator.com or reddit.com. I may be mangling the dump or incorrectly downloading it in some way.

EDIT: disclaimer, be responsible, audit how the dump is generated, etc etc etc

dikaiosune··on What can Rust do for astrophysics?
A little less than a year ago I worked on a bioinformatics project in rust, and I think it came out very well. My perception was that bio is a field where most practitioners rely on high speed code written by someone else that can be called from their perl or python code. I see something very empowering with rust, where people can write high performance analysis without having to shoehorn their workload into an existing toolkit or framework.

That said, while I'm really excited to see rust go more places, astrophysics seems like one of very few fields where practitioners learn a high performance language as a matter of course, and so rust may have a less empowering effect for them. I would wager that after paying the upfront cost to learn it, students and researchers may see improved iteration time from fewer bugs. But it seems like rust may have an incremental improvement to offer which is not as powerful as the transformative nature of its potential in other computationally intensive fields.

dikaiosune··on Regex: badly needs fuzzing
It does look like the afl.rs project (afl for rust code) has been run on regex:

https://github.com/frewsxcv/afl.rs#trophy-case

Which resulted in just one issue? I'm not sure how long they fuzzed or what the methodology was, but this was the panic they found (still not a memory safety issue, more akin to an unchecked exception in Java than a crash in C++):

https://github.com/rust-lang/regex/issues/84

Since that issue is from the same time as Rust's 1.0 release, I suspect that either it hasn't been run again recently or that things are pretty stable in the regex crate w.r.t. fuzzing.

dikaiosune··on Announcing Rust 1.15
Yep! I just haven't explored the options much since tokio matured more (I was at the hack night last fall for it and was very excited, but haven't tried it in the last couple of months) or since rocket was announced.
dikaiosune··on Announcing Rust 1.15
I wouldn't describe any of the issues I've had as major. There have been several papercuts (some of which are resolved by the current release), and I'm honestly not a huge fan of the iron library that I've used. I think in general I really like having Rust's nudges towards correctness for backend web code, but I need to try using something like tokio or rocket.rs instead of iron before I make too broad of a claim about how it is to develop. I think iron is good for several things, but the current amount of documentation (and several other factors) would prevent me from recommending using it in a new project right now.

I'm bullish on Rust for web development, but I think that stable custom_derive with 1.15 is just the start of improved ergonomics for it.

dikaiosune··on Announcing Rust 1.15
The application is using iron, but I think at some point in the future I'd like to try building part of it in either raw tokio/hyper or using rocket.rs.
dikaiosune··on Announcing Rust 1.15
This is pretty major. In anticipation of this release, I was able to remove all nightly feature flags from a smallish web backend which makes heavy use of type-driven codegen (serde and diesel). Really, truly, utterly fantastic to have stability promises for custom_derive. So excited!

!!!!!!

So excited!

dikaiosune··on Ask HN: Who is hiring? (February 2017)
If you write to support@getexponent.com, it will get to the right people until we resolve that. Sorry!

EDIT: The jobs@getexponent.com email has been fixed.

dikaiosune··on Introducing Lottie: Airbnb's tool for adding animations to native apps
> There are libraries similar to Lottie, such as Marcus Eckert’s Squall and Facebook’s Keyframes, but our goals are slightly different. Facebook picked a small set of After Effects features to support, since they were focusing mainly on reactions, but we want to support as many as possible.
dikaiosune··on Rust vs. Go
IIRC that's the only option in the standard library, but event loop and coroutine implementations are available from the crate ecosystem.
dikaiosune··on Testing LLVM
Rust uses https://github.com/rust-community/bors which maintains a linear queue of PRs which can only land after being rebased onto the commits before the PR and subsequently passing tests.
dikaiosune··on Rust on RTL8710 running FreeRTOS
If you have analytics on your blog you'll probably find a bit more than a few hundred. Front page #1 stories often accumulate thousands of views an hour.
dikaiosune··on Compiling Rust to Web Assembly
> There are some core developers who work for Mozilla
dikaiosune··on Compiling Rust to Web Assembly
> the corrosive nature of rust

Fantastic!

More seriously, I'm not sure who you mean by the paid rust advocates here. There are some core developers who work for Mozilla, but I can't imagine that a Rust-using company or individual would spend salary on an HN advocate rather than paying someone to work on the compiler or ecosystem.

dikaiosune··on Rust is more than safety
Last I checked it's still quite easy to invalidate a std::vector's iterator in "safe" C++. Is that no longer the case?
dikaiosune··on Rust is more than safety
That seems like a fair summary to me. Several of these items (better interop with existing libraries, for example) came up in the recent 2017 roadmap RFC conversation, and I would expect them to improve in the future.

Also, if you do try Rust and find other issues that would be blockers for your company to pilot a project, I know that the teams have been very eager to get feedback from "systems" shops on what would be needed to get them trying Rust out commercially.

dikaiosune··on The Resurgence of C Programming
Totally, although I assume at least some game shops are using shared C++ libraries on both client and server.
dikaiosune··on Rust is more than safety
It mostly scores a "YES", where there are footnotes. AFAIK all of these things are being worked on.

> Does it support all of the following architectures? x86_64, ARM, MIPS, powerPC

It does: https://doc.rust-lang.org/book/getting-started.html#tier-2. Granted, while tier 2 support is pretty good, it isn't the same level of support as the tier 1 platforms.

> Does it support soft float?

From running `rustc -C help`:

        -C            soft-float -- use soft float ABI (*eabihf targets only)
> Can it link against uclibc instead of glibc?

It can link against musl, but I'm not sure whether that would enable uclibc. Probably?

> Can it link against arbitrary C libraries?

Yes.

> Can I use a C library's header.h file without having to hand-recode it to Rust?

You can use something like rust-bindgen (https://github.com/Yamakaky/rust-bindgen) which will work with a minimal amount of cleanup afterwards in my experience. Still not a resounding yes, though.

> Will the code I write now continue to compile 5 years from now?

Yes. See https://blog.rust-lang.org/2014/10/30/Stability.html for more about the plans/policies/etc.

dikaiosune··on The Resurgence of C Programming
I'm a little confused game developers are so dismissive of attack surface -- after all, most games I've played in recent memory have some level of network access (multiplayer, achievements, etc.), and very few game developers seem to be OK with rampant exploitation in their online communities.
dikaiosune··on Rust vs C Pitfalls
> After I fixed the bug, I didn't need to fish out an old compiler or any compatibility libraries; I just compiled it with the latest GCC and glibc, and carried on with my day.

Could you show me an example where post-1.0 you wouldn't be able to do this with Rust?

dikaiosune··on 24 days of Rust – Rayon
Closures in Rust are stack-allocated and LLVM can inline them and optimize them as if they're any regular imperative code, for one thing. This means that there's less overhead from managing the iterator chains, and that they're statically dispatched which saves on runtime indirection. The borrow checker also makes sure that you don't accidentally mutate non-thread-safe data from your parallel iterators.
dikaiosune··on Ask HN: Why should I use Django?
Earlier this year I worked on a project which did exactly this. I find it much more difficult to get insight into the system with Celery & RabbitMQ than with other tools. I also found Celery's documentation to not be super awesome for my uses, and it took a lot of trial and error to get it running. YMMV of course.
dikaiosune··on Rust and the Future of Systems Programming [video]
> if you can live with the wasted memory use of objects outliving their conceptual lifetime, regions/arenas are a good solution.

If you can live with the wasted memory use of objects outliving their conceptual lifetime, garbage collectors can be a good solution too.

Not that that's a bad thing for many use cases, but your above comment implies a comparison between Rust and GC. I think the quoted critique falls down a bit when Rust lets you opt-in to generational-esque GC-ish behavior with a very similar downside to what you'd get from a GC.

dikaiosune··on Rust and the Future of Systems Programming [video]
It's worth mentioning that there are several strategies for avoiding cascading deallocations like arenas or arena-backed graph abstractions. For example:

https://crates.io/crates/typed-arena https://crates.io/crates/petgraph

Rust's generics make this fairly pleasant to work with, and lifetimes/borrowck ensure safety when managing your own object allocations.

dikaiosune··on Frink – A practical calculating tool and programming language
I hang out in an IRC channel which has/had a bot for Frink, and after significant flakiness on its part someone decided to build an open-source alternative (which AFAIK frink is not) in Rust:

https://github.com/tiffany352/rink-rs

Seems to work pretty darn well, and it's proven to be super useful.

← PreviousPage 4 of 22Next →