Why are linux system calls different across architectures

Advertisements According to this system calls table, linux system calls are different across architecture, but IMO syscalls are higher level encapsulation which do not depent on any specific architechture. Why is it designed this way? In a specific case, riscv64 linux doesn’t have mkdir, instead it has mkdirat, but weirdly it doesn’t have rmdir or… Read More Why are linux system calls different across architectures

Why can not while(*s++ = *t++); be compiled after checking "out-of-bounds"?

Advertisements I am currently learning "pointers by following the book "The C Programming Language" by Brian and Dennis. I failed to compile: #include <stdio.h> void _strcpy(char *s, char *t) { while(*s++ = *t++) ; } And the error messages are: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] while(*s++ =… Read More Why can not while(*s++ = *t++); be compiled after checking "out-of-bounds"?

Unable to connect to a url with python request module

Advertisements I’m unable to connect to the URL using requests module, but it works fine when browsed in a browser. Could it be some robots.txt issue Allowed/Disallowed issue ? Below is the codebase. import requests r = requests.get(‘https://myntra.com&#8217;) print(r) >Solution : Some websites block access from non-web browser ‘User-Agents’ to prevent web scraping, including from… Read More Unable to connect to a url with python request module

How to use `label_date_short`?

Advertisements How I am using wrongly label_date_short from scales package? library(tidyverse) library(scales) date_taille <- tibble( Taille = rep(c("taille_hiver", "taille_ete"), times = 2), Date_taille = c("2016-08-01", "2016-02-01", "2018-08-01", "2018-02-01") %>% as.Date() ) ggplot(date_taille) + aes(x = Date_taille, y = Taille) + geom_point() + scale_x_date(date_breaks = "month", date_labels = label_date_short()) #or label_date() #> Error in format(x, format… Read More How to use `label_date_short`?

Why didn't x86 implement direct core-to-core messaging assembly/cpu instructions?

Advertisements After serious development, CPUs gained many cores, gained distributed blocks of cores on multiple chiplets, numa systems, etc but still a piece of data has to pass through not only L1 cache (if on same core SMT) but also some atomic/mutex synchronization primitive procedure that is not accelerated by hardware. I wonder why didn’t… Read More Why didn't x86 implement direct core-to-core messaging assembly/cpu instructions?