He doesn't exclusively write MISRA C

>he doesn't exclusively write MISRA C

Attached: 1533174755049.jpg (381x430, 18K)

Other urls found in this thread:

en.wikipedia.org/wiki/Astrée_(static_analysis)
netlib.org/lapack/explore-html/d1/dff/cblas__example1_8c_source.html
icl.cs.utk.edu/lapack-forum/archives/lapack/msg01602.html
twitter.com/AnonBabble

>Not using HolyC

>C
*crack*
*psssh*
*glug glug glug glug*
*ahhhhhhg*
Now THAT was a language. They don't use it anymore. Used to write programs for my 16-bit 8086 processor with only 4Kb of memory. Blazin' fast!
I miss those days
*glug glug*

Attached: 1531820657592.png (2274x1074, 1.02M)

Alpha.... now that was an arch *buys a can monster* none of this x86 CISC bullshit *cracks* *psssssssh* intel and amd were only able to compete by hiring DEC employees *sips*

Attached: 1532940212489.png (1106x1009, 637K)

Cython is still used for a lot of scientific programming today, but the language is completely dated and a complete pain in the ass to work with.

I have no idea what a MIRSA is or does sorry.

when you're in court being tried for many counts of manslaughter because of your shitty insecure C programs you will be very very sorry indeed

I do not program. That is for monkeys.

>not using SPARK/Ada
You know MISRA C is just an inferior shitty me-too hack, right?

uglification

>Rule 104 (required): Non-constant pointers to functions shall not be used.

Attached: Z7HeRxU.png (512x512, 361K)

What is rule 34?

It's not about having "fun" ricing your shitty twm. It's about not writing crippled software for auto firmware. Tard.

let me guess, it doesn't allow me to long jump between functions as well

>Rule 34 (required)
>The operands of a logical && or || shall be primary expressions.
Don't you have a CoC to write or something? *hug*
>Rule 122 (required) The setjmp macro and the longjmp function shall not be used
Bingo

Attached: 1518774155322.jpg (700x700, 127K)

>not using rust

Attached: rust-logo-512x512.png (512x512, 84K)

Don't you have a cock to suck? In the real world, professionals use standards such as these to not kill people with their software.

Chill dude, save this attitude for your coding interviews

Attached: 1502894621990.jpg (228x221, 7K)

How can I test my code to test compliance?
I usually run through valgrind so I can feel good about myself.

>that 79 year old boomer who manages his own resources

Attached: 1530906555724.png (380x390, 70K)

Attached: theLogo.png (400x400, 15K)

does valgrind even offer anything over clang sanitizers and perf/dtrace beside big overhead?

I just use valgrind to make sure I don't have memory leaks.
en.wikipedia.org/wiki/Astrée_(static_analysis)
>The tool is tailored towards safety-critical embedded code: source programs are assumed not to contain dynamic allocation (malloc); specific analysis techniques are used for common control theory constructs (filters, rate limiters...) and floating-point numbers.

I use basic linear algebra in C, and here is how I implement my matrices (i don't use gnu-scientist because I don't like the GPL license, and I'm too much a pleb for larger libraries)
void new_matrix(matrix *output, int rows, int cols) {
/* Creates a new matrix of a given dimensions
*/
// sanity check
if (rows cols = 0;
output->data = NULL;
fprintf(stderr,"in new_matrix: rows or cols is a negative number\n");
abort();
}
// Set the dimensions and allocate data space accordingly
output->rows = rows;
output->cols = cols;
output->data = malloc(rows * cols * sizeof(double));
}
Does this mean I'm out of the /miscra/ club beause I use malloc?

It may catch some bugs neither can, by design.

Oh, and typedef struct {
int rows;
int cols;
double *data;
} matrix;
for the curious

>Does this mean I'm out of the /miscra/ club beause I use malloc?
Yes. Dynamic memory is unsafe and slow.

Then how would you implement something like a matrix? 2D array are not enough since you cannot make sure before hand you won't get out of bounds and segfault. With the struct I use, I can make sure the dimensions always match before an operation.

such as?

You statically allocate a large enough blocks of memory you need for your matrices.

how can you be sure that during the runtime you will have enough space on stack which is limited in size?

I just checked, even LAPACK (so BLAS) uses malloc for their matrices
netlib.org/lapack/explore-html/d1/dff/cblas__example1_8c_source.html

But is LAPACK (so BLAS) used in real time distributed systems?

No heap alloc is embedded mission-critical meme where you run without process abstraction, limited resources, for several years reliably, with limited debugging options, mostly no remote debugging and expensive software updates. Pushing this on personal computer is bullshit unless in kernel. In internet-facing servers you mostly need allocate, but can do it beforehand for obvious scope (per-user connection etc.) and have it under control because resource exhaustion a DoS surface, but you still need a dynamic allocation. Stack size is up to few megabytes with glibc and if you waste most of it on single IO buffer, how are you expected to do anything?

I don't know, but I found this guy that wants to use clapack in embedded system. icl.cs.utk.edu/lapack-forum/archives/lapack/msg01602.html

grep -r malloc /usr/src/linux | wc -l
18811

hmmmmm

This doesn't find kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Try again.

no u

ok cloning

37k total, 25k in drivers/
ok I will admit that drivers allocate far more than I thought (or allocate a little and there is just too many of them? dunno)

Oh, ATS has a logo now? That's cute.