Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 8y ago · link · parent

As RussianCow said, I think you're misreading my post. A Python variable, from a type perspective, is a variable with a type Any/ a type that is a union of all possible types.

Using annotations you can then specify the type.

Nothing to do with weak/ strong, which merely imply some level of implicit casting.

comment 8y ago · link · parent

> In static languages expression have type. In dynamic languages values have type.

I don't think this is true. In a dynamic language all values, including expressions, share a single type - a union of all possible types. In a static language you can limit which possible types a value may hold. A dynamic language is like if you cast every single type to Any in a static language.

In Python this is entirely possible with mypy - a static type system for the Python language, which works through annotations.

> in static languages they are used to prevent the compilation of programs containing expressions where types don’t match up.

This is already the case with mypy in Python. It seems very much static. It's like everything is statically determined to be Any, then you specify in certain areas a more limited type.

In your case with Julia, the type annotations are static. Even if by default Julia is dynamic, it allows for static annotations.

I disagree that there is no in-between. I think Julia is actually a great example of an in-between. And, in fact, it has a name - gradual typing.

comment 8y ago · link · parent

I don't think they compensate so much better than other similar companies. Their vesting cycle sucks too.

comment 8y ago · link · parent

Sad to see this post downvoted when it seems obvious.

If you work for Amazon as a developer make this issue known. Few people have as much power to impact the company as a group of developers - we all know what a pain in the ass it is to hire.

I'd never work at Amazon knowing how it treats its workers. Given the market we're in I don't get why others would - if you work for Amazon you should be able to jump ship for another good company.

comment 8y ago · link · parent

OK, but then can the python community stop saying "Pretty much all of the packages are converted anyways!" if the answer is really "we don't care anymore if your aren't" ?

comment 8y ago · link · parent

How many secrets do you have? Even with thousands this doesn't seem expensive, and if you have 1000's you're probably mature enough to pay a bit.

comment 8y ago · link · parent

Making upfront, definitively costly investments in order to avoid potential negative future consequences, is a hard one to justify.

Especially when the future consequences barely exist. It's very rare for a breach to have serious impact on a company, relative to other areas the company could invest.

comment 8y ago · link · parent

Seems like they're just trying to be clear.

It's not uncommon to retain logs like that for debugging purposes, abuse prevention purposes, etc, but then to go back later and wipe them or anonymize them.

comment 8y ago · link · parent

Brings me back.

comment 8y ago · link · parent

They're talking about move semantics, not actual memory moving around.

In c++ you get copy semantics by default, requiring std::mov to get move semantics. In rust it is the opposite.

comment 8y ago · link · parent

Yeah, that makes a lot of sense to me. Thanks.

comment 8y ago · link · parent

Sweet. Thank you.

comment 8y ago · link · parent

> in that it follow's C's spirit of simplicity and clarity at the expense of power and expressiveness

Wow, I strongly feel the opposite about C. It is hardly simple or clear - understanding what your code will do after the compiler's done with it seems almost impossible, reasoning about runtime behavior similarly so. The complexity involved in managing memory, etc, is so significant.

But it is extremely powerful.

I see go as being extremely simple, but also very weak in terms for expressiveness, relying on the runtime for memory and concurrency management.

I agree that Rust has more in common with C++.

comment 8y ago · link · parent

Not without external tooling, as far as I'm aware.

With rust this is built into the default tools installed by rustup.

comment 8y ago · link · parent

> In technological terms, it is old.

Really? This doesn't seem true at all. I feel like it takes decades for many good ideas in tech to get traction, usually going through many, many failed iterations.

comment 8y ago · link · parent

Or it's completely unrelated.

comment 8y ago · link · parent

Good to know, thanks.

comment 8y ago · link · parent

> This seems likely to poke a big hole in ASLR if nothing else. It’s a huge target for write-what-where exploits.

How? Is it mapped to a static location?

comment 8y ago · link · parent

Thanks for writing this. Actix is really cool but I haven't really spent the time looking into it - I was unaware of the SyncArbiter abstraction.

This is a very helpful post for me.

comment 8y ago · link · parent

Nonsense to you is wonderful to me. I don't think "I am unfamiliar with this syntax" is really a useful observation - Erlang has an extremely unfamiliar syntax, but I don't think that makes it less suitable for building a service.

To answer your question more directly (though I feel the article covers these points), as someone building services in rust, there are a few reason I'd choose Rust over the languages you listed:

a) Largely deterministic performance

Having written services professionally in Java I have seen performance scale linearly with connections, until one day it suddenly spikes massively - why? It was that we crossed some threshold where the GC was suddenly having to do a ton more work, which caused a serious feedback loop - server has to pause, clients don't handle it well, clients hammer server more, server has to pause, etc.

You can have similar issues in Rust but they should be easier to spot (they should be less blow-up-y).

b) Correctness/ Expressiveness (is this a word?)

I find it far, far easier to write correct, expressive code in Rust. For example, I think anyone who has moved from Java 6 to 7 or 8 will admit that Optional is awesome - because it is. In Rust the pattern exposed by Optional is first class, and extends far beyond nullability. This is just one example though.

I find it extremely easy, by comparison to other languages, to write Rust code in a 'type driven' way, and in my experience this is a huge part of (me) writing code with fewer defects.

As the linked article puts it:

> Constraints like a compiler and a discerning type system are tools that help us to find and think about those edges.

comment 8y ago · link · parent

Not in Plaintext. But yes, Java has some extremely optimized libraries for HTTP, and a great GC has a lot of advantages for this sort of benchmark I'd imagine (short lived allocations, deferred collections).

That said, actix is particularly new, with room to optimize.

comment 8y ago · link · parent

I don't see how Dropbox is related to rainbow tables - presumably KeepassX uses a salt.

comment 8y ago · link · parent

I just want to be able to say "do this thing or time out in 5 seconds", and that's like all the 'async' I need in rust. Everything else, nah.

But that's just me - many people need these 0 cost abstractions, this is Rust's focus, and I'll have to wait for the higher level stuff for my projects.

comment 8y ago · link · parent

> Two employees need to be able to have a healthy, discrete conversation about working with the boss without having to worry about a transcript of the conversation pop up in a performance evaluation later in the year.

If you are worried about this, the issue isn't Slack. I don't worry about my boss reading my slack DM's - I'm well aware of what process would be involved there (my boss would be fired immediately, and wouldn't even have access without Legal involved). If you're worried about your company 'snooping' on you that's an underlying, unrelated problem.

comment 8y ago · link · parent

No one is watching you or treating you like a child. This is important for security and legal reasons.

Insider threat is a serious, real world problem - consider employee harassment, exfiltrating data, sharing secret information, a compromised slack account DM'ing people malware, etc.

No one wants to read your messages, and it's probably a small set of people that even can.

comment 8y ago · link · parent

That really doesn't feel like it's inherent to Lambda at all. You could say the same thing about EC2.

On top of that, many of AWS's services use standard API's. It's not hard to move away from RDS or Elasticache, you're just using SQL/Redis anyways...

If we're talking about something like SQS, ok, well you can just as easily say you're "locked in" when you use RabbitMQ because there is work involved to not be using RabbitMQ.

1
151152153
164