We haven't touched Swarm and are staying a couple versions behind. With that said, we're pretty happy with the setup right now.
1,392 karma · joined January 20, 2013
We haven't touched Swarm and are staying a couple versions behind. With that said, we're pretty happy with the setup right now.
It's useless. So the free streams that are available are amazing.
So for '1 + 1', you can't just output some fast x86 instruction and inline it. You'll usually need to jump to where the python vm will do 'a + b' in C. You're having to do a bunch of redundant work at a higher level to emulate the CPU (sorta).
That's why you have JIT compilers that will read '1 + 1' and compile the appropriate machine code, store that in an executable memory region and jump to it. First time might be slow, but after that it's pretty fast. Because you need to jump to the dynamically generated code, you usually compile whole functions at a time.
This topic is super complicated but also super interested but I tried to simplify it a bit here.
Rustdoc isn't perfect, but it's pretty easy to find things imo.
Traditional enums aren't particularly interesting. What languages like Rust and Swift have are tagged unions. They let you associate data with each variant.
Moreover, pattern matching is needed to use tagged unions effectively.
Constants are not "basically" tagged unions or even enums. They are not grouped into a parent type. For example, if you have a `Foo` enum with `A` and `B` variants; while matching or accepting this, you can accept a `Foo` which is guaranteed to be either `A` or `B`.
How would Go typed constants achieve this?
This has not been the case for many people using Rust, including myself. Once you learn the language, there is no "cost" to use it. In fact, the compiler simplifies much of the mental overhead when dealing with concurrency, sharing data, mutability, etc... Sure the compiler has some strict rules, but it's not expensive to develop in by any means.
I would also say Rust is in a sense higher-level than Go in terms of expressiveness and abstractions.
It is, however, easier to use, but the context switching and stack overhead would be too great at anything close to 10M connections.
- More compiler complexity - Compilation speeds might be effected - Without type inference, type signatures could be a pain point - Basic type parameters are not able to express all intents. Until you implement more complex like higher-kinded types.
Go's compiler already works with generics, although it might be built in an ad-hoc way. Either way, the complexity is seemingly already in the compiler.
Before saying "Compilation speeds might be effected", we should probably get some numbers to back that up. So I don't buy this cost right now.
The third reason is very valid as Go doesn't have type inference. You probably won't get Java's verbosity with signatures but you'll be specifying type information in a few places, at least.
You can't say the same about encryption because it's a tool, not a weapon. A gun is a weapon meant to kill.
> 2. Compromises will just lead to defeat for the pro-encryption / pro-gun side.
A compromise in encryption hurts everybody. The whole platform for electronic banking needs strong encryption, for example.
> Consequentialism: the number of people being harmed by encryption/guns is smaller than the number of people who would be harmed by living in a world without encryption/guns.
If you own a gun you are statistically more likely to get shot or killed.
Please explain how .map, .filter, .reduce, .pmap are complex?
Swift is also built with LLVM, a backend that is far superior to Go's handmade one. I doubt the performance issues will persist long-term.
That's not a reason not to include generics, however. It's an entirely different problem.
There has never been an argument on how concepts like .map, .reduce, .filter, functors, promises, futures are inferior to what Go programmers currently use. Things like simplicity are thrown around but calling these proven abstractions "complex" is wrong. That's why they're useful fundamental abstractions -- because they make code simpler and reusable.
Generics have been around for a very long time. They have been studied in-depth in academia and industry. They're universally accepted but in Go.
Generics need not be like C++ templates. There are simpler implementations of generics. They are a solution to a real problem, specifically in libraries and creating type-safe abstractions. If you don't want type-safety, then why are you using a language with static types?
- Code copying is a workaround, not a solution. - Code generators outside the compiler is a workaround, not a solution. You're essentially transpiling a language that is no longer Go into Go because of Go's lack of support for such things. - interface{} is a workaround, not a solution. It automatically shows that Go cannot express a generic variant safely. - reflections is a workaround, not a solution. See previous point.
If the Go community is happy with these workarounds than that's cool, but be honest that's it's a workaround, a stop-gap to the lacking of Go's type system.
This means if you observe the inner system, you won't be seeing exactly-once semantics but looking at the system from the outside, the semantics would indeed be exactly-once at the target.
As the parent illustrated, even with Go using nonblocking I/O, it's perceived benefits in that area isn't that great because Go still semantically has a thread-per-connection. So the performance characteristics of Go isn't simply async vs sync I/O.
struct RouteUser {
route: &'static str,
f: fn(_: &mut Request) -> PencilResult
}
Then given #[route("/user")]
fn user(_: &mut Request) -> PencilResult {}
You would hijack the `user` function to return an instance of the struct. fn user() -> RouteUser {
// The actual function the user wrote:
fn user(_: &mut Request) -> PencilResult {
// ...
}
RouteUser {
// Generated from the annotation argument
route: "/user",
f: user
}
}
There is a difference between item decorators (`#[foobar]`) and regular procedural macros and I'm not completely sure if you could in-fact significantly change the given function. I haven't touched procedural macros in a while.To use the above route, you would simply have a `Route` trait perhaps.
trait Route {}
And implement it for each generated struct: impl Route for RouteUser {}
Then you could use the route as app.route(user());
Which could be defined as fn route<R>(r: R) where R: Route {
// ...
} #[route("/foobar")]
fn user(_: &mut Request) -> PencilResult {
// ...
}
However, procedural macros are unstable, but Rust is able to do amazing things with macros.I used to jump at Eden North in Canada, but I'm moving to North California so I have to pick a new one :) Gotta love a Cessna Caravan going to 13K in under 9 minutes!
They'd need to considerably improve the quality and features if they want people to continue upgrading.
"It's ridiculous that in this day and age, people have to worry about their internet usage like it's some kind of limited resource."
The caps are driving additional zero-rating services.
He also doesn't fluff anything up or over sell anything. He tells the facts in a way people can understand and that's it.