136 karma · joined August 11, 2014
,first=conditionIsn’t that comparable to java? Oracle gives you paid security updates on version 8. You can keep using the previous version without security updates or migrate to OpenJDK 8, which have their own security group. More options, seems better to me.
I understand your point, but to me that is exactly the case. It requires the extra "mut" (harder to reach) and is inconvenient to use (more compiler errors).
My point is; Rust gives you the choice. If you need mutability due to performance, or something like that, you can have it (at the cost of simplicity and convenience).
Also, "dangerous behavior" is not allowed, in this example threads sharing mutable and immutable reference to the same object.
Then, do not mark your variables as mutable. This error only happens if you use `let mut variable_name = ...`
AFAIK, `let var`, e.g. immutable variables, behaves the same as in clojure.
> Servers can also notify clients whether "credentials" (including Cookies and HTTP Authentication data) should be sent with requests.
https://changelog.com/news/a-ui-framework-without-the-framew...
Edit: Would of course not be a spoofing attack.
Regarding the comparison in source bytes, here it is:
minified lit-(element + html)[1]: 21.4k
I'm not sure it "amortizes" svelte when having more components, when runtime in hello world example is less then 8x size. Would love to see an example. Tried finding lit-element in "Real World Example" [2], but did not find it. Maybe you have some pointers?
1: https://bundlephobia.com/result?p=lit-element@2.2.0
2: https://www.freecodecamp.org/news/a-realworld-comparison-of-...
Why gzipped? Bytes of source is a fairer comparison. Parsed source code should be the comparison, not transfer time.
> HelloWorld doesn't use much, so it'll be small, but most component are not HelloWorld and most applications will not have only a single component.
Then why dare other to compare sizes of a Hello world example? :-)
Compared with svelte from the article:
<script>
export let name;
</script>
<style>
p {
background: pink;
}
</style>
<p>Hello {name}!</p>
# Size comparison## lit-element
lit-element.js?module: 8421 bytes
lit-hello.js: 340 bytes
## svelte
bundle.js: 2628 bytes
bundle.css: 72 bytes
The code you write in Svelte is reactive/declarative, emitted code is regular imperative JS.
For others having trouble to grok that sentence, ! is the never type. Should never happen. https://doc.rust-lang.org/std/primitive.never.html
Yes, a thread pool, consisting of one thread per core/computing unit. The units of work are then scheduled between the threads. Units of work here being some kind of IO, e.g. servicing HTTP requests.
> but if you want to spin up a few hundred thousand of them...
Hm. Thought there was a limit for work that can be done concurrently by the CPU, based on the number of cores/hyper-threads available. Found this on threads and IO performance [1], it seems to make the same point.
What kind of work load is common to spread over so many threads (on the same machine)? Does the OS switch efficiently between hundred of threads on regular CPUs? Genuinely interested.
1: https://www.jstorimer.com/blogs/workingwithcode/7970125-how-...
Yes, the code the developer needs to read, write and understand.
I'm not familiar of how async/await will be in Rust, but I guess some code differences/complexities can be:
1. Make sure, manually(?), that all things are async / non-blocking.
2. Implementing Future.poll / wrapping types in Future? (What is Pin? ref https://rust-lang.github.io/async-book/execution/future.html)
3. Async polution, a function that uses async must be async too?
4. Setup some scheduler that maintain how many concurrent async operations one thread has?
5. More verbose error-messages / stack-traces?
Skimmed through https://vorner.github.io/async-bench.html. If I understand it correctly, one get about twice the performance with async.
Is this correct? Seems like a compromise (code complexity vs performance) not worth taking.
1. Cost per charge << per tank, and
2. cost credit car reader >> rfid reader.
Suppose an app which does not really needs file permission to work, like Facebook, but asks anyhow. If you opt out, you cannot access the app.
That pattern does not need to exist.