Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alerighi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
53 ms
·
541.
▲
by
alerighi
5y ago
That is a nightmare. You are telling me that the size of the stack of a function now depends on the fact that I modify an argument? Also, you are masquerading an access trough a pointer as a direct access to some data. An access trough a po
542.
▲
by
alerighi
5y ago
> The code the compiler generates must have the same final result, but it doesn't have to actually work the same way. It doesn't, but when it comes to debugging, it would help to have them similar.
543.
▲
by
alerighi
5y ago
Do really programmers in the US get all that money? I mean, I don't even get the money that a secretary gets... and in Europe, not in India
544.
▲
by
alerighi
5y ago
Also compilers nowadays are smarter and can perform link time optimizations. Meaning that if of a library you only use a single function, in the final executable you would only get that single function. In reality code that use static linki
545.
▲
by
alerighi
5y ago
A modern smartphone has more RAM than most computer that people use to do actual work. I mean I see around a lot of people that uses computers with 4Gb of RAM, and the standard nowadays is 8Gb for Android phones. Even with disk space, nowad
546.
▲
by
alerighi
5y ago
To me that is an argument that doesn't make any sense, at least on Linux. It could make sense if we talk about Windows or macOS, where you typically install software by downloading it from a website and you have to update it manually.
547.
▲
by
alerighi
6y ago
Or we should stop thinking about processing packets with hardware. Does it still make differences these days? Designing hardware for a single purpose most of the times is not a good idea. That means that you are stuck with the implementatio
548.
▲
by
alerighi
6y ago
4096 can be too much for unstable connections, for example Wi-Fi or mobile. Also, 4096 bytes at what level? Layer 2? And when you are using a tunnel, you add bytes and thus have to go higher than 4096 or go lower and reduce MTU, or fragment
549.
▲
by
alerighi
6y ago
Everyone that uses chats for serious business. I can't afford to loose conversations with my clients. For that I use only messaging systems that allow me to save chats: email, and then WhatsApp. Even Telegram has a problem, because eve
550.
▲
by
alerighi
6y ago
All of this is true, IF you assume that you want Unicode string. That, especially on system/embedded software (the kind of software that Rust is targeting) you don't really care about Unicode and you can simply treat strings as ar
551.
▲
by
alerighi
6y ago
It's not the same as third party cookies! Third party cookies works only if: a) every site you visit loads some Google/Facebook/whatever JavaScript to track you. That are not all sites. b) you didn't disable these script
552.
▲
by
alerighi
6y ago
Only Chrome on Android alone accounts for a big percentage of web traffic. Android is the most used mobile operating system, and nowadays there are more users that browse with a mobile device than users that use a PC. Beside that, a lot of
553.
▲
by
alerighi
6y ago
That code is ugly anyway, something I would have wrote in middle school... why not: function check(x) { return test1(x) && test2(x) && test3(x) && test4(x); } Or, since I assume is JavaScript, ju
554.
▲
by
alerighi
6y ago
Depends on what you are doing. Init scripts where simpler because the boot process was well defined, meaning that you had all your scripts in rc.d that were executed in that particular order. Now with systemd is more difficult to have somet
555.
▲
by
alerighi
6y ago
Well, never seen any reason to use -a or -o. To me they are less clear and you are prone to error. I find things like: [ "$a" = "$b" ] && [ "$c" = "$d" ] much more clear.
556.
▲
by
alerighi
6y ago
You can have other shells that are not bash, true. But you are guaranteed to find a bash shell in any Linux distribution (well, except minimal distros like OpenWRT or Alpine Linux that for saving space use busybox). Let's say that in a
557.
▲
by
alerighi
6y ago
For small scripts, bash is still the easier way to go. Other programming languages are not that immediate to do simple things. How many lines of code take piping a command into another in python, for example? Also bash is not portable, but
558.
▲
by
alerighi
6y ago
switch (Math.floor(version)) { case 1: return 'result_1'; case 2: return 'result_2'; case 3: return 'result_3'; default: throw new Error('...');
559.
▲
by
alerighi
6y ago
If you have a chain of conditions what you do? if (condition1) { // something } if (!condition1 && condition2) { // other stuff } if (!condition1 || !condition2) { &
560.
▲
by
alerighi
6y ago
For desktop computers it makes sense. I find that hybrid hibernation gets the best of the two world. I can have the PC in sleep and have it turn on faster, or if the PC looses power you don't loose anything. A thing that I do often is
561.
▲
by
alerighi
6y ago
You can make it a static binary and thus make it portable on all distributions that have a minimum specified kernel version. Or you can use formats like AppImage that are designed to encapsulate a program into an image that can be run as a
562.
▲
by
alerighi
6y ago
If I can't get a Signal server running myself, or if I can't compile the Signal client and install it on my phone, what's the point of being open source? They could release a version of the server codebase that is not the pro
563.
▲
by
alerighi
6y ago
These systems in my country are still used a lot. Go to a store, look behind the counter and you will see Windows 10 with opened only a maximized window of a green/black terminal connected to an AS/400. I've seen it even on s
564.
▲
by
alerighi
6y ago
We have to distinguish websites from web applications. Websites have no reason to use JavaScript. They should be a collection of documents, possibly generate dynamically on the server side, but to the user HTML+CSS that can be viewed in a b
565.
▲
by
alerighi
6y ago
There are many reasons why having SPA and rendering your site on the client is a bad idea. First, you are basically breaking the concept of the web, a collection of documents, not a collection of code that must be executed to get a document
566.
▲
by
alerighi
6y ago
Why having paths in a production binary? I mean, for debug binary kind of makes sense, but for production doesn't make any sense at all. As I understand even stripping the binary doesn't solve the issue. This is not only a privacy
567.
▲
by
alerighi
6y ago
And look at the other side. If this wasn't true, a law can reference a copyrighted material sold to a ridiculous price.
568.
▲
by
alerighi
6y ago
Command line parameters should be used for things that change frequently, not for configuration variables. You don't want to pass 20 command line parameters every time you invoke a program. You rather want to set your environment varia
569.
▲
by
alerighi
6y ago
Using robots.txt to avoid search engines indexing the page is the most stupid thing you can do. Not only it's not mandated by law that search engines have to follow the rules in the file, but also you are giving to the public a known f
570.
▲
by
alerighi
6y ago
The problem is not the language! If C is not sufficiently safe for you, you shouldn't take planes, or drive cars, or rely on medical devices, because the software of all these critical embedded system is written in C. The problem is on
More ›