HNHacker News
TopNewBestAskShowJobs

dikaiosune

4,199 karma · joined December 10, 2014

http://blog.adamperry.me
submissionscomments
dikaiosune··on Bay Area Startups Find Low-Cost Outposts in Arizona
The Verde Valley area gets hot in the summer, but still ~20 degrees F cooler than the Phoenix area. About 2.5-3 hours north of Phoenix (north of the Mogollon rim, on Colorado plateau), our hot summer days are in the low 80s, and we regularly have several feet of snow in winter.
dikaiosune··on Bay Area Startups Find Low-Cost Outposts in Arizona
I too live a couple hours north of Phoenix at the moment, and I think it's a real shame that Phoenix is the part of the state getting this Bay Area outflow -- good entry/mid level jobs are hard to find in northern AZ, and you're right that it's a much nicer place to live than Phoenix. I would much rather move to SF than to Scottsdale, even with the discounted housing.
dikaiosune··on Man Who Introduced Millions to Bitcoin Says Blockchain Is a Bust
I hear echoes of https://whispersystems.org/blog/the-ecosystem-is-moving/. The argument that open protocols become effectively static after adoption is compelling, but I wonder if perhaps we can do better.
dikaiosune··on Aetna CEO Threatened Obamacare Pullout If Feds Opposed Humana Merger
Of course, the constituencies which oppose single-payer seem often to be composed of the same people who will vote out anyone who messes with their Social Security, Medicare, or VA benefits.
dikaiosune··on Shape of errors to come
There's some ongoing work in that area that may be relevant:

https://github.com/nrc/rustw

dikaiosune··on Shape of errors to come
The person you're replying to didn't even mention Rust -- and they're right that many languages other than Rust avoid the problems cited in the listed error messages.
dikaiosune··on Rust compiler walk-through – Introduction
I'm pretty sure mrustc isn't targeting GCC as a backend, but I'm not sure.

I don't know what approach is being taken by the person working on a GCC backend, but it's entirely possible what you've described is what they're doing.

dikaiosune··on Rust compiler walk-through – Introduction
There are two nascent alternative Rust compiler projects that I know of. One is https://github.com/thepowersgang/mrustc, which does not aim to be a GCC or LLVM front-end, and seems aimed at bootstrapping rust on platforms with only C/C++ support. The author of this alt compiler says they're able to parse and typecheck libcore (the small OS independent part of the standard library). They are working on codegen so they can start making use of the rustc compiler tests. I don't think they aim to implement the borrow checker, though, because their goal is bootstrapping rustc on other platforms, and the borrow checking can be verified using a different compiler.

There's also a frequent user of the rust irc channels who is experimenting with writing a GCC front-end for rust. I don't think any code for that is public yet, and I don't know how far along they are.

dikaiosune··on Crystal: Fast as C, Slick as Ruby
Memory isn't the only resource managed by deterministic destruction.

Manufactured problems? When what's now coastline is underwater, I'll be glad to see if you remain as smug.

dikaiosune··on Crystal: Fast as C, Slick as Ruby
> fighting the borrow checker

My experience is that this is an initial hurdle to clear. As an example, I've almost exclusively worked in GC'd languages for a while, and after learning Rust for a few months I very very rarely have borrow check errors.

The fact that it occasionally requires a complex pattern to do right should get better with time (non-lexical lifetimes would help), and there's also discussion around GC integration so that you could interact with a scripting language GC when writing a plugin for it, or you could farm out GC'd objects when you need to have cycles (i.e. in graph algorithms).

> the Chrome guys have gone in the direction of deploying a GC into C++

Interesting. I'm curious how much of the browser relies on it. I'm also curious whether it's an attempt to paper over C++ with a little memory safety, or whether it actually offers performance improvements. My original point was not that GC is bad, per se, but that I quite like being able to avoid it when it's reliable to do so, which is not the case in C++, IMO.

dikaiosune··on Crystal: Fast as C, Slick as Ruby
Tracing garbage collectors have to have some metric for when to trigger a stop-the-world collection. IIRC, many GCs track heap usage and trigger stop-the-world when it gets above a threshold. GC'd language runtimes which don't have a tracing/compacting collector (e.g. CPython with refcounting) don't need to configure a heap size because the behavior doesn't vary as you use up your heap.
dikaiosune··on Crystal: Fast as C, Slick as Ruby
Re: deployments, I expect that would take some time for a transition to occur. The first post date on the ScyllaDB blog is from February 2015 (http://www.scylladb.com/2015/02/20/seastar/), and it looks like it wasn't until September 2015 that they specifically started publishing benchmarks of the database itself as opposed to the network I/O library they built for it (http://www.scylladb.com/2015/09/22/watching_scylla_serve_1m/).

I look forward to those changes coming to Java, and I think that stack-based value types could do a lot for the language. That said, the Scylla folks seem to have gotten a lot of their performance gains from CPU/thread affinity and async I/O (http://www.scylladb.com/2016/03/18/generalist-engineer-cassa...). NIO is pretty great in Java-land, IIRC, but CPU/thread affinity is, I imagine, hard to pull off with a garbage collector.

Another thing I'm curious about w.r.t. value types in Java -- hasn't C# had those for a while? If so, and if your claim that value types will provide large performance benefits is true, why isn't C# always blowing Java away in benchmarks? Perhaps it is and I'm just not seeing them. Perhaps Java's escape analysis is already pretty good and solve the 60/70/80% case? Perhaps I'm not well versed enough in the subject to understand the interactions here.

dikaiosune··on Crystal: Fast as C, Slick as Ruby
> wasting precious machine cycles on something that may not be even necessary at all.

I'm not familiar with very many scenarios where one has a garbage collector but doesn't need to free some piece of memory when it's no longer used. Could you clarify what you mean here?

dikaiosune··on Crystal: Fast as C, Slick as Ruby
The Boehm collector (http://www.hboehm.info/gc/) appears to offer what you're describing. In fact, it looks like it's what Crystal added in 2013 to implement its original garbage collection:

https://crystal-lang.org/2013/12/05/garbage-collector.html

dikaiosune··on Crystal: Fast as C, Slick as Ruby
I agree that to compete with Ruby ergonomics one probably needs a GC. I think part of what I'm getting at is that there are other ways to approach these problems, and aping Ruby isn't necessarily one I prefer. Not to knock Crystal, it seems very cool.

Re: application domains, I've recently been doing some work in CPU/memory constrained applications (not embedded, running big >500GB jobs on HPC clusters), and a GC is unfortunately a non-starter for this kind of data processing.

I have also been watching with great anticipation the work being done on "big data" processing with Rust (https://github.com/frankmcsherry/timely-dataflow) and how that might obviate the need for a GC with the various JVM RAM-hogs which dominate that field.

There are also many areas where people work (many of whom provide the tools that programmers of GC'd languages use for their jobs) which can't admit a garbage collector.

For example, I currently deploy Django code (running on an interpreter that needs to implement, not run on top of, a GC) to a machine with a Linux kernel, running nginx, backed by another machine running PostgreSQL, with caching in Redis. None of those very important tools can reasonably offer the performance needed in a garbage collected language.

For another example, I'm typing this (quite lengthy) response in a low-latency application (a browser) which would also be difficult to implement in a garbage-collected language.

dikaiosune··on Crystal: Fast as C, Slick as Ruby
I don't personally think any of them should go away. I just note that many newcomers to the language feel they're opaque. Having written a good bit of rust now I do sometimes find the sigils impact readability (especially in macro_rules).
dikaiosune··on Crystal: Fast as C, Slick as Ruby
Perhaps that's not the right way to phrase it. I guess I'm mostly thinking of compiler plug-ins which are very unstable right now. Which means that most users probably never write procedural macros in their own code. (I certainly don't)
dikaiosune··on Crystal: Fast as C, Slick as Ruby
Corrupting data with no warning or visible signs is far, far worse than crashing the application.
dikaiosune··on Crystal: Fast as C, Slick as Ruby
Pedantically, it's defined behavior, and doesn't use an interpreter lock.

Granted, I'm completely head over heels for Rust, and I agree completely that ConcurrentModificationException is a crappy answer, but it is defined behavior (AFAIK).

dikaiosune··on Crystal: Fast as C, Slick as Ruby
ConcurrentModificationException?
dikaiosune··on U.S. Team Wins First Place at International Math Olympiad
Or perhaps a more accurate answer is "it's complicated." [0]

[0] http://www.nytimes.com/2016/04/22/sports/soccer/usmnt-uswnt-...

dikaiosune··on Inside font-rs, a font renderer written in Rust
Inline assembly is still unstable though, yes?

Also autovectorization doesn't support many uses and can be quite brittle AFAIK.

I think Rust is absolutely amazing, but stabilized SIMD support is right up at the top of my wishlist.

dikaiosune··on Inside font-rs, a font renderer written in Rust
This thread (https://www.reddit.com/r/rust/comments/4vqpxx/inside_the_fas...) on the Rust subreddit includes a comment from the author regarding using the SIMD functionality in nightly Rust:

"Oooh, it's made a lot of progress recently! Funny thing, I actually started experimenting with this stuff pre-Rust 1.0. Last I looked at the SIMD crate, it was missing a whole bunch of stuff, and my style is to use fairly exotic SIMD instructions when they can help (for example, _mm_shuffle_epi8 is available in tmmintrin.h but not pmmintrin.h.

This is a technology demo, so using a not-yet stabilized feature seems in scope. Perhaps I'll try the SIMD crate for writing the ARM version."

dikaiosune··on Unexecute
> as long as it is properly contained

Why are people so afraid of C buffers? They enable great performance, and they are no more and no less secure than bounds-checked buffers (as long as the array indices are properly contained), and well, this is what makes computers and programming run fast rather than being forced into slow interpreted execution.

dikaiosune··on The Rust Platform
Pedantically, the standard library (strings, basic networking, containers/collections, etc.) is already well defined and quite small. The Rust Platform idea seems more aimed at providing access to curated, stabilized versions of community-developed librares for common higher-level tasks (async I/O, serialization/deserialization, etc.).

Personally, I think that letting users (especially beginners) opt in to a larger set of starting libraries could be very beneficial for adoption.

dikaiosune··on The Rust Platform
I don't see anything in this proposal which indicates that rustup would by default install any of this, and it's already the primary target of development efforts, Rust Platform or not.

What other installers are you referring to, exactly? The old rustup.sh which couldn't support multiple toolchains installed alongside each other? multirust which didn't work on Windows? rustup is a massive improvement over both, IMO.

dikaiosune··on The Rust Platform
Would it still work correctly when invoking rustc on its own or from another tool? I've seen a couple of people on IRC asking about driving rustc from a non-Cargo tool.
dikaiosune··on The Rust Platform
That's quite the email! Without a TLDR, I'm not sure how to assess how susceptible Cargo is to those problems. My personal experience with Rust has been that there are very few instances where versioning or dependency issues cause me problems. The specific instances I have dealt with would be resolved by the proposal in the blog post (trying to use a version of serde which differs from what another core-ish library wants to use, etc.).
dikaiosune··on The Rust Platform
For those of us unfamiliar with Haskell, could you expand on the downsides a bit?
dikaiosune··on Rust Performance: A story featuring perf and flamegraph on Linux
I'm not sure what's de facto, but I most commonly see other Rust/Linux users reaching for valgrind (callgrind, cachegrind, etc). I've recently used massif (part of valgrind) for doing profiling of heap allocations, as well. In the past I also used oprofile because it gave me a nicely annotated source dump of sample rates in different statements.

I am growing to like perf a lot, though. It seems (haven't measured though) to impose less runtime overhead, and the reporting and source annotation tools are top notch.

← PreviousPage 6 of 22Next →