Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
linkdd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
64 ms
·
961.
▲
by
linkdd
6y ago
I've read a lot about Category Theory, and I'm amazed at the abstraction level that lets you compose with different mathematical domains (geometry, topology, arithmetic, sets, ...). And yet, the current mathematics relies heavily
962.
▲
by
linkdd
6y ago
Because when the Javascript engine will try to concatenate all the strings in the Array (the expected behavior of join), it will first translate every object in the array to a string. Javascript always falls back to string, that is also why
963.
▲
by
linkdd
6y ago
Because "list of string" is not a type in Python. Why would you put a method on a class if only a small subset of it can use it?
964.
▲
by
linkdd
6y ago
It is because in Javascript everything can be translated to a string: 1 + "hello" == "1hello" Therefore, the type Array can have a join method that have predictable results (unlike Python).
965.
▲
by
linkdd
6y ago
In Python: ["a", "b"].join(" ") This would mean the type list has a method join, how would it work with the following ? [1.5, "hello", None].join(" ")
966.
▲
by
linkdd
6y ago
Do not underestimate oneliners
967.
▲
by
linkdd
6y ago
I never implied you can't do stuff for fun. Projects done for fun are not "marketed" as "a replacement for X"
968.
▲
by
linkdd
6y ago
I just think there is more crucial project to rewrite than git, vim, etc... At this point, it's just falling for the hype. The same thing happenned with go, es6, etc... "X is better than Y because it is written in Z" is not a
969.
▲
by
linkdd
6y ago
If you do it for fun, or to learn, that is more than fine. But seeing almost every day a new tech "implemented in Rust because X sucks and is not secure" is becoming annoying.
970.
▲
by
linkdd
6y ago
I really don't understand the hate towards every language that is not Rust. Rust provide you tools to avoid many security issues. But that does not mean everything that hasn't been written in Rust is broken by default. You still h
971.
▲
by
linkdd
6y ago
I used libgit2 a lot, the only thing I disliked about it was the lack of documentation (well, the source code is the ultimate documentation?).
972.
▲
by
linkdd
6y ago
I quote the README, in the goal section: > become the foundation for a free distributed alternative to github. > be the best performing implementation This seems ambitious, and not something done for fun
973.
▲
by
linkdd
6y ago
The author proved he knows how to learn, how to search, how to analyze, how to compare two technical solutions. The methodology is there. I don't even care if he doesn't know the language we are using, I care about how he thinks b
974.
▲
by
linkdd
6y ago
When my linter screams at me for not using the correct quotes, I usually think "who cares... it's a string and you know it". I don't really understand why some languages allow multiple syntax for the same thing. But it&#
975.
▲
by
linkdd
6y ago
The amount of work needed to write a secure implementation of RSA (you would surely need a library like gmp to handle big numbers) is not worth my time, I would gladly trade that against some download/compilation time. The same goes fo
976.
▲
by
linkdd
6y ago
If people pull a massive amount of code to use a few functions, the problem is not the size of the code, the problem is the lazyness of the developer who doesn't want to write 3 functions. Same for leftpad-like packages, I don't n
977.
▲
by
linkdd
6y ago
I bet NetBSD will still run on their hardware.
978.
▲
by
linkdd
6y ago
You can use consul-template to generate a config file that lives in-memory (volumes.myvolume.emptyDir.medium = InMemory in a PodSpec).
979.
▲
by
linkdd
6y ago
The plain config file must live in memory (tmpfs). The encrypted config file on a hard drive that is accessed only to decrypt the file to memory.
980.
▲
by
linkdd
6y ago
Using AppRoles and consul-template. And if you're on Kubernetes, you can use https://github.com/sethvargo/vault-kubernetes-authenticator in an init container.
981.
▲
by
linkdd
6y ago
I wonder why you would run a user supplied application without sandboxing it (reset env, user with almost no permissions, ...)
982.
▲
by
linkdd
6y ago
Node's design of Worker Thread, Promise and async/await makes an easier combo than Python + asyncio/trio which requires a lot of work to get it done. But in the end, use what works for you, and if you need performance, you st
983.
▲
by
linkdd
6y ago
I'll try to explain why I strongly disagree with the FAQ: > this is easier to type (no parenthesis) and more readable When 99% of the open-source codebase uses "<=" as lesser-than-equal, no it is not more readable to ch
984.
▲
by
linkdd
6y ago
This. Too often I've seen companies stuck with an old framework just because their developers are used to it. That's how you get a microservice architecture in Java where each containers takes 300MB of space, and requires 1GB of m
985.
▲
by
linkdd
6y ago
Sorry, what I meant was: Is it the Python you want in your browser? So, this is just another implementation with its tradeoffs, just like when using Jython to have Python (without its ecosystem) and the JVM. Here you have Python with anothe
986.
▲
by
linkdd
6y ago
Because you can write bad code using a pattern does not make it an anti-pattern. Thanks to ES6, the async/await keyword for Promises help you get rid of the callback hell that Javascript can easily be. Python support of asynchronous co
987.
▲
by
linkdd
6y ago
Functional programming constructs helps you write simple code faster, and clarify the algorithm. It is easier to rearrange, to test and to reason about, but it is harder to read. Once your fast-written code works, you obviously need to opti
988.
▲
by
linkdd
6y ago
What is this monstrosity in the tutorial ? >>> document <= 'Hello!' # write in the DOM Since when the __le__ method has any side effects? So to sum it up: - it runs inside the Javascript VM - you change the syntax by
989.
▲
by
linkdd
6y ago
that's called changing your habits. In 6 months when your eyes remember where are the pertinent information, you will say the same about the old UI. More information is displayed in a more concise way since the update.
990.
▲
by
linkdd
6y ago
It is a different kind of equality.
More ›