0xdead | 6 years ago | on: Why are we so bad at software engineering?
0xdead's comments
0xdead | 6 years ago | on: Firefox 73
0xdead | 6 years ago | on: A Teacher Did an Experiment to Show the Power of Handwashing
0xdead | 6 years ago | on: Critical Bluetooth vulnerability in Android
0xdead | 6 years ago | on: ZZ is a modern formally provable dialect of C
I estimated that it took me about 10x the time to implement something than it would have taken if I did that in C. The reason for that could definitely be because I'm not a Rust expert at all. That's fine though because I will happily invest more time in programming if it saves me hours of debugging later. Plus, the claim that "if it compiles, it works" was enough for me to fight the compiler for hours if it gives me no trouble during runtime.
Fast forward a week, we have that binary deployed to a non-critical set of our field devices. A few days later, we get reports of that particular binary crashing. I logged into one of those devices and fetched the logs. The binary was reporting a panic on an MPSC channel's tx send. There was nothing useful in that error message that would point me to the root cause. I had no tools to attach to a running process because I'm on a device with an ancient kernel.
To fix the situtation "temporarily", because the customer is getting infuriated, we redeploy our old C binary. It has been there since. I basically now say "fuck off" to anyone who tells me to use Rust because it doesn't work if it compiles.
0xdead | 6 years ago | on: C# Pattern Matching
0xdead | 6 years ago | on: India reports its first case of coronavirus
0xdead | 6 years ago | on: Let's Destroy C
0xdead | 6 years ago | on: Being a Noob
0xdead | 6 years ago | on: Fortran.io – a Fortran Web Framework
0xdead | 6 years ago | on: What is Rust and why is it so popular?
0xdead | 6 years ago | on: A Sad Day for Rust
0xdead | 6 years ago | on: My C code works with -O3 but not with -O0
0xdead | 6 years ago | on: My C code works with -O3 but not with -O0
0xdead | 6 years ago | on: Mozilla lays off 70
0xdead | 6 years ago | on: The new Microsoft Edge is out of preview
0xdead | 6 years ago | on: 2019's Fastest Growing Programming Language Was C, Says Tiobe
0xdead | 6 years ago | on: Mozilla says a new Firefox security bug is under active attack
0xdead | 6 years ago | on: C, what the fuck??!
0xdead | 6 years ago | on: C-for-all: Extending C with modern safety and productivity features
$ cat hello.c
#include <stdio.h>
int main(void)
{
printf("hello world\n");
return 0;
}
$ cat hello.cpp
#include <iostream>
using namespace std;
int main(void)
{
cout << "hello world" << endl;
return 0;
}
$ gcc -o hello_c hello.c
$ g++ -o hello_cpp hello.cpp
$ ll hello_*
-rwxr-xr-x 1 root root 5880 Dec 5 14:13 hello_c
-rwxr-xr-x 1 root root 7424 Dec 5 14:14 hello_cpp
I see 1544 bytes of bloat. Hope that helps.