Below you will find pages that utilize the taxonomy term “Linux”
Til
encoding miscellaneous
From the wiki,
In computing, data storage, and data transmission, character encoding is used to represent a repertoire of characters by some kind of encoding system that assigns a number to each character for digital representation.
Okay, they mean converting character to some number for storing and transmitting data.
There are two popular character sets
- ASCII
- American Standard Code for Information Interchange
- Pretty much all the characters and symbols in modern keyboard comes under ASCII
- Total of 128 characters
- Decimal value between 65 and 90 represents captial alphabets and 97 to 122 represents small alphabets
- UTF-8
- ASCII doesn’t cover characters from other languages.
- UTF-8 is capable of encoding all 1,112,064 valid character code points in Unicode using one to four one-byte (8-bit) code units.
- It has backward compatible with ASCII
I run into character set in postgres. There is client_encoding and server_encoding setting.
Til
Notes on makefile
There are two types of variable declaration.
- recursively expanded variables -
foois assigned withbarwhich inturns assigned toughwhose value isHuh?
foo = $(bar)
bar = $(ugh)
ugh = Huh?
all:;echo $(foo)
$ make
$ Huh?
- simply expanded variables -
foois assigned withbarhowever bar is not defined yet. so it outputs to nothing.
foo := $(bar)
bar := $(ugh)
ugh := Huh?
all:;echo $(foo)
$ make
$
NOTE: To echo something it needs to be in a target. Here the target name is all.
Article
Understanding .phony in makefile
This is a crosspost from my TIL
What the heck is .PHONY in makefile? I have seen this for so long but I always shrugged off. Whatever that is. Well, finally I decided to learn about it.
A bit of introduction to Makefile syntax.
target: prerequisites
<TAB> recipe
The first target in a Makefile will be executed by default when we call make.
blah: blah.o
cc blah.o -o blah # Runs third
blah.o: blah.c
cc -c blah.c -o blah.o # Runs second
blah.c:
echo "int main() { return 0; }" > blah.c # Runs first
In the above example, blah, blah.o and blah.c are targets and they are all files.