ocaml vs python/ruby/perl etc. was [SLUG] Why not C
On 11/23/05, Erik de Castro Lopo [EMAIL PROTECTED] wrote: While I agree wholeheartedly that tests are necessay, I'm curious why you are advocating writing Python tests to find bugs at run time that say an Ocaml compiler will find for free at compile time. While I would agree that catching any bugs asap is a good thing, I find that typos and the like are not the problems that are causing me most grief (crappy logic, crappy requirements, not enough time, other developers writing crappy code, etc are more likely to cause me problems). Python works for me because: a) i (and others) write less code because the language is very expressive. therefore less bugs b) i (and others) write less code because there are heaps of modules out there to do many of the things I need to do (and so many of them come as part of the standard library). therefore less bugs c) i write code and it tends to work first or second go (which says way more about python than it does about my coding ability). I don't have to fight the language, and don't often think why did they do it that way? d) the code tends to be easy to read (both my code and the code in standard modules etc.) e) i don't have to look up the documentation each time I try something slightly new (I can keep a large chunk of the language in my head or I can work it out by playing around in the interpreter for a few minutes) f) actually I'll mention the interpreter again, it seems such a simple thing but the number of times I've not known how to use a module but worked it out in the interpreter using a combination of dir, help and __doc__ in a short period of time makes it worth mentioning as a point on it's own Erik, I've never used ocaml (and know very little about it). Would you be able to evaluate it against some of the points I've raised above, particularly in comparison to python (I'm assuming you've used python based on your criticism)? (I'm not suggesting my criteria are the only ones that matter, different experience, different projects, different environments etc might make other things more or less important, they are criteria that are relevant to me however) Cheers.Steve -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] boot file.
Hi all, I am having trouble editing my grub boot file. I can log on as su - and change to the dir. but when I try to edit the grub.conf file all I get is a blank screen with grub.conf 1L, 1C on the bottom line. What am I doing wrong. Paul. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Email Cascading?
Kevin Fitzgerald wrote: I want to set it up so that scalix.company.dyndns.org periodically goes to mail.company.com.au, gets the mail and puts it in the appropriate mailboxes. I know that one way to do this would be set up forwarders at mail.company.com.au but this does not actually clear the mailboxes there and they will max out over time. I wouldn't do that. I would simply have the server use postfix transport mapslike so: company.com.au :company.dyndns.org:2525 that is, if port 25 is not reachable. if port 25 is reachable and you use dyndns.org, then you can simply do it in DNS: MX 10 mail.company.com.au MX 20 your.server mail.company.com.au CNAME company.dyndns.org it does work. You do risk losing mail if their dyndns is particularly dynnamic, and whoever happens to get their IP next is an open relay. In the years I have been doing this for multiple customers, I haven't ever had that happen. Dyndns has been rock solid. They also have a few tricks to help out with hosting mail on a dyndns account - check out their pages for more info. So basically, I am suggesting hosting their mail directly on their connection. Alot less dicking around with fetchmail and forwarding etc - basically, when you add a user to the scalix setup, it just works as an email address straight away. dave -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
Steve Lindsay wrote: While I would agree that catching any bugs asap is a good thing, I find that typos and the like are not the problems that are causing me most grief (crappy logic, crappy requirements, not enough time, other developers writing crappy code, etc are more likely to cause me problems). I recently worked on a quite large piece of Python code which I inherited without any tests. The only way to test it was to run it which took 10-15 minutes. While I was working on this I was constantly finding that little bugs that an Ocaml/Haskell/Ada/Pascal etc compiler would have found were killing me at run time. It was a royal PITA. rearranged your post slightly Erik, I've never used ocaml (and know very little about it). I spoke at SLUG about it. Slides here: http://www.mega-nerd.com/tmp/firstimp-ocaml.pdf An Ocaml tutorial is here: http://www.ocaml-tutorial.org/ Would you be able to evaluate it against some of the points I've raised above, particularly in comparison to python (I'm assuming you've used python based on your criticism)? Python works for me because: a) i (and others) write less code because the language is very expressive. therefore less bugs I would say that for pure code (ie not using the excellent Python libraries) Ocaml will require slightly less LOC than Python. b) i (and others) write less code because there are heaps of modules The Ocaml libraries are not as extensive, comprehensive or as well documented as those of Python. There are however tasks where even the Python libraries won't help you. c) i write code and it tends to work first or second go (which says way more about python than it does about my coding ability). I don't have to fight the language, and don't often think why did they do it that way? The thing I have found with Ocaml and many others say about Haskell is that if it compiles its usually right. d) the code tends to be easy to read (both my code and the code in standard modules etc.) Once you get around Ocaml's slight weird syntax this does apply. e) i don't have to look up the documentation each time I try something slightly new (I can keep a large chunk of the language in my head or I can work it out by playing around in the interpreter for a few minutes) Ocaml also has a command line interpreter for experimentation. There are also bytecode and native-code compilers. f) actually I'll mention the interpreter again, it seems such a simple thing but the number of times I've not known how to use a module but worked it out in the interpreter using a combination of dir, help and __doc__ in a short period of time makes it worth mentioning as a point on it's own The Ocaml documentation is a little dry and not up the same standard as Python. However, there are some tasks for which Ocaml is a far better fit than Python. For me those would be computer algebra systems and compilers. Erik -- +---+ Erik de Castro Lopo +---+ Whenever the C++ language designers had two competing ideas as to how they should solve some problem, they said, OK, we'll do them both. So the language is too baroque for my taste. -- Donald E Knuth -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
On 11/23/05, Erik de Castro Lopo [EMAIL PROTECTED] wrote: lots of interesting stuff Cool, thanks Erik. Will check it out. CheersSteve -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] boot file.
Paul Maloney wrote: Hi all, I am having trouble editing my grub boot file. I can log on as su - and change to the dir. but when I try to edit the grub.conf file all I get is a blank screen with grub.conf 1L, 1C on the bottom line. This means your file has exactly 1 character(perhaps a space) in 1 line. What am I doing wrong. Are you in the correct directory ? If yes, check your grub.conf file using, #ls -l grub.conf -rw-r--r-- 1 root root 1 Nov 23 20:23 grub.conf If you have something like in the above, you've lost the contents of grub.conf. Hope this helps. O Plameras -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Three free C books on offer (was Re: [SLUG] C Gurus)
O Plameras wrote: Erik de Castro Lopo wrote: If you come to the SLUG meeting on Friday, I will bring you a copy of this book so you can see for yourself. If you then publically admit that you were wrong on this issue you can keep the book [1]. It's nice of you to make that offer. Unfortunately, I can't come, physically but can be reached by email. Besides, your book will just gather dust. I suggest you gave it to SLUG enthusiasts who are keen to learn C. I'll make this offer, though. For every SLUG enthusiasts to whom you will give a book for free that can satisfy me that they learned from your book What about Hal Ashburner? He has told me that he found my book useful. Does he count? and say it's not a waste of their time, I'll offer to pay you half the bookshop's retail price . This offer is good for up to 25 enthusiasts. I'd be happy to take you up on this offer. Unfortunately I only have three remaining spare copies. So, the first three people who can attend Friday's SLUG meeting and are interested in this should email me privately (and CC Oscar) with the title of the book. - If one of the first three people don't show up at SLUG the book will go to the next person on the list. - If we don't get three people who sent email the books will go to people who are there on the night. Anyone interested can also inspect pages 39 to 42 for themselves. Erik -- +---+ Erik de Castro Lopo +---+ Being really good at C++ is like being really good at using rocks to sharpen sticks. -- Thant Tessman -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] I hate udev!
On Wednesday 23 November 2005 13:36, [EMAIL PROTECTED] wrote: Catchy Subject? rant emotion=annoyed sanity=atrisk Yes I hate udev because if my server is rebooted and the tape drive isn't switched on then the entries in /dev/ such as nst0 don't get created. Then my backup fails or worse the disk is completely full because writing to /dev/nst0 when the device file doesn't exist creates a data file on the disk which grows to be bigger than the /dev partition. I don't want to reboot my server right now but I'd love to be able to do a backup. Is there a sane way to tell udev to create the entries for the device without rebooting? 1) Turning on your tape drive should create the dev entries 2) Make your backups just a tiny bit cleverer eg RFMd on bash and test -b file True if file exists and is a block special file. -c file True if file exists and is a character special file. if [ -c /dev/nst0 ]; then do the backup else echo 'Turn on the power, Luke' fi also lsmod and modprobe are your friends James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Why not C
On Wed, 2005-11-23 at 18:18 +1100, Erik de Castro Lopo wrote: Robert Collins wrote: However, Perl, Python and Ruby are also often the wrong language. [try finding variable name spellos or type parity problems quickly in these languages - in a nice polite language like C, the compiler would find it nice and quickly for you]. I find that test cases find these things extremely fast. And the find bugs that compilers cant :) The Python compiler can't even find mis-spelled variable names, they have to wait for the run time envronment. Personally I think that is a little late :-). When you have the opportunity for that sort of error, sure. While I agree wholeheartedly that tests are necessay, I'm curious why you are advocating writing Python tests to find bugs at run time that say an Ocaml compiler will find for free at compile time. MMM. Not quite what I would advocate, I was rebutting an argument against dynamic typing languages, which I see as 'because my code is not known to work, the compiler should do more'. What I would advocate is that *all* things being put into code should have two, and only two expressions: one in a test, stating what should occur, and one in whatever form in the code, to actually do it. I see that as being unrelated to language - its important for ocaml, python even assembly. The corollary is that if you are doing this, variable names, type mismatches, and the like, are rarely if ever a problem, and also algorithmic errors, and bugs in general are much less common. Rob -- GPG key available at: http://www.robertcollins.net/keys.txt. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
Steve Lindsay wrote: Python works for me because: a) i (and others) write less code because the language is very expressive. therefore less bugs Gra. Grammar fascist attack coming up: Less is a measure of quality not quantity. So by saying there are less bugs what you are implying is that there are the same number of bugs, but the bugs are smaller. What you probably want to say is fewer bugs. This has been a community service announcement. (Just because you write code doesn't mean you can't write English too). -- Del -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
Should probably move this to [chat]... On Wed, Nov 23, 2005 at 10:42:54PM +1100, Del wrote: Steve Lindsay wrote: Python works for me because: a) i (and others) write less code because the language is very expressive. therefore less bugs Gra. Grammar fascist attack coming up: Less is a measure of quality not quantity. So by saying there are less bugs what you are implying is that there are the same number of bugs, but the bugs are smaller. What you probably want to say is fewer bugs. Agreed but... Here perhaps is where language differs from code. If enough people over a long enough period of time use less as a measure of quantity (as in something measurable in discrete units), it will indeed become a measure of such. Dictionaries, and therefore definitions, are constructed through analysis of usage. That would throw a spanner in the works for compiler writers wouldn't it? Denis -- Dr Denis Crowdy Department of Contemporary Music Studies Macquarie University NSW 2109, Australia +61 2 9850 6787; http://www.dcms.mq.edu.au -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
quote who=Denis Crowdy Dictionaries, and therefore definitions, are constructed through analysis of usage. That would throw a spanner in the works for compiler writers wouldn't it? Good morning, Perl 6! - Jeff -- Ubuntu USA Europe Tour: Oct-Nov 2005http://wiki.ubuntu.com/3BT Just because I sit in front of a terminal all day doesn't mean I couldn't hunt you down and righteously kick your ass to feed my newfound cannabalism. - Darwinian System Administration -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] debian developers perth
Hi all, To all the Debian Developers on the list: Please consider sunny Perth for a holiday destination this Christmas! Visit the coral reefs, the surf, the forests and the forest dunes! That way you could sign my GPG key while you are over here :) -- bye, pabs http://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: Three free C books on offer (was Re: [SLUG] C Gurus)
Russell Davie qualifies. Give him 21 days and we'll see how he goes. I'll email him to see how he goes after 21 days. And so 24 more books to go. To Russell: Congratulations you have reasonable case to receive this offer with the brief you have provided. Please provide a photo of the Back Cover of the book, the one with the ISBN Number (and a photo of the page that has the price tag if there is) and email it to me. Can you provide me also with a short resume or bio-data with your qualification, age, training, current employer, and contact address apart from your email. To Erik: Please provide me with your Postal Address and I'll send you a cheque when I have check with Russell after 21 days. I did not receive Erik's original email on this can you re-send it to me, please ? Thanks. O Plameras Russell Davie wrote: On Wed, 23 Nov 2005 21:49:25 +1100 Erik de Castro Lopo [EMAIL PROTECTED] wrote: O Plameras wrote: Erik de Castro Lopo wrote: If you come to the SLUG meeting on Friday, I will bring you a copy of this book so you can see for yourself. If you then publically admit that you were wrong on this issue you can keep the book [1]. It's nice of you to make that offer. Unfortunately, I can't come, physically but can be reached by email. Besides, your book will just gather dust. I suggest you gave it to SLUG enthusiasts who are keen to learn C. I'll make this offer, though. For every SLUG enthusiasts to whom you will give a book for free that can satisfy me that they learned from your book What about Hal Ashburner? He has told me that he found my book useful. Does he count? I said in my offer . . . will . . . , but I will make this ONE and ONLY ONE exception. So, the answer is YES, he gets the offer if he wants. To Hal: Please provide a photo of the Back Cover of the book, the one with the ISBN Number (and a photo of the page that has the price tag if there is) and email it to me. Can you provide me also with a short resume or bio-data with your qualification, age, training, current employer, and contact address apart from your email. Can you write short description of your experiences with the book and email me along, please. and say it's not a waste of their time, I'll offer to pay you half the bookshop's retail price . This offer is good for up to 25 enthusiasts. I'd be happy to take you up on this offer. Unfortunately I only have three remaining spare copies. So, the first three people who can attend Friday's SLUG meeting and are interested in this should email me privately (and CC Oscar) with the title of the book. - If one of the first three people don't show up at SLUG the book will go to the next person on the list. - If we don't get three people who sent email the books will go to people who are there on the night. Anyone interested can also inspect pages 39 to 42 for themselves. Erik -- +---+ Erik de Castro Lopo +---+ Being really good at C++ is like being really good at using rocks to sharpen sticks. -- Thant Tessman -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html Erik (and Oscar) The title is Sams Teach Yourself C for Linux Programming in 21 Days ISBN: 0672315971 I'd love a copy and love to get to Slug on Friday, though live in Lismore. If nobody claims a book, may I request to be the default receiver? I am happy to pay postage! I yearn to learn C to be able to write an ap for tracking change in heart rate with a pulse oxymeter plugged into com port. And now really keen now after your passionate banter!. BTW, strange, how elx.com.au don't have it, and bookware.com.au do but omit the all important C programing in the title. The reviews from Amazon are astounding! regards Russell -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: Three free C books on offer (was Re: [SLUG] C Gurus)
O Plameras wrote: I did not receive Erik's original email on this can you re-send it to me, please ? http://lists.slug.org.au/archives/slug/2005/11/msg00511.html Erik -- +---+ Erik de Castro Lopo +---+ It has been discovered that C++ provides a remarkable facility for concealing the trival details of a program -- such as where its bugs are. -- David Keppel -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
1) Turning on your tape drive should create the dev entries Nope didn't do it. The tape drive is a scsi device and the hotplug or whatever that this udev is supposed to be designed to work with obviously doesn't see it / detect it. Not surprising really I don't ever recall that a scsi device would send a signal on the scsi cable when it was turned on. 2) Make your backups just a tiny bit cleverer eg RFMd on bash and test Good idea, but annoying that it should need to be necessary and completely out of my control should I decide to install a backup software package such as veritas. also lsmod and modprobe are your friends Can't see any modules that pertain to tapes. Only the scsi driver and I'm not about to rmmod insmod that. Thanks for the ideas P. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Thunderbird
On Wed, 23 Nov 2005 09:54, [EMAIL PROTECTED] wrote: SLUG, This morning I have tried to open Thunderbird only to find it won't open. I click on Thunderbird, and my desktop thinks about it, but somehow won't load up my default profile. I have important e-mails that I can't afford to lose. Anyone please? I am using Xandros Deluxe 3.0 (KDE). I've seen this happen with Firefox because of an incorrect entry in the prefs file. First, make sure you kill all running processes of Thunderbird. Then, backup and delete the prefs.js and user.js files and try starting Thunderbird again. -- Sridhar Dhanapalan [Yama | http://www.pclinuxonline.com/] {GnuPG/OpenPGP: http://dhanapalan.webhop.net/yama.asc 0x049D38B4 : A7A9 8A02 78CB AB1B FCE4 EEC6 2DD9 249B 049D 38B4} We will get the source code up on the Web - anybody who specifically wants a copy can just ask. -- Bill Gates, 2002 pgpwwe7WwvOBX.pgp Description: PGP signature -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Code name C
On Wed, 2005-11-23 at 13:13 +1100, Benno wrote: On Tue Nov 22, 2005 at 19:47:51 -0600, [EMAIL PROTECTED] wrote: - char* somefunction() { char string2[] = some words; return string2; } -- doesn't In this case you have initialised a stack value to some initial value. Here the memory is on the stack. Which means the memory may not be addressable at all (proper memory management) or it may be addressed but may well be overwritten by something in between, even just returning from the function call. This will probably work then not and you will wonder why. char *string2 = some words\0; string1 = (char *)calloc(strlen(string2 + 1), sizeof (char)); strlen (string2 + 1) = strlen (ome words); why do you want to do that? Errr, that wasn't meant to be C, just saying that strlen(string2 + 1) is equvilant to strlen(ome words); char * pointer = Some String pointer + 1 refers to the o in the some string so: strlen( pointer + 1 ) will equal 10 strlen( pointer ) + 1 will equal 12 One is right and one is totally wrong. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
On Thu, 2005-11-24 at 06:58 +1100, [EMAIL PROTECTED] wrote: 1) Turning on your tape drive should create the dev entries Nope didn't do it. The tape drive is a scsi device and the hotplug or whatever that this udev is supposed to be designed to work with obviously doesn't see it / detect it. Not surprising really I don't ever recall that a scsi device would send a signal on the scsi cable when it was turned on. Theres a tool around somewhere to scan a scsi bus - you should run that now that the tape drive is on. Rob -- GPG key available at: http://www.robertcollins.net/keys.txt. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Re: [SLUG-ANNOUNCE] Monthly Meeting: November, 2005
On Wed, 2005-11-23 at 15:00 +1100, Taryn East wrote: Hi all, * Chris Deigan [EMAIL PROTECTED] spake thus: 8:20pm (approx): Split into two groups for: * Special Interest Talk: Erik de Castro Lopo - Careers for Geeks is it possible for a recording to be made of this talk? It sounds really interesting, and I'd love to get to it, but I currently have a pre-existing and now immoveable appointment on that night :( We record all the main talks, only sluglets dont get recorded. Cheers, Rob -- GPG key available at: http://www.robertcollins.net/keys.txt. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Re: C Gurus
On Wed, Nov 23, 2005 at 08:55:50AM +1100, O Plameras wrote: Erik de Castro Lopo wrote: If you come to the SLUG meeting on Friday, I will bring you a copy of this book so you can see for yourself. If you then publically admit that you were wrong on this issue you can keep the book [1]. I am just wondering where I was wrong Ghods awful code, for a start. and I did not say I was wrong ? But you never do. - Matt Don't make me write another drinking game Palmer -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Re: debian developers perth
On Thu, Nov 24, 2005 at 02:16:29AM +0800, Paul Wise wrote: To all the Debian Developers on the list: Please consider sunny Perth for a holiday destination this Christmas! Visit the coral reefs, the surf, the forests and the forest dunes! That way you could sign my GPG key while you are over here :) Consider holidaying in Dunedin this January. Possibly not quite so sunny, but you could probably rack up close to 50 DD sigs if you worked at it. grin I take it that you had no luck contacting Perth-local DDs for a signature? That surprises me, as I know at least one of them (go Jeremy!) is alive and active. - Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Re: C Gurus
On Wed, Nov 23, 2005 at 10:34:04AM +1100, ashley maher wrote: G'day, As the original poster, I did expect to eat some humble pie asking such a trivial question. Thanks to those who gave serious answers. (As most of the respondents know me I expect I'll get a hard time for a while over that one.) I've been playing with gtk and found myself getting very confused, so I decided the fastest way of re-orientating myself was to seek the assistance of the SLUG Gurus. So I've sorted my confusion, and learned a great deal. Now back to banging my head against a brick wall called gtk. Dude. Programming GUIs in C is so amazingly painful, it makes my eyes water just thinking about it. PyGTK is far less hassle, and if you want to leverage your existing knowledge, there's PerlGTK. I'd go looking for GTK bindings for Fortran before I ever use the native C GTK library again. C + GUI == Pain. - Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
On Wed, Nov 23, 2005 at 06:59:51PM +0800, [EMAIL PROTECTED] wrote: 2) Make your backups just a tiny bit cleverer eg RFMd on bash and test I was going to suggest something similar, but use 'mt stat' instead; it will fail if the tape is not loaded, needs cleaning, and also if it's not a char file. -- Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Re: C Gurus
Matt Palmer wrote: On Wed, Nov 23, 2005 at 08:55:50AM +1100, O Plameras wrote: Erik de Castro Lopo wrote: If you come to the SLUG meeting on Friday, I will bring you a copy of this book so you can see for yourself. If you then publically admit that you were wrong on this issue you can keep the book [1]. I am just wondering where I was wrong Ghods awful code, for a start. Wrong. And what's your alternative code ? and I did not say I was wrong ? But you never do. Wrong again. - Matt Don't make me write another drinking game Palmer -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
On Wed, Nov 23, 2005 at 07:46:36PM +1100, Erik de Castro Lopo wrote: Steve Lindsay wrote: While I would agree that catching any bugs asap is a good thing, I find that typos and the like are not the problems that are causing me most grief (crappy logic, crappy requirements, not enough time, other developers writing crappy code, etc are more likely to cause me problems). I recently worked on a quite large piece of Python code which I inherited without any tests. The only way to test it was to run it which took 10-15 minutes. While I was working on this I was constantly finding that little bugs that an Ocaml/Haskell/Ada/Pascal etc compiler would have found were killing me at run time. It was a royal PITA. Any codebase without a comprehensive testsuite is going to be painful to work on. The bugs that a compiled language picks up just get replaced in the royal PITA list by ones that the compiler doesn't pick up. Lather, rinse, repeat. So, you add a testsuite, and then there's a whole new set of bugs that crop up that can't be effectively tested for in the royal PITA list. LRR. Let's just give up this programming thing and go back to farming. def CowTest(unittest.TestCase): [...] - Matt signature.asc Description: Digital signature -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
On Thu, 2005-11-24 at 11:01 +1100, Matthew Palmer wrote: So, you add a testsuite, and then there's a whole new set of bugs that crop up that can't be effectively tested for in the royal PITA list. LRR. Well, the only bugs I've found to date that cannot be effectively tested for are concurrent operation bugs - threads and co-processes specifically. State machine based pseduo concurrency however, gives extremely easy reproduction of a bug, once you identify it ;). What sorts of bugs are your PITA list ? Rob -- GPG key available at: http://www.robertcollins.net/keys.txt. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Re: [SLUG-ANNOUNCE] RSVP for Restaurant booking post-SLUG meeting this Friday
Grant, I'm trying to get a stack of people from down here so I've forwarded your email to our South Coast LUG list. I know of two of us for the meeting so put down an RSVP for two please. Regards, Ashle On Thu, 2005-11-24 at 11:15 +1100, Grant Parnell wrote: Due to catching Spice Boys in the middle of a move we've gone with our old restaurant this month, the House of Guangzhou (AKA House of Boiled Television Entrails). I need to confirm the booking today so I'd like and indication of numbers - off list thanks. Price $25/head + drinks Here's the banquet menu:- Mixed Entree Guangzhou Special Chicken Salt Pepper Calamari Sizzling Mongolian Lamb Beef Vegetables with Oyster Sauce Pork Spare Ribs (Peking Style) Fried Rice Steamed Rice Chocolate [I'm guessing after dinner mints?] The address is 76 Ultimo Rd Haymarket and it's on the corner of Hay St from memory. -- ---GRiP--- Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, Linux Guru, SLUG President, AUUG and Linux Australia member, Sydney Flashmobber, Tenpin Bowler, BMX rider, Walker, Raver rave music lover, Big kid that refuses to grow up. I'd make a good family pet, take me home today! Some people actually read these things it seems. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: ocaml vs python/ruby/perl etc. was [SLUG] Why not C
On Thu, Nov 24, 2005 at 11:11:42AM +1100, Robert Collins wrote: On Thu, 2005-11-24 at 11:01 +1100, Matthew Palmer wrote: So, you add a testsuite, and then there's a whole new set of bugs that crop up that can't be effectively tested for in the royal PITA list. LRR. Well, the only bugs I've found to date that cannot be effectively tested for are concurrent operation bugs - threads and co-processes specifically. State machine based pseduo concurrency however, gives extremely easy reproduction of a bug, once you identify it ;). What sorts of bugs are your PITA list ? GUIs, concurrency, and graceful handling of major system faults (like database goes away in the middle of a transaction) are my three biggies. I avoid them by not doing GUIs or major concurrency unless I can avoid them, and just crossing my fingers that I'll never get an inconvenient database crash. Luckily, I don't do work in environments where such things are critical, otherwise I'd be very much unhappier. - Matt signature.asc Description: Digital signature -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Re: [SLUG-ANNOUNCE] Monthly Meeting: November, 2005
* Robert Collins [EMAIL PROTECTED] spake thus: We record all the main talks, only sluglets dont get recorded. understood, but not all of them are available on the website... I guess I'm putting in a special request that this one go up - it would be really appreciated :) Many thanks, Taryn -- This .sig temporarily out-of-order. We apologise for any inconvenience - The Management -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] RSVP for Restaurant booking post-SLUG meeting this Friday
Due to catching Spice Boys in the middle of a move we've gone with our old restaurant this month, the House of Guangzhou (AKA House of Boiled Television Entrails). I need to confirm the booking today so I'd like and indication of numbers - off list thanks. Price $25/head + drinks Here's the banquet menu:- Mixed Entree Guangzhou Special Chicken Salt Pepper Calamari Sizzling Mongolian Lamb Beef Vegetables with Oyster Sauce Pork Spare Ribs (Peking Style) Fried Rice Steamed Rice Chocolate [I'm guessing after dinner mints?] The address is 76 Ultimo Rd Haymarket and it's on the corner of Hay St from memory. -- ---GRiP--- Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, Linux Guru, SLUG President, AUUG and Linux Australia member, Sydney Flashmobber, Tenpin Bowler, BMX rider, Walker, Raver rave music lover, Big kid that refuses to grow up. I'd make a good family pet, take me home today! Some people actually read these things it seems. -- ---GRiP--- Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, Linux Guru, SLUG President, AUUG and Linux Australia member, Sydney Flashmobber, Tenpin Bowler, BMX rider, Walker, Raver rave music lover, Big kid that refuses to grow up. I'd make a good family pet, take me home today! Some people actually read these things it seems. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] Debian Codefest this weekend (is it on?)
Hi All, According to the SLUG website events calendar there is a Debian codefest this weekend. The site is listed as TBA. Does anyone know if this will be happening or has it been cancelled and not removed from the webpage ? I'm hoping to get some pointers on building a Debian package and would be happy to help with squashing bugs. Cheers David -- David Creelman GPG: 11CC 0D54 D37A 4B9C 5C65 AB63 5B18 7F99 7D77 9CA5 -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] old svnadmin required to recover database
Hi! Does anyone have an old svnadmin-0.33.1 static binary lying around? If you have an old Debian unstable machine, that had subversion installed late 2003, then you might be able to help me :) I've got an old subversion repo that I'd like to extract the changesets out of, unfortunately the current subversion can't read it becaue it appears to be in berkeley db 4.0 format -- but the db4.0 tools can't extract it because the btree format in this database is version 9, it appears that the db4.0 I have only supports version 8. I hope this makes sense to someone... Anyway, the upshot is that I think the only way I can recover from the repo is to get a static build of svnadmin from around November 2003, versions either 0.33.1, 0.34, or possibly 0.35. I know the Debian packages at the time shipped a static build and kept it lying around after upgrades just to one could dump and reload the database in such an event, so I'm really hoping someone on the list has got it :) If you have, can you send me it in private mail? -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
also lsmod and modprobe are your friends Can't see any modules that pertain to tapes. Only the scsi driver and I'm not about to rmmod insmod that. I guess that you should spend the time to learn about your system, which makes the process here much easier :-). Look in /lib/modules/your-kernel/kernel/drivers/scsi uname -a will tell you your-kernel name Then, from dim memory, the module you need for tapes is sr (scsi raw) but try, and see James -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Re: [SLUG-ANNOUNCE] Monthly Meeting: November, 2005
Taryn East wrote: * Robert Collins [EMAIL PROTECTED] spake thus: We record all the main talks, only sluglets dont get recorded. understood, but not all of them are available on the website... I guess I'm putting in a special request that this one go up - it would be really appreciated :) Completely understood. We're actually processing a backlog of talks at the moment, so the more recent ones can take a while to go up. I'll have to talk to Chris about it, but I have no problem with processing the new talks while he sorts through the backlog so we can get them up faster. Lindsay -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] Code name C
[EMAIL PROTECTED] wrote: I find this interesting. snipped char* somefunction() { char string2[] = some words; return string2; } -- doesn't Hi Yiz, A couple of people have explained why the above does not work. My attention will focus on How to make it work. As suggested, the main requirement is to have a pointer that you can use to manipulate the string around. So, I modified the function to get, char* somefunction() { char * string1; /* I define a char pointer since your array is char string */ char string2[] = some words; string1 = malloc(11); /* In the context of this program, it is sufficient to set aside 11 bytes */ strcpy(string1,string2); /* I duplicate string2 into string1 */ return string1;/* I return address of string1 to become the value of somefunction() */ /* which is passed on to main() and then printed by main() */ } int main(void) /* I added main function to complete a test program */ { printf(\nThe string is: %s\n, somefunction()); /* somefunction() initialised and printed */ return 0; } You appear to be a keen user of C. One suggestion, learn to use GDB ( http://www.gnu.org/software/gdb/ ) if you have'nt yet. This package will help you understand further why the original 'somefunction()' did not work. Hope this helps. O Plameras -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
[EMAIL PROTECTED] wrote: Can't see any modules that pertain to tapes. Only the scsi driver and I'm not about to rmmod insmod that. I take it this is 2.6 - if its 2.4 you need to run the rescan-scsi-bus.sh script (google knows where it is) dave -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: [SLUG] I hate udev!
On Thu, 2005-11-24 at 06:58 +1100, [EMAIL PROTECTED] wrote: Can't see any modules that pertain to tapes. The module you need to reload is the lowest level one, the HBA's device driver. Some of them have an ioctl which rescans, so you don't need to rmmod insmd. Also, this works for my scsi slide scanner, which is usually off, too: echo 'scsi add-single-device host channel id lun ' /proc/scsi/scsi Read drivers/scsi/scsi.c for what else /proc/scsi/scsi can do. -- Regards Peter Miller [EMAIL PROTECTED] /\/\*http://www.canb.auug.org.au/~millerp/ PGP public key ID: 1024D/D0EDB64D fingerprint = AD0A C5DF C426 4F03 5D53 2BDB 18D8 A4E2 D0ED B64D See http://www.keyserver.net or any PGP keyserver for public key. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
[SLUG] lamdaemon.pl Configuration Issues
Heya SLUGgers. I've been battling lamdaemon.pl recently (part of LDAP Account Manager) and I've not managed to get it to create home directories for users. I've configured LAM with: - the remote host IP - the path to lamdaemon.pl on the remote host Also: - there is an account in LDAP for the LAM admin - I've configured sudo on the remote host as per the lamdaemon README (confirmed it's correct operation) - configured the remote host for quotas (and tested) - All required Perl modules are installed When I run the test programme this is the result: $ path_to/lamdaemon.pl remote_host remote_path_to/lamdaemon.pl \ admin_name admin_passwd *test Net::SSH::Perl successfully installed. $ No failure message but neither is there a success message. A reference to quotas is also missing. In the log file for the remote host, I see the following: Nov 24 16:39:54 my_host sshd(pam_unix)[19954]: check pass; user unknown Nov 24 16:39:54 my_host sshd(pam_unix)[19954]: authentication failure; logname= uid=0 euid=0 tty=NODEVssh ruser= rhost=lam_host Nov 24 16:39:54 my_host sshd(pam_unix)[20009]: session opened for user LAM_Admin by (uid=859) Nov 24 16:39:54 my_host sshd(pam_unix)[20009]: session opened for user LAM_Admin by (uid=859) Nov 24 16:39:55 my_host sshd(pam_unix)[20009]: session closed for user LAM_Admin lam_host is the LAM server making the connection request. I can ssh in as LAM_Admin and run lamdaemon with sudo and there are no errors. Has anyone seen this problem before? Any clues (or cluebats) on resolving this one? It's starting to drive me a little spare :) The remote host is a RHEL3 box. The LAM host is a Debian (Sarge) machine. TIA, Craige. signature.asc Description: This is a digitally signed message part -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html