linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Where to start C-programming open source?
@ 2017-03-03 16:05 Carsten Peter Rasmussen
  2017-03-03 19:48 ` Jon Mayo
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Carsten Peter Rasmussen @ 2017-03-03 16:05 UTC (permalink / raw)
  To: linux-c-programming

Hi C-programming list

It's awfully quite here, I wonder if I'm even in the right place!?
I have been a programmer for many year, and dabbled in many different 
development areas, but I really want for participate in a open source 
project by developing C. I have looked over a number of mailing lists 
like Git, Samba, Vim etc. And every time I think "Wow, these guys are 
really smart, this is out of my league" - so how does one start?

Any comments and advice on getting started in OS with C is greatly 
appreciated.

- Carsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-03 16:05 Where to start C-programming open source? Carsten Peter Rasmussen
@ 2017-03-03 19:48 ` Jon Mayo
  2017-03-04  9:42   ` Carsten Peter Rasmussen
  2017-03-09  0:39 ` Celelibi
  2017-03-10  0:23 ` Trevor Woerner
  2 siblings, 1 reply; 10+ messages in thread
From: Jon Mayo @ 2017-03-03 19:48 UTC (permalink / raw)
  To: Carsten Peter Rasmussen; +Cc: linux-c-programming

Find a project that you use every day that you think you could improve
or has a bug that you are able to reproduce. Go to the project and fix
one of their bugs, submit the patch, and you're in.

If you want to do OS dev, there are lots of sites for that. osdev.org
has lots of tutorials and guides on their wiki. Writing an OS from
scratch can be a good way to improve your skills, but it takes a lot
of work before the OS is substantial enough to be of any use. Most OS
projects are learning projects that are abandoned after the creator
has gotten what they wanted out of the experience.

Finding an OS project and seeing if you can get it up and running and
maybe add to it can be rewarding. Linux of course is one that can be
fun. But there are others like Prex (a real-time OS), xv6 (a minimal
unix kernel for learning & experimentation, very good docs), Fuzix (a
unix-like for really low-end CPUs without MMUs, including 8-bit
systems), and there are hundreds of other possibilities.

For me, writing something for xv6, like a VGA driver, or porting xv6
to Raspberry Pi seems like fun.

For totally gonzo sort of projects, something more challenging would
be to port Fuzix to a new piece of hardware. Dragonball68K(Palm IIIx/V
& Alphasmart Dana) could use some love for example.

(ps - sorry, I accidentally sent this out in HTML mode, resending a
cleaned up version for plaintext)

On Fri, Mar 3, 2017 at 8:05 AM, Carsten Peter Rasmussen
<mail@cprasmussen.dk> wrote:
> Hi C-programming list
>
> It's awfully quite here, I wonder if I'm even in the right place!?
> I have been a programmer for many year, and dabbled in many different
> development areas, but I really want for participate in a open source
> project by developing C. I have looked over a number of mailing lists like
> Git, Samba, Vim etc. And every time I think "Wow, these guys are really
> smart, this is out of my league" - so how does one start?
>
> Any comments and advice on getting started in OS with C is greatly
> appreciated.
>
> - Carsten
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
-- Jon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-03 19:48 ` Jon Mayo
@ 2017-03-04  9:42   ` Carsten Peter Rasmussen
  0 siblings, 0 replies; 10+ messages in thread
From: Carsten Peter Rasmussen @ 2017-03-04  9:42 UTC (permalink / raw)
  To: Jon Mayo; +Cc: linux-c-programming

Thanks for the replies!
Both the Fuzix and xv6 projects look like a lot of fun, think I'll start 
there. The problem with for instance Samba is that it feels like jumping 
on a high speed train because the project is so old and well maintained.

Den 03-03-2017 kl. 20:48 skrev Jon Mayo:
> Find a project that you use every day that you think you could improve
> or has a bug that you are able to reproduce. Go to the project and fix
> one of their bugs, submit the patch, and you're in.
>
> If you want to do OS dev, there are lots of sites for that. osdev.org
> has lots of tutorials and guides on their wiki. Writing an OS from
> scratch can be a good way to improve your skills, but it takes a lot
> of work before the OS is substantial enough to be of any use. Most OS
> projects are learning projects that are abandoned after the creator
> has gotten what they wanted out of the experience.
>
> Finding an OS project and seeing if you can get it up and running and
> maybe add to it can be rewarding. Linux of course is one that can be
> fun. But there are others like Prex (a real-time OS), xv6 (a minimal
> unix kernel for learning & experimentation, very good docs), Fuzix (a
> unix-like for really low-end CPUs without MMUs, including 8-bit
> systems), and there are hundreds of other possibilities.
>
> For me, writing something for xv6, like a VGA driver, or porting xv6
> to Raspberry Pi seems like fun.
>
> For totally gonzo sort of projects, something more challenging would
> be to port Fuzix to a new piece of hardware. Dragonball68K(Palm IIIx/V
> & Alphasmart Dana) could use some love for example.
>
> (ps - sorry, I accidentally sent this out in HTML mode, resending a
> cleaned up version for plaintext)
>
> On Fri, Mar 3, 2017 at 8:05 AM, Carsten Peter Rasmussen
> <mail@cprasmussen.dk> wrote:
>> Hi C-programming list
>>
>> It's awfully quite here, I wonder if I'm even in the right place!?
>> I have been a programmer for many year, and dabbled in many different
>> development areas, but I really want for participate in a open source
>> project by developing C. I have looked over a number of mailing lists like
>> Git, Samba, Vim etc. And every time I think "Wow, these guys are really
>> smart, this is out of my league" - so how does one start?
>>
>> Any comments and advice on getting started in OS with C is greatly
>> appreciated.
>>
>> - Carsten
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-c-programming" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>

-- 
KH
Carsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-03 16:05 Where to start C-programming open source? Carsten Peter Rasmussen
  2017-03-03 19:48 ` Jon Mayo
@ 2017-03-09  0:39 ` Celelibi
  2017-03-10  0:23 ` Trevor Woerner
  2 siblings, 0 replies; 10+ messages in thread
From: Celelibi @ 2017-03-09  0:39 UTC (permalink / raw)
  To: Carsten Peter Rasmussen; +Cc: linux-c-programming

2017-03-03 17:05 UTC+01:00, Carsten Peter Rasmussen <mail@cprasmussen.dk>:
> Hi C-programming list
>
> It's awfully quite here, I wonder if I'm even in the right place!?
> I have been a programmer for many year, and dabbled in many different
> development areas, but I really want for participate in a open source
> project by developing C. I have looked over a number of mailing lists
> like Git, Samba, Vim etc. And every time I think "Wow, these guys are
> really smart, this is out of my league" - so how does one start?
>
> Any comments and advice on getting started in OS with C is greatly
> appreciated.
>
> - Carsten

It indeed is quiet. But there are still some readers. :)

I'll give an answer with a more top-down approach.

C is not the simplest language to use. It's a bit low level, so you
have to think about a lot details in addition to your main high-level
goal. (It's not as bad as C++ though.) You have for instance to always
keep in mind what variable is a struct, a pointer or an integer so
that you can use it correctly.

If you come from higher level languages, I'd advice against starting C
with OS development. OS dev is hard and mistakes can be a real hell to
track. Believe me, even when you have qemu + gdb, you'll miss the
times when you had a "segmentation fault" instead of a still running
program, you'll miss the time when the hard-to-get-right portions of
code were hidden inside syscalls.

Even if you're interested in low level stuff, I still think you should
first follow the rules, then understand the rules, to finally break
the rules.
So I'd say to start with a toy project, just to get used to the
syntax, like a tic-tac-toe for two players, and replace one of them
with a brut-force AI. Nothing fancy.
Then start playing with the facilities provided by the kernel, like
files (open, seek, read, write, close), processes (fork, execve,
shared memory), signals, memory allocation (mmap, malloc/sbrk), pipes,
sockets, threads.
In the meantime you can try to contribute more-or-less small stuff to
projects you use. You should make an habit of reporting the bugs you
find in the software you use if you're not doing it already. And when
it's not too complex for you, you could go all the way to propose a
patch. I learned a lot by reading other people's code.
And when you're pretty ok with those, you can finally take a leap of
faith into OS dev. But OS dev isn't only about rolling your own
kernel. You can contribute to existing kernel/OS projects or
contribute to side projects like bootloaders.

An answer wouldn't be complete if it didn't mention things like
arduino (or other boards) where you can write some code to drive the
hardware. Much like a kernel, except that the driven hardware is
usually pretty simple, and you usually don't provide high-level
abstractions like processes or file descriptors. That's the other end
of the spectrum.


Celelibi

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-03 16:05 Where to start C-programming open source? Carsten Peter Rasmussen
  2017-03-03 19:48 ` Jon Mayo
  2017-03-09  0:39 ` Celelibi
@ 2017-03-10  0:23 ` Trevor Woerner
  2017-03-10  9:30   ` Carsten Peter Rasmussen
  2 siblings, 1 reply; 10+ messages in thread
From: Trevor Woerner @ 2017-03-10  0:23 UTC (permalink / raw)
  To: Carsten Peter Rasmussen; +Cc: linux-c-programming@vger.kernel.org

On Fri, Mar 3, 2017 at 11:05 AM, Carsten Peter Rasmussen
<mail@cprasmussen.dk> wrote:
> Any comments and advice on getting started in OS with C is greatly
> appreciated.

http://eudyptula-challenge.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-10  0:23 ` Trevor Woerner
@ 2017-03-10  9:30   ` Carsten Peter Rasmussen
  2017-03-10  9:59     ` Trevor Woerner
  2017-03-15 12:23     ` Mahavir Jain
  0 siblings, 2 replies; 10+ messages in thread
From: Carsten Peter Rasmussen @ 2017-03-10  9:30 UTC (permalink / raw)
  To: Trevor Woerner; +Cc: linux-c-programming@vger.kernel.org


Den 10-03-2017 kl. 01:23 skrev Trevor Woerner:
> On Fri, Mar 3, 2017 at 11:05 AM, Carsten Peter Rasmussen
> <mail@cprasmussen.dk> wrote:
>> Any comments and advice on getting started in OS with C is greatly
>> appreciated.
>
> http://eudyptula-challenge.org/
Looks interesting, is it still working? I just send a plain-text email, 
but no reply.



-- 

Carsten Peter Rasmussen
http://cprasmussen.dk


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-10  9:30   ` Carsten Peter Rasmussen
@ 2017-03-10  9:59     ` Trevor Woerner
  2017-03-10 15:31       ` Dmitrii Galantsev
  2017-03-15 12:23     ` Mahavir Jain
  1 sibling, 1 reply; 10+ messages in thread
From: Trevor Woerner @ 2017-03-10  9:59 UTC (permalink / raw)
  To: Carsten Peter Rasmussen; +Cc: linux-c-programming@vger.kernel.org

On Fri, Mar 10, 2017 at 4:30 AM, Carsten Peter Rasmussen
<mail@cprasmussen.dk> wrote:
>
> Den 10-03-2017 kl. 01:23 skrev Trevor Woerner:
>>
>> On Fri, Mar 3, 2017 at 11:05 AM, Carsten Peter Rasmussen
>> <mail@cprasmussen.dk> wrote:
>>>
>>> Any comments and advice on getting started in OS with C is greatly
>>> appreciated.
>>
>>
>> http://eudyptula-challenge.org/
>
> Looks interesting, is it still working? I just send a plain-text email, but
> no reply.

Yes, it is still working/running. But patience is needed, the queues
are busy. Take the time to double-check in order to make sure you
didn't accidentally send a bad email (i.e. html).

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-10  9:59     ` Trevor Woerner
@ 2017-03-10 15:31       ` Dmitrii Galantsev
  2017-03-11  1:30         ` Trevor Woerner
  0 siblings, 1 reply; 10+ messages in thread
From: Dmitrii Galantsev @ 2017-03-10 15:31 UTC (permalink / raw)
  To: Trevor Woerner
  Cc: Carsten Peter Rasmussen, linux-c-programming@vger.kernel.org

On January 20 all queues for the challenge were empty.
The grading scripts were improved as well so you can go through the
challenge a bit faster than earlier.
Here are the stats from the semi-regular update email on January 20 2017:

Task Number    People    Queue Length
-------------------------------------
  Finished        137
        20         45              0
        19         24              0
        18         25              0
        17         13              0
        16         58              0
        15         14              0
        14         14              0
        13          7              0
        12         11              0
        11         66              0
        10        112              0
        09        283              0
        08         48              0
        07         68              0
        06        374              0
        05       1140              0
        04        757              0
        03        471              0
        02       1211              0
        01       1781              0
-------------------------------------
Active:          6659
Duplicates:        14
Removed:        11540
---------------------
Total:          18199



On Fri, Mar 10, 2017 at 4:59 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> On Fri, Mar 10, 2017 at 4:30 AM, Carsten Peter Rasmussen
> <mail@cprasmussen.dk> wrote:
>>
>> Den 10-03-2017 kl. 01:23 skrev Trevor Woerner:
>>>
>>> On Fri, Mar 3, 2017 at 11:05 AM, Carsten Peter Rasmussen
>>> <mail@cprasmussen.dk> wrote:
>>>>
>>>> Any comments and advice on getting started in OS with C is greatly
>>>> appreciated.
>>>
>>>
>>> http://eudyptula-challenge.org/
>>
>> Looks interesting, is it still working? I just send a plain-text email, but
>> no reply.
>
> Yes, it is still working/running. But patience is needed, the queues
> are busy. Take the time to double-check in order to make sure you
> didn't accidentally send a bad email (i.e. html).
> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-10 15:31       ` Dmitrii Galantsev
@ 2017-03-11  1:30         ` Trevor Woerner
  0 siblings, 0 replies; 10+ messages in thread
From: Trevor Woerner @ 2017-03-11  1:30 UTC (permalink / raw)
  To: Dmitrii Galantsev
  Cc: Carsten Peter Rasmussen, linux-c-programming@vger.kernel.org

On Fri, Mar 10, 2017 at 10:31 AM, Dmitrii Galantsev
<fenixxxzzzz@gmail.com> wrote:
> On January 20 all queues for the challenge were empty.
> The grading scripts were improved as well so you can go through the
> challenge a bit faster than earlier.
> Here are the stats from the semi-regular update email on January 20 2017:
>
> Task Number    People    Queue Length
> -------------------------------------
>   Finished        137
>         20         45              0
>         19         24              0
>         18         25              0
>         17         13              0
>         16         58              0
>         15         14              0
>         14         14              0
>         13          7              0
>         12         11              0
>         11         66              0
>         10        112              0
>         09        283              0
>         08         48              0
>         07         68              0
>         06        374              0
>         05       1140              0
>         04        757              0
>         03        471              0
>         02       1211              0
>         01       1781              0
> -------------------------------------
> Active:          6659
> Duplicates:        14
> Removed:        11540
> ---------------------
> Total:          18199

Here are the stats I received 3 days ago:

-------------------------------------
Task Number    People    Queue Length
-------------------------------------
  Finished        146
        20         51              1
        19         21              0
        18         28             11
        17         11              0
        16         66              1
        15         15              2
        14         18              4
        13          7              1
        12         17              4
        11         76              5
        10        129              0
        09        269             12
        08         72             32
        07         66              2
        06        371             26
        05       1165             14
        04        765             21
        03        472              5
        02       1181              1
        01       1743             25
-------------------------------------
Active:          6689            167
Duplicates:         0
Removed:        12148
---------------------
Total:          18837

ymmv :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Where to start C-programming open source?
  2017-03-10  9:30   ` Carsten Peter Rasmussen
  2017-03-10  9:59     ` Trevor Woerner
@ 2017-03-15 12:23     ` Mahavir Jain
  1 sibling, 0 replies; 10+ messages in thread
From: Mahavir Jain @ 2017-03-15 12:23 UTC (permalink / raw)
  To: Carsten Peter Rasmussen; +Cc: linux-c-programming@vger.kernel.org

On Fri, Mar 10, 2017 at 3:00 PM, Carsten Peter Rasmussen
<mail@cprasmussen.dk> wrote:
>
> Den 10-03-2017 kl. 01:23 skrev Trevor Woerner:
>>
>> On Fri, Mar 3, 2017 at 11:05 AM, Carsten Peter Rasmussen
>> <mail@cprasmussen.dk> wrote:
>>>
>>> Any comments and advice on getting started in OS with C is greatly
>>> appreciated.
>>

[Resending in plain text mode]

I was looking for similar resources earlier, mostly for learning
purpose, I could gather following information,

For minimal and baremetal OS development on x86,
http://www.osdever.net/bkerndev/Docs/gettingstarted.htm

For little advanced OS development which includes paging and
multitasking support (but in crude way),
https://web.archive.org/web/20160311205056/http://www.jamesmolloy.co.uk/index.html

Above has some known issues (beware and good to chase),
http://wiki.osdev.org/James_Molloy's_Known_Bugs

Xv6 (as already suggested) is rather more comprehensive with very good
documentation,
https://pdos.csail.mit.edu/6.828/2016/xv6.html

>>
>> http://eudyptula-challenge.org/
>
> Looks interesting, is it still working? I just send a plain-text email, but
> no reply.
>

This is also good starting point, but requires good patience, I
dropped from 6th stage as responses were extremely slow.

I could get to below with above references (basic but functional),
https://github.com/mahavirj/tinyos

Best luck!

Thanks,
Mahavir

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-15 12:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 16:05 Where to start C-programming open source? Carsten Peter Rasmussen
2017-03-03 19:48 ` Jon Mayo
2017-03-04  9:42   ` Carsten Peter Rasmussen
2017-03-09  0:39 ` Celelibi
2017-03-10  0:23 ` Trevor Woerner
2017-03-10  9:30   ` Carsten Peter Rasmussen
2017-03-10  9:59     ` Trevor Woerner
2017-03-10 15:31       ` Dmitrii Galantsev
2017-03-11  1:30         ` Trevor Woerner
2017-03-15 12:23     ` Mahavir Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).