Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 7y ago · link · parent

Firefox isn't exactly stagnating - Servo has a lot of promise for performance.

comment 7y ago · link · parent

I don't see how you could have missed (b).

comment 7y ago · link · parent

I don't believe that writing wrappers is particularly important, though I think that anyone who uses SQS is likely to build an abstraction over it at some point (as with all lower level communication protocols, at some point you build a "client library" that's more specific).

As I said, at least in the cases of your database and your storage, being cloud-agnostic is trivial. Managed postgres is easy to migrate from, S3 shouldn't be hard to migrate from either.

Certainly lambda doesn't impact this too much.

> Serverless technology is only starting out still and I'm pretty sure 5 years from now Lambda won't be the go-to platform anyway. Plus honestly we've learned so much from the first big project on Lambda that writing the next one with all of that in mind will be pretty great (and agnostic).

I realize it isn't entirely on-topic, but could you elaborate? I'm curious to hear more about your opinion on this, I'm not sure what the future of Serverless is.

comment 7y ago · link · parent

While I could probably answer that, I don't think it's relevant to my central point - that lock-in is not as big of a deal as it's portrayed as, and that lambdas do not make the problem considerably worse.

comment 7y ago · link · parent

Sorry, I don't agree, and I feel like I provided evidence why in my first post. To summarize, choosing services like Postgres and S3 doesn't lock you in. SQS and SNS might, but I think it's an exaggerated cost, and that has nothing to do with Lambdas (EC2 instances are just as likely to use SQS or SNS - moreso, given that SQS wasn't supported for Lambdas until recently).

There are tradeoffs, of course. Cost at scale is the really big one - at some point it's cheaper to bring ops/ hardware in-house.

I just don't agree that lock-in is a huge issue, and I really disagree with the idea that lambdas make lock-in harder.

comment 7y ago · link · parent

I'm not sure I see your point. What is it you think I'm advocating for?

My only point is that vendor lock-in is not a significant issue on AWS, and that it requires virtually no effort to avoid it.

comment 7y ago · link · parent

OK. So you connect to Postgres on RDS - cloud agnostic.

You connect to S3, and:

a) You can build an abstraction service if you care about vendor lock-in so much

b) It has an API that plenty of open source projects are compatible with (I believe Google's storage is compatible as well)

Maybe you use something like SQS or SNS. Bummer, those are gonna "lock you in". But I've personally migrated between queueing solutions before and it shouldn't be a big deal to do so.

It's really easy to avoid lockin, lambda really doesn't make it any harder than EC2 at all.

comment 7y ago · link · parent

The argument makes no sense. Because it is deployed in AWS, you can't get performance without using AWS services, therefor it is locking.

This seems like no more of a lockin than, say, choosing a DNS server that's giving me lower latencies.

My AWS Lambdas talk to a Postgres database, S3 (which has many open source API implementations), and SQS, which yeah, I'm "locked into".

The work to move to another service would be absolutely trivial. All of the AWS stuff like Postgres, S3, and SQS is totally abstracted from the business logic. I could rip it out at any time.

I just don't get what anyone means when they saw lambdas lock you in, I don't feel locked in at all. I could move to GCP in, idk, two weeks probably.

comment 7y ago · link · parent

Plenty of specialists make > 1m without running a hospital.

comment 7y ago · link · parent

I think it's worth noting that there's plenty of memory unsafety to be had without dynamic allocation.

comment 7y ago · link · parent

Totally, that could absolutely be the case. But it probably won't be. The reality is that most C programs do use manual memory management, by a very wide margin.

comment 7y ago · link · parent

Neat. Doesn't really change anything, except that you aren't required to manually manage memory but, practically speaking, you will end up manually managing memory. Especially if you're choosing C for performance requirements.

comment 7y ago · link · parent

On the surface they're quite similar, I agree. I won't pretend that Firefox has some whole separate UX decision process that's ruining it for me. It is, like all decisions between similar products, a matter of my own pet nit.

I dislike Firefox's zooming behavior. I have to zoom into websites because I have poor vision. Chrome's zoom behavior has been extremely natural for me, and easy to adjust to. When I used Firefox I attempted to use 'vanilla' as well as an extension that aimed to improve the zooming behavior by separating scale of text from scale of other elements, etc.

I was unable to find a solution that worked for me. I hated using the extension, which itself had a pretty bad UX, and I couldn't get preferences to save properly for individual webpages.

I can't use a browser with poor zooming behavior, I rely on it too much. As I write this I am zoomed in 250% in Chrome, for example.

Those pet-bugs or pet-nits are, in my opinion, the huge thing that keeps people from moving (alongside the perceived friction of moving data over). I wouldn't read too much into mine.

comment 7y ago · link · parent

Not the person you're responding to, but no. Until uMatrix actually breaks for me, I'm not switching to Firefox.

Switching is a pain, and I don't like Firefox's UI/UX. I'd switch if they did this because I value the extension very highly, but I wouldn't be happy about it.

comment 7y ago · link · parent

My side project is on lambda. The #1 cost for me is the EC2 service I use for a DB they integrate with, because my lambdas basically don't execute except a few times on the weekend.

Nice to not have to worry about patching or updates or any other ops work at all.

comment 7y ago · link · parent

> Now I see that you are talking about MEMORY safety which I'm not. Writing safe programs includes so much more than just memory safety.

Yes, what rust claims is memory safety, not safety from all forms of bugs. If you don't want wrapping integers, you can compile with a flag to panic on overflow, or use types in std that will have the behavior you want.

> I have not seen a single CVE about the issue.

That's part of the point of the article. CVEs are rarely filed for memory safety issues in the underlying C libraries that make up the Python ecosystem.

comment 7y ago · link · parent

> Wrap around is one of the leading causes of security issues in all software.

A wrap around on its own can not cause unsafety in rust, only panics.

As in, maybe you try to use the wrapped integer as an array index, that's still safe even if it wraps (because Rust bounds checks).

It would only case memory safety when used alongside code in an unsafe block.

> The author says that it is very hard not easy to exploit C libraries loaded by Python.

I drew a different conclusion from that section

comment 7y ago · link · parent

Alternatively, Python could easily be argued as being radically unsafe compared to Rust, given the many, many libraries that call out to C and the ease of exploiting C libraries loaded by CPython.

https://hackernoon.com/python-sandbox-escape-via-a-memory-co...

I'd say more people have had to jump into "unsafe" Python than have had to jump into "unsafe" Rust.

As for overflow checking, that won't lead to unsafety on its own, just panics (it's defined to wrap in release).

Your post conflates all sorts of issues and lacks nuance.

comment 7y ago · link · parent

Not really, no.

His point was that fundamentally Rust will have overhead by being safe, and that it's necessary to drop into unsafe to match the performance of C++.

He takes this further, stating that if you're going to drop into unsafe for hot code, why not just use Java/Go and FFI into C++.

This is misleading or incorrect for a few reasons.

* Rust isn't considerably slower than C++ (again, the benchmarks are total nonsense and way out of date)

* The performance differences are not a matter of safety features (such as bounds checking array accesses), but separate features like constexpr, int generics, and SIMD.

* His statement on Go/Java ignores that Go and Java will pay a significant cost for calling out to C/C++ for the "hot code"

As an aside, Rust now has explicit SIMD, and there's progress being made on `const fn` (the contexpr equivalent) and int generics.

comment 7y ago · link · parent

I'm reluctant to comment because the first iteration of this 'series' was fraught with blatant errors, from what I recall.

> Rewriting it is way, way too expensive, risky, and, honestly, doesn't seem to make sense except in the heads of the most frantic Rust fans.

I've met hundreds of rust developers at this point and at no point in conversation has anyone ever expressed that we should be working to rewrite every C++ project in Rust.

> for example Vala, Cyclone, Limbo, BitC. How many of you have even heard of these languages?

I'm aware of Cyclone and Vala, not the other two. Vala isn't even a little memory safe, so not sure why it's mentioned. Cyclone was a research project from my understanding, and that's it.

> By the way, most of the critics have never seen C++ code in production.

Not true.

> Rust is safe indeed but, unfortunately, far from fast. By the moment of writing this article, it is comparable to Java, Go, and Haskell regarding performance:

Old benchmarks, no discussion of why those benchmarks are the way they are. Benchmarks without analysis are just meaningless charts. Old benchmarks are even worse.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Here's the up to date benchmarks.

> or if it is automatically doomed to be twice slower than C/C++ because of the constant checks for array overruns, safe wraps of bindings to C-libraries, and other stuff like that.

There are a lot of really interesting reasons why Rust is slower in some benchmarks, like lack of constexpr or int generics, which at least one C++ benchmark uses heavily.

> But these are actually two dialects of one language, which doesn't look much different from the "Java + C" or "Go + C" combos.

Practically, there is a world of difference, given the lack of 0-cost FFI in eithe rof the mentioned languages.

The rest of the article is just disconnected conjecture, I stopped reading. If anyone thinks there's value to finish it though, let me know, I'll circle back.

edit: It occurs to me that I'm not reading "The next in a series" but actually an extremely dated article that wasn't accurate in 2015 and isn't accurate now.

comment 7y ago · link · parent

And home made yogurt tastes sooooooo good.

comment 7y ago · link · parent

> And that'd be a totally useful way of looking at it if most real Rust programs didn't have any "abnormal" (unsafe) code in them. They do, though,

I'm willing to bet that the vast majority of Rust code (outside of std) is safe. I've written unsafe once ever, in years of writing rust.

I agree that it's unfair to generalize that debuggers have no use in rust, but it's fair to generalize and say that most rust developers do not experience segfaults, or other memory corruption issues that often call for a more advanced approach to debugging.

comment 7y ago · link · parent

> But disputing a valid payment is nothing more than theft.

I'm always happy to steal from companies that turn my free trials into subscriptions. I'd steal more if I could.

You're coming at this as if the service provider is innocent, and merely providing a service. But we're talking explicitly about companies that give you free trials with the "asterisk, ps, you will pay real money in for this every month on this".

comment 7y ago · link · parent

Same. I build a project in my free time and I was pretty surprised to see my bill was 99% NAT Gateways and a few hundred dollars.

A free tier for NAT gateways would go a very long way. I wonder why they wouldn't have one.

comment 7y ago · link · parent

Yes, I'm the author of that thread. It went nowhere.

comment 7y ago · link · parent

NPM announced support for 2FA and read-only tokens soon after the incident.

https://blog.npmjs.org/post/166039777883/protect-your-npm-ac...

Can't say I'm aware of any other package manager even discussing these issues.

comment 7y ago · link · parent

There aren't really simple data structures that involve pointers. Pointers are just hard (where hard means they require programmers to hold state in their head), and rust makes that explicit.

The reality is that implementing data structures that require pointers is not a typical task, and they're ideally provided by the stdlib or crates.

comment 7y ago · link · parent

I believe AWS does share customer information within a device, but with a lot of sandboxing below that. You can watch this talk to learn more: https://www.youtube.com/watch?v=QdzV04T_kec

I think the threat model is basically that you'd need a KVM kernel 0-day + the ability to exploit it, so a point of privilege such as outside of the firecracker sandbox.

1
141142143
164