Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pkolaczk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
50 ms
·
631.
▲
by
pkolaczk
6y ago
Initial price tag: ICEs and HEVs win by a large margin Acceleration: depends, not all EVs are Teslas; additionally this is a moot point, because we're not comparing race cars, and you'd be blocked by traffic anyways most of the ti
632.
▲
by
pkolaczk
6y ago
If you assume using public chargers, then the cost-per-mile calculation needs to be updated, because electricity prices at the charging stations are much higher than the cost of electricity at home. Here where I live, in Poland, the differe
633.
▲
by
pkolaczk
6y ago
Here in Poland, if you charged at a charging station, it would cost you twice MORE than refueling a classic HEV, and it would also take longer - so overall less convenient. If you don't plan to charge it mostly at home, it will never p
634.
▲
by
pkolaczk
6y ago
Electronics is cheap and easy to replace. If properly designed and protected from heat and water - practically doesn't wear out. Mechanical problems like corrosion of structural parts is almost always uneconomical to fix.
635.
▲
by
pkolaczk
6y ago
It can be actually tied pretty well to business logic. You can explicitly model some business rules, e.g. a subscription cannot exceed the lifetime of the user account, etc. Similar to how you can use static type system to prohibit invalid
636.
▲
by
pkolaczk
6y ago
Maybe I'm weird, but I find the explicit ownership, mutability and lifetime information encoded in Rust definitions very helpful at understanding a new code-base. Something that otherwise needs to be documented in comments / exter
637.
▲
by
pkolaczk
6y ago
> And of course, the long list of disadvantages, the most obvious of which is inflexible and slow development This claim requires some data to back it up. I know at least a few people (including myself) who are more productive in Rust th
638.
▲
by
pkolaczk
6y ago
You can write Perl in any language. Lack of expressive power in the language can also lead to a disaster. Sure, Java maybe doesn't have a fancy typesystem and macros, but then the same kind of clever developers use runtime reflection a
639.
▲
by
pkolaczk
6y ago
If you are forced to write pure C (or a very low level subset of C++) , then that is often because: - you need every tiny bit of performance, - you optimize for low executable size or low memory footprint (e.g ATTiny13) - you have an exotic
640.
▲
by
pkolaczk
6y ago
"Developer productivity is through the roof though." I learned Python after I learned C, C++, Java, Scala, Rust and a few others. I fail to see my productivity going through the roof with Python. It's quite the opposite. Writ
641.
▲
Estimating Benchmark Results Uncertainty
(pkolaczk.github.io)
2 points
by
pkolaczk
6y ago
|
0 comments
642.
▲
by
pkolaczk
6y ago
> Your code might contain some basic security errors that you would have avoided had you gone with a stable, vetted framework On the flip side, stable and vetted popular frameworks also have security problems; and although these problems
643.
▲
by
pkolaczk
6y ago
Of course you can call C functions, but it is neither ergonomic nor performant. And good luck exchanging more complex data structures. Java can't use C structures directly, Rust can.
644.
▲
by
pkolaczk
6y ago
A lot more than Rust? Do you count the whole embedded, low latency and scientific computing? As far as I like Scala, I don't think it is better in these areas than Rust. Even the async I/O libraries are more advanced in Rust than
645.
▲
by
pkolaczk
6y ago
> ... and scalac is as slow as a C++ compiler Scalac is as fast as Javac if you don't overuse Scala-specific features which are known to compile slowly - implicits and macros. But it is unfair to use these features and than complain
646.
▲
by
pkolaczk
6y ago
Seriously? How to do data structures: 1. just put everything ad-hoc into a dict or a list (the "PHP" way :D) 2. use a namedtuple 3. define a class 4. define a dataclass (preferred) but works only if your Python version is recent
647.
▲
by
pkolaczk
6y ago
> But when you're in a team, or worse, in a large company, it starts to be a problem that everyone can use their own style I was in many failed or semi-failed projects and code style was never the problem. Yes, people do use sli
648.
▲
by
pkolaczk
6y ago
Having switched from Scala to Python recently, I must say Python has probably 5x more ways to do things than Scala and I can't see people complaining on Python's complexity. This is something that really surprised me, because &quo
649.
▲
by
pkolaczk
6y ago
Rust is a great language, and Scala is a great language, but they are different. They optimize for a different thing. Rust definitely rocks at high-performance, resource management, fine grained control over all the aspects of the program,
650.
▲
Benchmarking Apache Cassandra with Rust
(pkolaczk.github.io)
1 points
by
pkolaczk
6y ago
|
0 comments
651.
▲
by
pkolaczk
6y ago
50% faster and 150% more expensive are numbers my experience doesn't agree with. First, programs coded in Rust are typically nowhere near 50% faster than the ones coded in managed languages - I observe 500% to 5000% differences. And it
652.
▲
by
pkolaczk
6y ago
For things like string processing and data analysis I find Scala much more productive than Python. There are REPL / notebooks for quick iteration just like in Python, but static typing helps tremendously with getting things right the f
653.
▲
by
pkolaczk
6y ago
The worst case for a hashtable degenerating to a linked list can be often exploited to form a DOS attack. It is enough that user controls the keys inserted to the hashtable and the hash function is not cryptographically secure (typically th
654.
▲
by
pkolaczk
6y ago
Google is a huge company and the majority of its employees are not contributors to ISO C++.
655.
▲
by
pkolaczk
6y ago
2 - and your link only shows that Go, Java and C# have substantially lower performance than C and Rust on this task. So that doesn't refute my point. As I said, the whole trick relies on the fact that these languages don't need so
656.
▲
by
pkolaczk
6y ago
Sure, but then when they finally ship Valhalla you'll still need to rewrite your 4M LOC Java app to use value types ;)
657.
▲
by
pkolaczk
6y ago
1 - The tradeoff between latency, throughput and memory-use of tracing GCs is universal and language-independent. Some implementations may be better than the others, but I haven't seen an implementation that is good in all three aspe
658.
▲
by
pkolaczk
6y ago
Very subjective. I find Python much less productive than Rust. Easy to learn != productive in the long run.
659.
▲
by
pkolaczk
6y ago
When Java came out, and later when C#/.NET arrived some people did the same with them. Nihil novi. It is often easier to get decent performance in tiny projects or micro-benchmarks, simply because you can spend so much more time on opt
660.
▲
by
pkolaczk
6y ago
VSCode, Slack, Intellij Idea, some random JS on a website - indeed all C++ programs. I'm not arguing against GC, but more about the philosophy of saying that only 2% programs need a good level of performance. It starts from using GC in
More ›