You are not logged in.

#1 2008-01-17 16:56:47

smitty
Member
Registered: 2008-01-17
Posts: 73

What's the best way to learn how to program in ArchLinux?

I feel like contributing back to the community by coding some projects. However my knowledge is limited to Basic, Pascal, Ansi C / C++, and some assembly language.
Is there a good resource for programming in the ArchLinux environment? I want to start with basic stuff. Any ideas or suggestions would be very much appreciated. I would, for example, like to see an NCurse based installer in ArchLinux. However I don't know where to start. I just need a nudge in the right direction. smile

Offline

#2 2008-01-17 18:29:35

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: What's the best way to learn how to program in ArchLinux?

Hm.. I generally just use vim and gcc for most of my programming needs; don't have much of an 'environment' myself.

If you want to see our official projects, we have source repositories at http://projects.archlinux.org - our installer exists there, afaik

Offline

#3 2008-01-17 18:42:49

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: What's the best way to learn how to program in ArchLinux?

Start with PKGBUILDS !!!!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2008-01-17 20:30:47

smitty
Member
Registered: 2008-01-17
Posts: 73

Re: What's the best way to learn how to program in ArchLinux?

Does it matter what programming language I use for Arch? Also, what's the best resources to learn PKGBUILD?

Offline

#5 2008-01-17 22:24:47

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,131

Re: What's the best way to learn how to program in ArchLinux?

Have a look at the wiki. Search for PKGBUILD, AUR, abs. Have a look at some PKGBUILDs in the AUR to see how things work. Then try to write your first PKGBUILD and report back if you have questions.

If you're not (yet) interested in creating your own packages but in automating things on your system you might want to learn shell scripting.


Haven't been here in a while. Still rocking Arch. smile

Offline

#6 2008-01-17 23:02:54

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: What's the best way to learn how to program in ArchLinux?

smitty wrote:

Does it matter what programming language I use for Arch?

It depends on what you want to do. See the "Languages for a Newbie" thread we had recently for some discussion about languages.

Offline

#7 2008-01-17 23:09:37

elgatofelix
Member
From: Chile
Registered: 2007-07-03
Posts: 137

Re: What's the best way to learn how to program in ArchLinux?

Take a look at linux-howtos: pacman -S linux-howtos.
I recommend to read "The art of unix programming" (search in google) and "Advanced linux programming" books.

Does anyone knows another books ? The only formal resources that i've found are these.

uh and get into the D programming language, it is awesome:)


Are u listening?

Offline

#8 2008-01-18 04:46:15

smitty
Member
Registered: 2008-01-17
Posts: 73

Re: What's the best way to learn how to program in ArchLinux?

I remember reading about D programming language a long time ago, but never learned it. Is there advantages in speed, performance, or otherwise? Btw, a resource that I stumbled into is "Linux Device Drivers 3rd Edition" if you want to write drivers for your hardware. I'll check out the others you mentioned. I would say most of my experience has mostly been in C / C++ more so than then the other languages. So, as far as I know, C / C++ was the language that was closest in speed and yet portable across multi-platforms.
As far as my background, I went to a technical school as computer programming for a major. I should have went to college, instead. All my training was in computer programming. In computer science, however, they give you an even broader picture, for example, on how operating system works, and compiler design, lexical analysis, etc. This is knowledge where I wish I knew more.

Last edited by smitty (2008-01-18 04:49:57)

Offline

#9 2008-01-18 05:18:27

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: What's the best way to learn how to program in ArchLinux?

If you want to work on an Arch Linux project with that C knowledge of yours, pacman development is open to everyone. Joining the mailing list is a good start to getting up to speed on what we do, and getting exposed to the code a bit.

http://www.archlinux.org/mailman/listinfo/pacman-dev/

Almost all of the Arch Linux projects are hosted in GIT, and they can be browsed here:
http://projects.archlinux.org/git/

Offline

#10 2008-01-18 07:30:44

LE_Shatai
Member
Registered: 2007-01-04
Posts: 26

Re: What's the best way to learn how to program in ArchLinux?

smitty wrote:

[...]
As far as my background, I went to a technical school as computer programming for a major. I should have went to college, instead. All my training was in computer programming. In computer science, however, they give you an even broader picture, for example, on how operating system works, and compiler design, lexical analysis, etc. This is knowledge where I wish I knew more.

Have a look at the so called Dragon Book. http://en.wikipedia.org/wiki/Principles … ler_Design
To me it is written in some way, it is not easy to read but most of the people out there find it more than useful.
It is technically correct and shows you everthing you need to know about compilers.
But there are also some freely available sources, about compilers, but if you want to know the theory behind it read this book.

Also have a look at bison/flex to do some Lexers, or Parsers, but this implies you have to knowledge about grammars, finite automata etc.

Offline

#11 2008-01-18 08:20:29

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: What's the best way to learn how to program in ArchLinux?

Heh yeah D! lol Would be a refreshing thing if a new Arch tool was in D..or not.


I need real, proper pen and paper for this.

Offline

#12 2008-01-18 16:40:01

smitty
Member
Registered: 2008-01-17
Posts: 73

Re: What's the best way to learn how to program in ArchLinux?

I tried studying on my own books on compiler design, but I have a difficulty, because, my school didn't teach Discrete Mathematics. This is where I get lost. I get
to that part in the book where it breaks down talking about lexical analysis and I can't go further. In school, I made it up to Algebra 2. That's where my knowledge rests right now. It's not that I can't learn it, but when I was in school, I wasn't interested in it as I am now. I'm wanting to learn more about how operating systems and compilers work, because as you know, this kind of stuff can be improved if you know how. I am a total believer in the "open source initiative". Even better to me is "GPL", where everything is accessible / modifiable. Also, I think I learned more out of the school, from a technical point of view, than in school. In technical school I learned more about theory on how to use the programs, but at home I had more of a" hands-on' approach and could research more than in school. I also wasn't limited on computing power, either, because I imagine schools have a budget and maybe a certain amount of computers to upgrade each year. And, this school had other programs / courses, but not as extensive as you would get in  college. I also believe the teachers may have been underpaid and I don't know if that is what happens with technical schools (i.e. are they all underpaid compared to Universities?). The reason I say this, is because the teacher I was with left the school for a better paying career. I know this is more on a personal view, financially, but it's how I view it.

Last edited by smitty (2008-01-18 16:40:26)

Offline

#13 2008-01-18 20:35:16

LE_Shatai
Member
Registered: 2007-01-04
Posts: 26

Re: What's the best way to learn how to program in ArchLinux?

smitty wrote:

I tried studying on my own books on compiler design, but I have a difficulty, because, my school didn't teach Discrete Mathematics. This is where I get lost. I get
to that part in the book where it breaks down talking about lexical analysis and I can't go further. In school, I made it up to Algebra 2. That's where my knowledge rests right now. It's not that I can't learn it, but when I was in school, I wasn't interested in it as I am now. [...]

Ok, so I do not think you need so much discrete mathematics for compiler programming.

You need some basics of quantities ( sorry I do not know the exact mathematical word in english for it ), and if you have
ever seen some state-chart of an UML diagram you have an idea about finite automata.
And you need some theory about grammars. Have a look for Backus-Naur-Form (notation is used in bison)  or Chomsky-Normal-Form, Context free grammars,
regular grammars (regular expressions), Syntax trees, Keller automata (which are stacks ) etc.

If you are really interested read the wikipedia articles, search across the internet and use some examples for flex for a better
understanding of lexical analysis and bison examples for top-down-parsing.

http://en.wikipedia.org/wiki/Backus-Naur_form
http://en.wikipedia.org/wiki/Syntax_diagram
http://en.wikipedia.org/wiki/Chomsky_normal_form
http://en.wikipedia.org/wiki/Context-free_grammar

Discrete Mathematics is more about algebras, number theory, coding theory, and graph theory. wink

Hope this is helpfull for a start. smile

CU

Offline

#14 2008-01-19 03:18:30

smitty
Member
Registered: 2008-01-17
Posts: 73

Re: What's the best way to learn how to program in ArchLinux?

To those who posted about the D programming language, I just came across an article I stumbled on. I felt I should share it with all the D programmers out there.
Here it is: http://www.linux.com/feature/124320

Let me know what you think. smile

Last edited by smitty (2008-01-19 03:19:06)

Offline

#15 2008-01-19 03:57:56

underpenguin
Member
Registered: 2007-02-01
Posts: 116

Re: What's the best way to learn how to program in ArchLinux?

First of all, I wouldn't worry about learning D. Like any linux distro, arch is composed of components programmed in many languages, C, Bash, and Python should probably be top priorities if you want to learn linux programming.

Also, in response to CU, yes, compiler and language design has everything to do with discrete mathematics. Most of the topics you listed are core discrete math topics: automata, trees, etc.

Offline

#16 2008-01-19 08:46:44

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: What's the best way to learn how to program in ArchLinux?

D is a great language. About the time of the release of v1.0 I decided to rewrite a small application I was working on in D and it was a really easy and fast job. (I know C/C++, so it was not hard for me to use D.) I later rewrote it in C++ again, because D has one big problem:

It lacks support for multiple operating systems, which I consider as very important. (When I write code, I always test it on OpenBSD, which unfortunately isn't supported yet.) Free compiler development with gdc and - imho more excitingly - llvmdc is underway, but this is a major point keeping me from using D for more code I write.

Otherwise it is slowly getting useful for application programming (take e.g. wxD for multi-platform programming), I'm watching the development closely.

Offline

#17 2008-01-19 12:25:18

smitty
Member
Registered: 2008-01-17
Posts: 73

Re: What's the best way to learn how to program in ArchLinux?

underpenguin wrote:

First of all, I wouldn't worry about learning D. Like any linux distro, arch is composed of components programmed in many languages, C, Bash, and Python should probably be top priorities if you want to learn linux programming.

Also, in response to CU, yes, compiler and language design has everything to do with discrete mathematics. Most of the topics you listed are core discrete math topics: automata, trees, etc.

So, in that case, I would have to learn Discrete Math to understand the theory behind compilers? I actually did purchase "The Dragon Book" as many people refer to
it. It is a great book, but man! That is heavy stuff! The only thing the technical school taught was Business Math.

On an off topic, Math is not only crucial to learning compilers, but in the gaming world, too. You hear such things as "Vector Graphics", "Vector Bitmaps",  and so forth.
I, unfortunately, haven't learn these as well. I wish I could have learn passed Algebra 2 in high school, though! Of course, this was back than when Macintosh was those
"all-in-one" units. Regarding math, I remember one time I asked my teacher how high you could go in math, just to be curious. My math teacher said: "Abstract Algebra". I think there might even "Abstract Calculus", too, if I'm not mistaken, but these are way over my head. Let's just say that I did passed the school's "Logic Test" before
I came on board. That's where that ended! smile

Offline

#18 2008-01-19 14:48:24

LE_Shatai
Member
Registered: 2007-01-04
Posts: 26

Re: What's the best way to learn how to program in ArchLinux?

underpenguin wrote:

[...]
Also, in response to CU, yes, compiler and language design has everything to do with discrete mathematics. Most of the topics you listed are core discrete math topics: automata, trees, etc.

But you do not need to know everything about trees, automata etc.
It is enough to know what a tree is, and how to construct it, also automata is some topic you can handle without
knowing a lot of the mathematics behind it. Always in the context, of constructing a compiler with flex/bison.

I would say that someone who has ever used a graph, tree, stack or something like this, is capable
to build an compiler using the right tools, and with some basic knowledge of the topics above, which are more or
less intuitive. It won't be the best compiler the world has seen, but it will work.

Ok, so what I want to say is, that you do not need so much knowledge in mathematics to build a functional compiler.

@smitty:

Abstract algebra is something, a lot of people would have problems with.
I do not know if there is abstract calculus, but there is a >index calculus< wink

Oh, but if you only had some business math, I guess some topics are rather than hard to understand.
And if you do not even know about vectors, most of the >hardcore computer sciences< will be pretty curious,
but there is no necessity to know about all this, if you want to program helpful tools.

So head up, just start where you stopped, and gather all information you need to solve your problem, and no you
do not need to know that much discrete mathematics to build a compiler with the appropriate tools.

Offline

#19 2008-01-19 20:09:28

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: What's the best way to learn how to program in ArchLinux?

wuischke wrote:

D is a great language. About the time of the release of v1.0 I decided to rewrite a small application I was working on in D and it was a really easy and fast job. (I know C/C++, so it was not hard for me to use D.) I later rewrote it in C++ again, because D has one big problem:

It lacks support for multiple operating systems, which I consider as very important. (When I write code, I always test it on OpenBSD, which unfortunately isn't supported yet.) Free compiler development with gdc and - imho more excitingly - llvmdc is underway, but this is a major point keeping me from using D for more code I write.

I thought there was a GCC D compiler. Not mature enough yet?

Offline

#20 2008-01-19 21:01:07

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: What's the best way to learn how to program in ArchLinux?

@pauldonnelly: That's what I called gdc. It works OK for Linux and even claims to support (among others) Linux x86_64 and FreeBSD, but there's still the runtime library which (AFAIK) isn't fully implemented on all major operating systems. I should do some more tests these days...but I believe that outside from Win32 and Linux x86, D shouldn't be the language of choice. (yet)

Offline

Board footer

Powered by FluxBB