2017-01-31 14:36:53 +00:00
|
|
|
I think for long time, new C language programmer is getting rare.
|
|
|
|
|
As I'm solving the Eudyptula Challenge, an idea came to me that similar challenge is necessary for C language.
|
|
|
|
|
|
|
|
|
|
I'm not sure what tasks are suitable and how mant tasks are necessary..actually I have no plan yet.
|
|
|
|
|
But I'll write some tasks from printing "hello-world" to making a class with a function pointer.
|
|
|
|
|
If you have an idea, please send me pull-request.
|
2017-01-31 19:53:58 +00:00
|
|
|
|
|
|
|
|
[discussion on reddit](https://www.reddit.com/r/linuxdev/comments/5r8k6g/new_service_like_the_eudyptula_challenge/)
|
|
|
|
|
* pnpbios
|
|
|
|
|
* Writing your own daemon, your own PAM module, writing a custom network interface, writing your own shell
|
2017-02-01 08:45:02 +00:00
|
|
|
|
2017-02-23 11:53:15 +00:00
|
|
|
topics:
|
|
|
|
|
* file IO
|
|
|
|
|
* creating ls
|
|
|
|
|
* concurrent
|
|
|
|
|
* network
|
|
|
|
|
* making chatting program
|
|
|
|
|
* memory
|
|
|
|
|
* make pool-based memory allocator
|
|
|
|
|
* error handling
|
|
|
|
|
* toolchain: preprocessor, compiler, linker
|
|
|
|
|
* cache
|
|
|
|
|
* assembly
|
|
|
|
|
* performance
|
|
|
|
|
* syncronization
|
|
|
|
|
|
|
|
|
|
|
2017-02-01 08:45:02 +00:00
|
|
|
# task01
|
|
|
|
|
|
|
|
|
|
Use argc and argv to print "Hello world!".
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ print 3 "Hello world!"
|
|
|
|
|
1 Hello world!
|
|
|
|
|
2 Hello world!
|
|
|
|
|
3 Hello world!
|
|
|
|
|
```
|
2017-02-23 11:53:15 +00:00
|
|
|
|
|
|
|
|
# task??
|
|
|
|
|
|
|
|
|
|
maks ls tools and do command argument parsing with getopt, getopt_long
|
|
|
|
|
* options: -l, -a
|
|
|
|
|
|
|
|
|
|
# task??
|
|
|
|
|
|
|
|
|
|
create threads to increase value of one variable:
|
|
|
|
|
* no locking
|
|
|
|
|
* atomic value
|
|
|
|
|
* value protected-by synchronization
|
|
|
|
|
|
2017-02-01 21:17:39 +00:00
|
|
|
# task??
|
|
|
|
|
|
|
|
|
|
Make a daemon that log a message "I'm running" every minute.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ tail /var/log/syslog
|
|
|
|
|
Dec 5 10:52:25 username mydaemon[1058]: I'm running
|
|
|
|
|
Dec 5 10:57:25 username mydaemon[1058]: I'm running
|
|
|
|
|
Dec 5 11:02:25 username mydaemon[1058]: I'm running
|
|
|
|
|
Dec 5 11:07:25 username mydaemon[1058]: I'm running
|
|
|
|
|
```
|
|
|
|
|
# task??
|
|
|
|
|
|
|
|
|
|
Make a 1:1 chatting program for terminal
|
|
|
|
|
|
|
|
|
|
# task??
|
|
|
|
|
|
|
|
|
|
Make serial number certification program
|
|
|
|
|
* certificate a serial number file
|
|
|
|
|
* read .rc file to specify serial number format
|
|
|
|
|
* encode user information, user-account number, name, product id, in serial number
|
|
|
|
|
* decode the information from the serial number
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ cat spec.txt
|
|
|
|
|
# field length
|
|
|
|
|
account 4
|
|
|
|
|
name 16
|
|
|
|
|
product 4
|
|
|
|
|
|
|
|
|
|
$ encode-serial
|
|
|
|
|
account: 1234 <user-input>
|
|
|
|
|
name: gogostar <user-input>
|
|
|
|
|
product: 5678 <user-input>
|
|
|
|
|
abcd-defg-xxxx-xxxx <output>
|
|
|
|
|
|
|
|
|
|
$ decode-serial
|
|
|
|
|
serial: abcd-defg-xxxx-xxxx <input>
|
|
|
|
|
account: 1234
|
|
|
|
|
name: gogostar
|
|
|
|
|
product: 5678
|
2017-02-23 11:53:15 +00:00
|
|
|
```
|
2017-02-01 08:45:02 +00:00
|
|
|
|
|
|
|
|
# task20
|
|
|
|
|
|
|
|
|
|
make your own shell
|
|
|
|
|
* features
|
2017-02-01 21:17:39 +00:00
|
|
|
* pipe, indirection
|
2017-02-23 11:53:15 +00:00
|
|
|
* background running
|
2017-02-01 08:45:02 +00:00
|
|
|
* design
|
|
|
|
|
|