Thread: About the cpwiki . . .

  1. #1
    Resu Deretsiger Nightowl's Avatar
    Join Date
    Nov 2008
    Location
    /dev/null
    Posts
    186

    About the cpwiki . . .

    I'm sorry if this is a bit out-of-date, but I read some of the articles and came across cpwiki.

    Now, here's my problem. I'd like to contribute, but it says that I have to be one of the admin or editor groups.

    Should this be fixed? Aren't Wikis supposed to be open and editable by all? (Or at the very least, require someone to sign up with Sourceforge first . . .).

    Since when I click on the "login" link, it requires me to login with my Sourceforge username/password combo. Fine. I login, and I can't edit anything. (Presumably because I'm not part of the Sourceforge project. Fine. It tells me to "contact one of the project admins" to be added to the project.)

    Is this not a direct violation of who can contribute to a wiki? Or does cpwiki not follow the Wikipedian rules?

    Confuzzled me cannot comprehend this.

    Thanks.
    Do as I say, not as I do . . .

    Experimentation is the essence of programming. Just remember to make a backup first.

    "I'm a firm believer that <SomeGod> gave us two ears and one mouth for a reason - we are supposed to listen, twice as much as we talk." - LEAF

    Questions posted by these guidelines are more likely to be answered.

    Debian GNU/Linux user, with the awesome window manager, the git version control system, and the cmake buildsystem generator.

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I just noticed this myself. I suspect that zacs7 upgraded on November 4th.

    I'm looking into it.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    I'm getting a password dialog box.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I was able to log in at the password dialog box by specifying my username and password from before, but I wasn't able to figure out how to create a new user. Nor was I able to edit any pages whatsoever once I had logged in, even my own user page.

    Sorry, I'm not sure what's up.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Yes I upgraded, because it was br0ken. However, I used the wiki that sf.net offered because the original was going to break with the sf.net upgrades. The accounts are done through sf.net.

    > Is this not a direct violation of who can contribute to a wiki?
    Not at all. Everyone is welcome to contribute you just need an account.

    Everyone is welcome to contribute, however when it was open slather before the wiki was vandalized.

    To login just change it to "https", you will need to be added to the project first however. Just pm me or the other admins on the project page (http://sourceforge.net/projects/cpwiki/) if you want to be added.

    I'm not trying to control the wiki at all if it seems like that, I just fixed it so it wasn't broken and all previously referenced urls work. And this way we get automatic wiki upgrades

    It's on sf.net because there was really no other place to host it at the time (nor does there seem to be now).

    [edit]
    Okay fishies, I *think* I know how it works.

    Just your sf.net username and password to login, you'll then need an admin to give you the "editor" flag. You don't need to be a member of the cpwiki project (I think ).

    So list your username here (once you've logged in) and I'll give you the editor flag and we'll see if it works.

    Nightowl (Nightowl256): I gave you the editor flag, see if it works.
    [/edit]
    Last edited by zacs7; 12-12-2008 at 06:58 PM.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Works for me now. I tried making myself an admin, and zacs7 did too, so something worked evidently.

    I wonder if there is a way to make new users automatically added to the editor group, or allow the Users group to edit pages? I suspect that if we have to enable writing for users, we won't get as many users as we would otherwise.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I do agree. People are lazy to sign up, and even more annoyed if they must wait for permission.
    Unfortunately, I cannot see a way to either allow non-editors to edit, or to change just registered people to the editor group.
    The admin interface kind of sucks, in other words.
    Well, for as long as an admin has to grant permission, I can grant permissions, as well, and I am on frequently, so a PM with the sf username and I'll move you to editor.

    Still, this is a problem that really should be fixed... *grumble* *grumble*
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Hey so are the editors/admins of the wiki still the same?

    I have to transfer an existing web db interface -- 20000 pages -- to a (Semantic) MediaWiki, so for now I have mediawiki set up at home and before I design the automation scripts to transfer the material, I need to get a feel for how mediawiki works. Which means just writing some pages, I guess.

    Of course, these can just be junk but I doubt I will get the same feel or insight that way, so I'm going to have to write real pages. So they might as well be real pages that I can cut and paste to somewhere else (such as cpwiki) later. I also don't want to bother doing wikipedia type stuff (find a new topic) or uncyclopedia stuff (just being coherent is fine, never mind funny), the best choice is probably some basic C stuff that people ask about like how to write timers or use pthreads or something.

    And of course I think it's a good idea.

    Anyway, no rush. I have a sf account but I can't edit or add a page.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Yeah, that's a known limitation with the current wiki. I'm still an admin, so gimme your account and I'll make it possible for you to add/edit pages.
    Send me a PM in case you don't want to post it publically.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Alright gang, I added a few pages:

    https://sourceforge.net/apps/mediawi...=Serialization
    https://sourceforge.net/apps/mediawi...izing_an_array
    https://sourceforge.net/apps/mediawi...e=POSIX_timers

    That last one is my piece de resistance

    For those of you unfamiliar with the philosophy behind wiki proliferation, if you write a page and leave a [[link]] in which does not exist yet, that link appears in red. Anyone (with editing privileges, PM Elysia) can then click on that link and start the new page. So if you are bored and short of ideas, here's a few of the topics I left red links to:

    Structures
    Linked Lists
    Arrays
    Preprocessor Defines
    Error Checking
    Networking
    Function Pointers

    Most of these could be adequately began with 5 minutes work. A page on "arrays" or "structures" may seem pointless, but it could easily become a repository for little known facts and details, sort of like how Epy was talking about his programming notebook a week or so ago.

    If you want to add a new page not from an existing dead (red) link, you can create a dead link by listing the new page in the "annoted page" list on the main page and then use [[that]].

    I can't recommending any online docs for mediawiki because I'm using a book, but I'm sure they exist and it is pretty simple. If you go for the "infer from existing code" method, since you are programmers, beware that this:
    Code:
    [[Arrays|an array]]
    does not indicate that this will match one "OR" the other. The first part is the CASE SENSITIVE name of the actual existing page, the second is the term you wish to appear as a link to it. If they are one and the same you can just use [[Arrays]].

    It might be nice one day to upgrade to MW 1.9 so we can install an extension to use code highlighting, but for now you will have to settle for <pre> tags.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Someone may want to write an article about clearing the input buffer. So common problem, yet I am too lazy to write one. Another thing to add to the list of someone interested.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by Elysia
    Someone may want to write an article about clearing the input buffer. So common problem, yet I am too lazy to write one. Another thing to add to the list of someone interested.
    So you want to clear an input buffer? "Clearing an input buffer" is a [[stupid|clever]] thing programmers will say instead of "ignoring some text." Chances are you are reading this because you've witnessed what happens if you don't ignore sufficiently. Data gets misplaced. Let's discuss fixes.

    The smart thing to do is avoid the problem by storing each line of text completely. In C and C++ there is a newline character, '\n', that marks the end of the line. It doesn't matter if you're getting input from the keyboard or a file, you can depend on its presence: The last thing a user will do before the program works with the input is press enter, so you know the input is complete, even if it's malformed or bad input; files will have '\n' at the end of their lines. It looks like this in code:

    Code:
    /* C code: */
    char section[BIGBUFF];
    char *line = NULL;
    
    while(fgets(section , BIGBUFF , stdin) != NULL) {
       char *temp = NULL;
       if(line != NULL) {
          temp = realloc(line , strlen(line) + strlen(section) + 1);
       }
       else {
          temp = realloc(line , strlen(section) + 1);
       }
       if(temp == NULL) /* plan to exit with error */ break;
       line = temp;
       strcat(line , section);
    }
    
    /* If there were no errors we can use the string data as an argument to sscanf,
       or whatever you may need to do: */
    if(ferror(stdin) == 0) { 
       parse(line);
    }
    This is the store everything, worry about validation later approach, a winning approach. This approach is also the one you should use for text files 99% of the time. Ignoring parts of input files can lead to [[garbage in, garbage out]] and all the misery that comes with it.

    But perhaps you are a student and for one reason or another are not allowed to take it. You may be putting data directly into variables via cin or scanf, or getchar. You can still use what you know about '\n' to your advantage.

    Code:
    /* C code: */
    int yourAge = 0;
    char junk = '\0'
    char first = 'A';
    
    printf("What's your age?\n");
    scanf("%d" , &yourAge);
    while((junk = getchar()) != '\n' && junk != EOF);
    
    printf("What's your first initial?\n");
    first = getchar();
    while((junk = getchar()) != '\n' && junk != EOF);
    
    /* Example output: 
    What's your age?
    42 abc\n
    What's your first initial?
    \n
    */
    Consider the answer to the first question. We know that 42 is interesting. Scanf will read that into the variable good enough, but the other stuff ought to be ignored. If we follow the same strategy of reading until '\n' (in effect, the while loop above), we can pretty much guarantee a fresh read from the keyboard every time.

    The answer to the second question introduces us to a problem with our handy loop. If the first = getchar(); statement accepts an '\n', our handy loop will wait for the person to type more! You've started a fresh read by accident. Unfortunately, there is not a lot you can do about this. If you stick to one function to read everything, you can avoid this, because you should either need to clean up after the same function every time, or never.

    Consistency is what makes this work so well. For further reading, know how your file API functions work, and how they break, to make better input routines:
    *[[Scanf woes]]
    *[[fgets]]
    *[[feof]]

    Practice!

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    ...So instead of writing down a reply here, why didn't you just put it on the wiki!?!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Yes, but they're incomplete in this regard.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cpwiki vandalism
    By whiteflags in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 09-03-2008, 09:31 AM
  2. Wiki FAQ
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 192
    Last Post: 04-29-2008, 01:17 PM
  3. Contributors: Boost at CPWiki
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 02-09-2008, 01:58 PM