13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 7y ago · link · parent
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
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
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
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
P.S.
Can someone explain this?
// complex types in a few
type Employee =
| Worker of Person
| Manager of Employee listcomment 7y ago · link · parent
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
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
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 8y ago · link · parent
I don't really like any of the 3 languages you mentioned though.
comment 8y ago · link · parent
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
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.