View Single Post
Old 3rd February 2012
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default

Quote:
Originally Posted by daemonfowl View Post
Thanks Ocicat , much indebted to you and you're a source !
I thought the openbsd team chose perl because it is more practical and more powerful than the rest .. likewise after reading days ago that openbsd team got rid of c++ from the base I thought c is better or less problematic or more secure .. again a newbie scale ..
my aim is to qualify as a BSD user [and contributor in the long run] so that I can -the best way- make use of the new OS I discoverd,loved, and trusted .. I feel the urge to embrace this new culture .. the BSD UNIX culture .. I met with some problems that windows hid from me as a user .. namely : unicode support ..
I am divorsing my old bad 'WinHabits' .. among many , doing without gui to develop the alternative '*Nix-habits' .. using snownews / lynx/ mp3blaster/ mutella /xxxterm / ...

so I guess it is python instead of perl ..

Here's a fuller answer about the decision to use Perl:

http://marc.info/?l=openbsd-misc&m=121155084515533&w=2

C++ isn't removed from base in any way that would meaningfully limit you if you chose that as your first programming language. The gcc in base compiles C++ fine, and these days is only a little out of date on most architectures. If you find yourself wanting to use features from C++11 (the new ISO standard just out this year) you may be able to pull in a newer gcc from ports with some support. The C++ program they removed from base I believe you are thinking of was groff. Whatever the C++ bashers want you to believe, the problems for them with groff seemed, from my reading, to have more to do with that particular code base, that it was a general purpose troff formatter and they only needed enough of it in base to handle man page formats, that groff's license was GPL (perhaps -- I'm always unclear just how big an issue GPL in base is for OpenBSD and whether that issue isn't overstated by some people), that the job to bring in a newer version of groff was nothing anyone would find fun, and that Kristaps Dzonsons and Ingo Schwarze had done such a nice job with mandoc. Unfortunately, this usually gets translated as, "groff's written in C++ so it sucks."

C is not better than C++. Python is not better than Perl. I'd suggest you try to avoid these language A is superior to language B kinds of statements (both reading them, even when written by OpenBSD developers, or writing them). Bjarne Stroustrup writes about the problems with these statements better than I ever could in his FAQ: http://www2.research.att.com/~bs/bs_faq.html#compare .

What ocicat wrote about Python being syntactically clean is fair and a plus for Python as a first language. I think I've read something to the effect that Guido had an earlier language whose goals included being a good teaching language as a model, so it's perhaps understandable that it's novice friendly. That said, Perl's not as bad a choice as many make it out to be either, and you could read the source to the OpenBSD package system, once learning it. Larry Wall has been quoted as having a design goal of supporting "baby talk" meaning that there are meant to be multiple levels of Perl knowledge, none of which leave you hamstrung as far as making things work. IMO, he's been quite successful with that. I found learning Perl to be great fun (and still do every time I relearn it ).

I also like what ocicat said in suggesting shell script (though, personally, I go out of my way to avoid shell script beyond a two liner -- Olin Shivers takes some entertaining swipes at Unix shell script I relate to that you can find here if you don't feel like following my advice above about reading language bigotry: http://www.scsh.net/docu/scsh-paper/...per-Z-H-1.html ), since you said your goal was to perhaps contribute to OpenBSD someday. I'm guessing you would start with making ports, in which case you'd need to know shell script, perhaps some Perl, Makefiles, and some C at a minimum. If you learned Python instead of Perl, maybe you could start by maintaining Python module ports.

In general though, except for your goal to contribute, I don't personally think you should be as influenced as you seem to be by the preferences of other BSD users and developers. There seems to be a bias towards C and shell script/awk/sed among Unix people. That's not such an unattractive programming world, but there are other worlds, and OpenBSD supports programming in them quite well too, despite the preferences of many of its kernel and user land developers. As an example of the many alternatives available, this book on Lisp could be a fun place to start for a beginner (and there are some great, more serious books on Lisp you could follow up with, such as Peter Norvig's Paradigms of Artificial Intelligence or Abelson and Sussmans' Structure and Interpretation of Computer Programs): http://landoflisp.com/ OpenBSD now has very good support for Common Lisp. They actually are better (in some respects?) than anyone else in their SBCL support, supporting me on PowerPC (yay!). Not even Linux or OS X are up to the version number the OpenBSD porter and SBCL people have gotten up to: http://www.sbcl.org/platform-table.html
Reply With Quote