Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
linkdd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
71 ms
·
871.
▲
by
linkdd
6y ago
What I need from migrations is collaboration. When I make a schema migration locally and push it to the repository, then 3 other PRs with their own migrations are being merged before mine, it is very likely that my local database will be in
872.
▲
by
linkdd
6y ago
> filter doesn't even change the types of its arguments But map, which 90% is used after filter, does. const foo = client.someRequest() .filter(item => /* some condition */) .map(item => /* some tran
873.
▲
by
linkdd
6y ago
I wanted to use the LLVM Rust bindings to generate LLVM IR, but I still need to do some more reading on how to represent high-level constructs in such a low-level language. Also, generics and type inference is hard to implement! :p I don&#x
874.
▲
by
linkdd
6y ago
I used the pest[1] library in Rust, it uses something a bit like an EBNF syntax to write the grammar and generate a PEG parser. [1] - https://pest.rs/
875.
▲
by
linkdd
6y ago
I think we should strive for strong type systems with a lot of type inference. I especially like Typescript for that. Type systems are very useful to establish the semantics of your operations. For example `int + int` is not the same operat
876.
▲
by
linkdd
6y ago
Funny that the solution to read the SVG is to not read the SVG.
877.
▲
by
linkdd
6y ago
I had to zoom out to 25% of the original zoom level to see anything.
878.
▲
by
linkdd
6y ago
Exactly, how a human is supposed to read that?
879.
▲
by
linkdd
6y ago
I've found that the brain is the best at long-term knowledge aggregation. Because it all boils down to retrieving the information. And the brain is very efficient at retrieving information quickly (I can recite poems learnt in school 2
880.
▲
by
linkdd
6y ago
In a good documentation, IMHO, you must answer the following questions: - where can I find this functionality? - how is it done? - why is it done this way? You can do a lot with descriptive schemas, take a look at C4 models[1], t
881.
▲
by
linkdd
6y ago
In Kubernetes there is the "Desired State", which is the sum of all resources (your yaml files) and the "Actual State". Whenever a change is requested on the "Desired State", Kubernetes will validate it (using
882.
▲
by
linkdd
6y ago
One advantage of that kind of control is that your code does not depend of the implementation of any abstraction (except the operating system if any?) since everything is written "in stone". I also think it makes a great learning
883.
▲
by
linkdd
6y ago
That's because the Zig approach is "no hidden control flow". Everything in Zig is explicit, this is not a downside, this is a feature of the language. Choose the tool that best fits your needs.
884.
▲
by
linkdd
6y ago
One of the best thing about parser combinators is that I was writing them before knowing what it was. My first programming language being C[1], all you had was functions and composition, it's the natural pattern to write parsers. [1] -
885.
▲
by
linkdd
6y ago
> it seems to be the perfect solution/replacement for C/C++ Many languages tried for 50 years to replace C without success. While Rust brings many improvements for low-level development on classical architecture, simplifying ha
886.
▲
by
linkdd
6y ago
Horde uses a CRDT[1] (Conflict-Free Replicated Data Type) to provide a distributed Supervisor/Registry, this allows you to run an OTP supervision tree only once in your cluster, with automatic takeover. Basically, you run your supervis
887.
▲
by
linkdd
6y ago
> it's basically a single-language Kubernetes Well, yes and no. By using Kubernetes, you get a scalable infrastructure. By using OTP/Akka, you get a scalable application. While there is common problems to both domains, they are
888.
▲
by
linkdd
6y ago
Every social place has its own "traditions" if I dare use this term. Twitter is not really a place for debate (more for rants IMHO), but HN is. And not every one wants to debate and that's cool. What I enjoy the most on HN is
889.
▲
by
linkdd
6y ago
I feel more and more than HN comments is not for every one and not for me. If you're not careful with your wording, you'll get flagged and your message will be dismissed and it seems futile to argue against it. This creates an &qu
890.
▲
by
linkdd
6y ago
Yes, that's exactly why I wrote: > some game engines and > simple games A 3D game is not a simple game.
891.
▲
by
linkdd
6y ago
Let's say you have two 4 bits integer to form an 8 bit decimal number: 1111.1111 is (1 + 2 + 4 + 8) + (1/2 + 1/4 + 1/8 + 1/16)
892.
▲
by
linkdd
6y ago
I never use the square root in games, I always compare squared distances (since the properties are the same). If you try to do with Fixed Point Arithmetic what was intended to be done with Floating Point, you're the problem. A 32 bits
893.
▲
by
linkdd
6y ago
I never said it was easier and I never said ALL game engines. And computing integers IS faster than computing floats, at least on a CPU.
894.
▲
by
linkdd
6y ago
In some game engines, Fixed Point Arithmetic is used instead of Floating Point, because it's faster, and the approximation is generally good enough for a game.
895.
▲
by
linkdd
6y ago
Calling other programs from any other language than Shell ones is a pain. Piping the output of one program to another without a "pipe" operator is a pain. Redirecting stdin/stdout/stderr is also a pain without ">
896.
▲
by
linkdd
6y ago
Unfortunately no. IIRC, all "RequireComponent" does is allow you to omit the "add(object, B)" when you "add(object, A)". A simple example of this is when you add A to the object, then edit A to require B. The U
897.
▲
by
linkdd
6y ago
In C# and Unity, you have the class attribute "RequireComponent" which will automatically add the dependent "MonoBehaviour" when this one is added: [RequireComponent(typeof(RigidBody))] public class MyObject : Mono
898.
▲
by
linkdd
6y ago
> The difference is the syntax is structured more like Java's `try` and `catch` blocks Which is a big plus, but the most interesting part to me is the "if" behavior you implemented. !if { foobar } then { ... } Which
899.
▲
by
linkdd
6y ago
This looks great! I'm highly interested about the error handling and testing baked into it. Moving away from the most common shell syntax is a bold move, but not necessarily a bad one, shell scripting needs some fresh air :)
900.
▲
by
linkdd
6y ago
Back in the day, I created my packages manually (creating the TAR archives, the preinstall/postinstall scripts, and putting all of that in an AR archive, renaming it to .deb). I never even read the documentation, I just did: $ file
More ›