Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
c-cube
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
151.
▲
by
c-cube
4y ago
C has existed for a longer time, and for historical reasons it's used for some of the biggest and most popular kernels. That makes sense. However, newer kernels don't necessarily stick to C (e.g. Fuschia's kernel is in C++);
152.
▲
by
c-cube
4y ago
Fwiw, OCaml doesn't chase extreme terseness or point-free programming. It's not really equipped for that. OCaml is designed for straightforward code centered on functions, modules, and a mix of imperative and immutable data struct
153.
▲
by
c-cube
4y ago
At this point there isn't strong evidence that C is going to deliver better performance than C++ or Rust, especially for a given amount of work. One could argue that better code reuse (templates, generics, crates, etc.) allow programme
154.
▲
by
c-cube
4y ago
The author is a known C programmer (he wrote redis). You're imagining things.
155.
▲
by
c-cube
4y ago
Who said anything about RAII? Having RAII doesn't make C++ memory safe. If you can take a reference or pointer to some RAII-created vector, and access it after the vector is gone… then you're not memory safe? Yes, SPARK exists, an
156.
▲
by
c-cube
4y ago
Proto3 gained "required" back relatively recently. It's even in use in Opentelemetry proto files.
157.
▲
by
c-cube
4y ago
Ada is cool, but as far as I understand it doesn't give you memory safety in the presence of dynamic allocations? Unless you use recent improvements to spark? It's hardly a superset of the safety features rust has.
158.
▲
by
c-cube
4y ago
Myocarditis is not the only risk when you get covid. You can't conclude that the vaccine is more dangerous than getting covid just based on this one effect; covid has many other dangerous effects on some people, such as destroying your
159.
▲
by
c-cube
4y ago
> It would have been much more interesting to have ladybird written in plain and simple C (with the right compile-time and runtime function tables and NOT compiling with only gcc or clang). Maybe it is not too late to fix that. Quite the
160.
▲
by
c-cube
4y ago
There's also 2's complement, a podcast by the author and a friend of his. It's pretty nice. https://www.twoscomplement.org/
161.
▲
by
c-cube
4y ago
Quickjs exists, and serenity OS' browser (ladybird) show that js engines, and js-able browsers, are doable by developers outside giant corporations.
162.
▲
by
c-cube
4y ago
Denser cities and electric bikes would go a long way. But somehow in the US people only want to go places in a deadly metal box, even to fetch bread.
163.
▲
by
c-cube
4y ago
No offense but that's a wrong take on sum types. Sum types should be baked in the same way basic POD structs are, they're that fundamental. That D still doesn't have them as a core construct (along with pattern matching as th
164.
▲
by
c-cube
4y ago
In the context of generics/templates, it is unrelated. GP is right. C++ templates are duck typed, but with concepts they're now moving towards static contracts on parameters, like rust's trait bounds. No relation to inheritan
165.
▲
by
c-cube
4y ago
I must have missed orientation day. What are the benefits of being a non citizen living in the US compared to citizens, exactly?
166.
▲
by
c-cube
4y ago
Caml was also initially implemented in LeLisp if I recall correctly. :-). An advantage of ML for theorem proving à la LCF is that you can use the type system to enforce some invariants ; namely you can prevent the user from ever building a
167.
▲
by
c-cube
4y ago
I think calling OCaml "inferior" is misleading in 2022. OCaml kept evolving (easier when not bound by a standard) and grew many features way beyond what SML offers. Things like more expressive pattern matching, GADTs, first class
168.
▲
by
c-cube
4y ago
Says you. Lots of people like software that keeps working reliably over the years. I know I do. The only valuable updates to WhatsApp are when new emojis are added ;). For the rest it already works very well, why break it or redesign it?
169.
▲
by
c-cube
4y ago
Ah, thank you for explaining, that makes sense. I think rust people (the ones I know anyway) don't think rust is perfect, or the end-it-all language. There already are a few warts (I'd say async really doesn't have the best
170.
▲
by
c-cube
4y ago
Are you saying that the vector data structure is stupid?! And, moreover, that it's an opinion shared by the python and c++ communities? I'd love to see evidence of that. I'd also love to read arguments about why Vec/vect
171.
▲
by
c-cube
4y ago
What is that thing about vectors that Haskell and python people agree on, but not rust people? I'm genuinely intrigued...
172.
▲
by
c-cube
4y ago
The magic of rust is that it forces all code to go through this static analysis to even compile. You can't avoid it. Even `unsafe` goes through it but with some additional freedom. The language is designed around static analysis, for e
173.
▲
by
c-cube
4y ago
Funny, I have the opposite view. If you have invalid data, you should fail as early and loudly as possible, not wait until it's decoded later and you have no idea where the faulty data comes from.
174.
▲
by
c-cube
4y ago
The wire format isn't great compared to these, particularly in its handling of nested messages. Or rather, non-handling, since you have to encode the sub message to a bytestring. That makes encoders a bit slower (or complex), and you c
175.
▲
by
c-cube
4y ago
Read the book, it doesn't say genes make you selfish. No support for your point whatsoever.
176.
▲
by
c-cube
4y ago
Tree-sitter became somewhat popular after rust reached 1.0, as far as I can tell. I personally find rust syntax pretty neat. It's designed to be unambiguous to machines, but that also means it's unambiguous to humans. It has no ()
177.
▲
by
c-cube
4y ago
Odin and Zig solve almost all the memory safety aspects, except for use after free. Having bound checks, union types, etc. is good and a real improvement over C, but I think that use after free is a memory unsafety issue. It's the on
178.
▲
by
c-cube
4y ago
"computes answers to questions" applies to any system with a REPL. That's really not a technical term at all. If you want to be more precise, you could say prolog tries to satisfy the goal it's passed (via unification an
179.
▲
by
c-cube
4y ago
You don't seem to know prolog well if you consider more "algorithmic" or "procedural" than, say, smalltalk. Sure, it's not 100% declarative, because even prolog is bound by such down-to-earth concerns as perfor
180.
▲
by
c-cube
4y ago
Alright then, what if the architectural style one wants is type-level metaprogramming? Or even just having a rich type system with inference, like Haskell? Can objective-S do that? What about monads, typeclasses, etc. which are arguably pre
More ›