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

I don't know what you mean by AWS? They don't rely on V8 for isolation, they use KVM among many other layers.

comment 7y ago · link · parent

Have you looked at stainless?

comment 7y ago · link · parent

Not easily. Rust's type system has limits, and what you're talking about is something you'd probably want dependent types for.

But it can catch lots of other logic errors.

The approach I have used in both mypy and rust is to encode state transitions into types. It's more elegant in Rust, and safer as well, but even with mypy it means I could be very sure about certain properties of my service (it was a sensitive service and I needed to be reasonably sure it wouldn't end up in an invalid state).

https://insanitybit.github.io/2016/05/30/beyond-memory-safet...

This is an example of the pattern.

When you take a "Type driven" approach to your code - stating your constraints upfront, and encoding them into your types - you can push a lot of the debug cycle to your compiler.

comment 7y ago · link · parent

Most logic errors can definitely be caught by the compiler if you're taking the approach of encoding your logic into your type system. I've done this with real codebases (in Python as well, actually, using Mypy) and it's been very effective.

comment 7y ago · link · parent

Can't speak to others, but it's funny to think of "printf debugging" as a last resort when it's easily my go-to. I'll often add some println's and re-run tests to trace through what happened.

I only step into a debugger when I'm really wtf'd, and I don't think that's happened to me even once with Rust (it used to happen a lot with C++, since printf debugging mixes so poorly with segfaults etc). No question that long compile times are a pain though. I generally use 'cargo check' 99.99% of the time.

Thankfully there's work going into making debug builds faster by, if I recall, replacing the llvm backend with some other thing I don't recall the name of.

comment 7y ago · link · parent

Tidb is built on top of tikv though.

comment 7y ago · link · parent

Bitcoin does 2^88 a day but from what I can tell the overflow issue means you'd have to do that much in a millisecond. Seems unlikely?

comment 7y ago · link · parent

A common use case might be something along these lines:

https://play.rust-lang.org/?version=stable&mode=debug&editio...

While the `entry` API provided an ergonomic, more performant way to do this, this is an example of a common pattern one might expect from other languages that, until recently, did not compile.

NLL and other ergonomics improvements have helped a lot with these paper-cuts.

comment 7y ago · link · parent

I think people may be forgetting that Brave is a very small, new company, and not everything is streamlined yet...

comment 7y ago · link · parent

This isn't true if you've actually seen production Rust code, but the point is irrelevant to the issue of swift being GC'd - it is.

comment 7y ago · link · parent

I would assume that some haskell knowledge is assumed, and the author is simply framing the conversation by stating their view of haskell as a set of core features, which they named.

comment 7y ago · link · parent

>This is an explainabrag which is also wrong

It only feels like "explainabrag"ing to some, I would imagine. The terms are all really standard, and listing out features by their names hardly feels braggy. It's a clear, concise way of stating features of a language. Coming from other languages with those features I think the information was conveyed well - but for others it would just look like jargon.

To me, the author was setting up the post - framing the conversation by explaining their view of Haskell as a set of core features. Then they moved on to discuss another feature - dependent types. This makes a lot of sense in the context of dependent types - I think this HN post really nicely conveys why:

https://news.ycombinator.com/item?id=18705128

> What a profoundly dismissive attitude. Why bring up Cyclone and not, say, Swift? Or is Swift meant to be included in "garbage collected languages?"

It's like, pretty mostly true. There are other languages that are memory safe without GC but I don't know of any that are mainstream/ even in use, or that allow free'ing of memory.

Yes Swift is GC'd, just not tracing GC'd.

https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...

> No these are not the same and this is an absurdly wrong conflation. Dart, Objective-C, TypeScript, and others are dynamically typed languages with static type checking. You can't "or rather" this distinction away.

I don't think so.

"Dynamically typed with static type checking" makes no sense. The languages listed are statically typed. They may coincidentally compile to code that checks the type at runtime as well, or code that has or lacks implicit casts, or otherwise carries type information around with the data, or whatever, but the types are statically defined.

Also, dynamic types are often considered to be unityped - every value inhabits one giant union of all possible types.

https://existentialtype.wordpress.com/2011/03/19/dynamic-lan...

Here is a source demonstrating that this view is not unique. You are free to disagree (some do), but it's hardly an "absurdly wrong conflation".

I think your post was pretty unnecessarily critical. You didn't like the post, ok. But maybe you should have challenged that gut reaction - that "rubbed me the wrong way" feeling, because I think your post has considerably more inaccuracies than the article and is unequivocally more hostile. If you'd challenged that feeling maybe you would have learned something?

comment 7y ago · link · parent

If I want to learn F# is there a good IRC/slack channel I can get on? I'd like recommendations for libraries. I have a project I could throw at it for fun/ learning.

P.S.

Can someone explain this?

    // complex types in a few 
    type Employee = 
      | Worker of Person
      | Manager of Employee list

comment 7y ago · link · parent

> Sure, but that's at least an additional piece of security, requiring additional work to bypass.

I would not consider the ability to proxy traffic much of a new capability for attackers. You can do it trivially with a single SSH command. Even a script kiddy with automated tooling should be able to handle this.

Agree that detecting exfil when you have sensitive data is very important though. Just that it takes a lot of work to protect against, and a ton of work to detect.

comment 7y ago · link · parent

Which just means you need to proxy your exfil with a host that has external traffic, such as anyone's laptop, or an edge server.

Of course, now this means you just need to detect that sort of proxying, which may be easier.

Detecting exfil sucks and is hard.

comment 7y ago · link · parent

It's fast. It's type safe. Solid developer tooling story.

Those three things are very appealing, whether it's web or anything else.

comment 7y ago · link · parent

Seems like int generics are the blocker here.

comment 7y ago · link · parent

Thanks, came to the comments hoping someone could point me to code - I wasn't having any luck at all.

comment 7y ago · link · parent

Some HPC features (const fn) made it into 2018, and will continue to be developed.

Out of curiosity, what is missing for you? I'd imagine int generics and const fn, simd. What else?

comment 7y ago · link · parent

I highly recommend the intellij plugin. If you use clion you also get debugger support, I believe.

Autocomplete works well. Macro support is improving all the time, and is pretty solid. Performance needs more work, but is generally acceptable.

comment 7y ago · link · parent

They all need to access S3, which I believe requires public.

comment 7y ago · link · parent

Agreed! I'm much more concerned with VPC performance - I don't have a single lambda outside of a VPC. Firecracker is extremely cool, and I'm very glad to see the improved perf at the VM level, but that's not my bottleneck.

Thankfully, in my case, I have a very steady flow of data so I don't expect too many cold starts.

comment 7y ago · link · parent

I haven't even been using a shim to run my Rust binaries. Just statically link them, and use: https://github.com/srijs/rust-aws-lambda

TBH, I'm very happy to see native support, but it was already super, super easy to use Rust on lambdas without a shim layer.

comment 7y ago · link · parent

Assuming your actors use queues, as they traditionally would, I don't think so. You don't really need service mesh if your communication is a queue, right?

comment 8y ago · link · parent

I honestly don't know. I primarily work in Python professionally. Java before that. I guess of that list C# seems the most tolerable but I have the least experience with it.

comment 8y ago · link · parent

I've been deploying Rust to AWS Lambdas for months for a side project. I chose rust because it's just my favorite language to work in - I'm very productive in it. I also really wanted predictable, solid performance, and Rust is a great fit for that.

I don't really like any of the 3 languages you mentioned though.

comment 8y ago · link · parent

You're right, but it's kind of sad. We value flashy POCs, not robust, safe software. And look at the state of the world right now - garbage software everywhere.

comment 8y ago · link · parent

Seems more like saying "Let's get a bunch of tea drinkers together, who all drink tea for different reasons, and different types of tea, to discuss tea", which sounds like a great thing for a bunch of people interested in tea.

Maybe the fact that there are many split communities is even evidence that a conference would be beneficial. Get some cross pollination of ideas going on.

comment 8y ago · link · parent

I think that kub and, generally, cloud providers have allowed for more ambitious projects to be generally accessible.

My side project is intended to handle > 1 billion events per day, with fairly low latency. That's well over 10k events per second.

I doubt I could do this easily on a single box, and I wouldn't really want to try. Why constrain myself that way? Is it worth just doing this the standard LAMP way?

More and more problems are available to be solved using commodity systems, so we have more and more people solving those problems with these new systems.

1
142143144
164