Slashdot Mirror


User: Karellen

Karellen's activity in the archive.

Stories
0
Comments
523
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 523

  1. Re:The 'help' command on The Command Line - Best Newbie Interface? · · Score: 1

    Point 1 is incorrect. It only tells you you can't remove non-empty directories unless you're a super-user.

    Point 4 is bad. All use of rm is destructive. That's what it does. It's unlikely you have any files called "*" that you are trying to remove. You are only likely to try "rm *" if you are trying to delete all your files. "-r" recursively deletes files. "rm -r *" recursively deletes all files. What sort of warning do you want?

    "Warning: 'rm -r *' will recursively delete all the files in the current directory."?

    You already know that. What other warnings do you want?

    "Warning: 'rm file' will delete 'file'."?
    "Warning: 'rm' is scary. Use 'mv' to put the file somewhere else instead."?

    2, 3 and 5 are valid, and directly attributable to GNU's love of `info`, which most people I know hate. GNU - please go back to maintaining your man pages. They're so much more useful than `info` as a quick reference.

  2. Re:The 'help' command on The Command Line - Best Newbie Interface? · · Score: 1

    ...all the different commands on linux systems

    Hmmm....lets have a try.

    $ cat > ~/bin/help
    #! /bin/sh

    if [ "$1" ]; then
    man 1 $1
    else
    for file in /bin/* /usr/bin/*; do
    whatis `basename $file` | grep -E " \\(1\\) "
    done
    fi
    ^D
    $ chmod 777 ~/bin/help
    $

    Hey, that looks OK. It could search $PATH instead of just /bin and /usr/bin, and it's not ncurses, but it's a start. However, if you give it a try you get hundreds of commands fly up the screen. You could pipe through your pager, but it gets to be quite a job paging through all of that. How many commands are there on my system?

    $ help | wc -l
    1324
    $

    1324 different commands eh? Better come up with a way of whittling those commands down some if this is intended for newbies. :)

  3. Re:do what i do on Morphing Code to Prevent Reverse Engineering? · · Score: 1

    No, I only use vim. However, I can search for the variable "i" by typing: /\

    which means:

    / = search for
    \ = end of word

    which finds the next occurrence of "i" as a distinct word in the current file. Easy. If your "modern" IDE can't do that, I'd really have to question just how useful (as opposed to covered in useless bells and whistles) it actually is.

    K.

  4. Right-hander page-flip backwards? on Alternatives to Icons and Start Menus? · · Score: 1

    It's arguably easier for a right-hander to flip a magazine from back to front.

    Sorry to pick up on a minor, parenthesised part of your posting, but I agreed with the rest. :)

    What do you mean it's easier for right-handers to flip a magazine from back to front? I'm mostly left-handed, and will pick up and hold a magazine by the flippy (right-hand edge, as it appears sat on the newsstand) edge in my left hand. I'm presuming right handed people will hold a magazine by the flippy edge in their right. (Seems logical). If I do this my thumb is to the rear of the magazine; therefore right-handers will have their thumb on the front. As I flip pages by letting my thumb riffle across the flippy edge of the magazine, the back cover goes first, followed by the back page, and so on... towards the front.

    So how does a right-hander do exactly the same?

    (Or is this some odd right-handed thing that right-handers do? I still can't get over the fact that when you're eating and you put your knife down, you change the hand you have the fork in. That's just absurd. Why don't you have a fork/spoon/stabbing/shovel hand, and a cutting hand?)

  5. Re:Another way to go... on Why Such Unimaginative Nomenclature? · · Score: 4, Funny

    How about the new low-calorie communion wafer "I can't believe it's not Jesus"?

  6. Re:worst beatles cover ever? on Shatner to Record Another Album · · Score: 1

    Vanilla Ice with a nu-metal cover of Strawberry Fields Forever?!?!

    Must. Not. Beat. Head. Against. Wall.

    Just knowing that that exists makes my world a more painful place to live.

    *shudders*

  7. Letter is a smokescreen for stock manipulation on McBride's New Open Letter on Copyrights · · Score: 4, Interesting

    Interesting that this letter is published the day before all 3 motions to compel in the case between SCO and IBM are scheduled for oral arguments? (http://www.groklaw.net/article.php?story=20031123 184010235)

    I reckon this is just a ruse to get their stock price as high as possible before they get their ass handed to them later today and it crashes through the floor.

  8. Re:auto-backups the plan9 way on Home Directory In CVS · · Score: 1

    Why the hell would you back up the binaries in your system directories? You've already got all of that on CD somewhere. That's the most pointless thing I've ever heard of.

    Back up your system config yes, but that's all in `/etc`.

    For other software you've downloaded, written or otherwise acquired, backup their config files from `/usr/local/etc` and keep _one_ copy of the sources that will probably be in `/usr/local/src` or `/usr/local/share/src`.

    So, that's all the important configuration bits backed up. With that you should be able to get a new system looking like this one (in the case of catastrophic hardware failure) by installing from scratch and then copying your old configs into place.

    What else? Ah yes, the users. Backup `/home`. Nice and easy.

    Last but by no means least, backup selected portions of `/var`. Databases, cvs, the mail system, logs; loads of programs keep repositories of data here that you'll need to make copies of. Beware though, many important data repositories (such as database stores) found here aren't neccessarily backup-able; you may have to run a tool that produces a `safe` backup file that can be re-loaded on startup. This is the most important bit to be careful backing up, it's also the best reason why just copying your disk wholesale may only be giving you a false sense of security.

    Just copying your whole disk is crude and (as explained above) not neccessarily effective. Backup with care, and you will not only save masses of space in your backups reducing the time it takes to make them (and, more importantly, reducing the amount of time it takes to recover from disasters), but you're also more likely to have a backup you can actually use in the event of a disaster.

  9. Re:Root access? No. on Security FUD On Linux · · Score: 1

    Sorry, I think I've gone a little dense here, 'cos I must be missing something.

    The point of being root on UNIX is that you can run other programs as root, which can do anything to the system. (e.g. overwrite the kernel image when you install a new one)

    What good is this Local System account if no users (not even Administrator) can run programs as it? If no programs can be run as Local System, what use does it have? If the Administrator cannot do some things to the system, who can? How do you upgrade your core system files if no-one has access to them?

  10. As fast as possible, but... on Patching Paranoia - How Fast Do You Patch? · · Score: 1

    ...keep old versions around just in case.

    I'm in charge of a bunch of apache servers that use ssl and were potentially affected by the recent openssl bugs.

    So, rebuild with --prefix=/usr/local/apache-1.3.28-2.8.15-0.9.7c-1 (apache version, mod_ssl version, openssl version, box build id) and whatever other options you choose. Copy a test config file that listens on another port over, start it up and run a testsuite that checks pages are accessible and do the right thing to the back-end systems. Stop new server, copy live config file in place and you're ready to go.

    $ /usr/local/apache/bin/apachectl stop; sleep 1; rm /usr/local/apache; ln -s apache-1.3.28-2.8.15-0.9.7c-1 /usr/local/apache; /usr/local/apache/bin/apachectl startssl

    All sorted with a second or two of downtime. Watch the logs closely for a day or two. If anything breaks horribly stop apache, move the symlink to the old known good version & restart it, giving you some time to debug and add new testcases so the problem doesn't reoccur next time you upgrade. Repeat until new testcases pass, put the new version live and repeat.

  11. Re:certainty on Ward Hunt Ice Shelf Breaks In Two · · Score: 5, Insightful

    To state that the increase in CO2 is undeniably causing the increase in temperature is just bad science

    Well, yes.

    However, it is known that CO2 is a greenhouse gas, and that we release loads of it every year. There also have been some correlations made, even though they've not yet been proven.

    Now, given the potential problems that could be generated by global warming (flooding of coastal cities, alteration and possible destruction of major ecosystems due to changed animal migration or plant survival/dispersal patterns - the latter possibly caused by changes in wind patterns of deep sea current shifts) don't you think it might be a good idea to stop pumping out as much CO2 as we currently to in case it's the problem.

    Or do you want to bet the lives of millions (billions?) of people on the case that it turns out not to be the problem?

    If you have no idea what the result of a course of action is going to be, but are aware that it might affect the whole planet in a very real and negative way, don't do it!

    Please, I don't want to get 20 years down the line, find out CO2 was the problem all along, but that it's too late to do anything about now and is all fucked beyond repair.

  12. Re:No flash...? on Microsoft Plans IE Changes Due to Plugin Patent · · Score: 1

    But no Flash in IE? That affects...well...*does some mental math...carry the 1...*a lot of websites that I enjoy.

    Sounds like you're enjoying the wrong websites. IMO, if a site ain't worth reading with a text-only browser, it probably ain't worth reading.

  13. Re:Not seamless? on Microsoft Plans IE Changes Due to Plugin Patent · · Score: 1

    So, you'll start to see a dialog box every time a flash/pdf/java applet wants to display itself.

    I get one of these anyway as I hate flash and don't have the plugin installed in the first place.

  14. Re:Where's the Earth Shattering Kaboom!?!? on Supersonic Flight Without The Sonic Boom · · Score: 4, Funny

    That makes me very angry! It's obscuring my view of Venus!

  15. Re:How to develop securely in 4 words on How to Develop Securely · · Score: 1

    Bollocks.

    If you're in a low memory situation, and the platform you're running on has a dynamically allocated stack, then it's entirely possible to run out of stack space as well as out of heap.

    So, your example above can fail (given a pathological case) with an error that's harder to check for and trap than a malloc/new failure. (What is behaviour on out-of-stack? Is it a catchable signal?)

    On top of that, any algorithm that uses a limited amount of stack space to deal with large files by operating on them in a stream-like fashion, only processing a small amount of data at a time, can be coded to use a small amount of heap space dealing with small chunks of data at a time. What's more, the heap-based algorithm will be more flexible, allowing you to deal with (for example, in the case of `cat') an occasional extra-long line with relatively little extra code or complexity. The example you give is limited to dealing with 80 characters.

    Malloc buggy? Which version? I've not found such a bug in a long time in glibc's malloc() implementation. If your vendor is shipping a crappy malloc implementation and you've gotta work around it, well, I really feel for you there 'cos that's the sort of thing you shouldn't have to deal with, but my advice would be to find yourself a new C library that works.

    C++'s std::string behaviour undefined in the absense of sufficient memory? Dude, you need to read your manuals more carefully. If it can't allocate memory, it'll fail by throw()ing std::bad_alloc. If you don't want it doing that, you can create your own string type using the std::basic_string<>() template, supplying your own memory allocator that allocates memory however you want it to, and does whatever you want in the case of failure.

    K.

  16. Re:Boo on Can Open Source Save Hardware? · · Score: 1

    Heh, you obviously didn't read the last linked Tom's Hardware article which was supposed to be about Microsoft's new filesystem layer for Longhorn.

    I've stopped reading the Tom's Hardware articles now. They all suck.

  17. The only stupider thing they could do... on X-Box Hackers Trying to Blackmail Microsoft? · · Score: 1

    ...would be to try to sue IBM for 3 billion dollars for IP violations.

    Oh, er...

  18. Re:SMP? RCU? on SCO Amends Suit, Clarifies "Violations", Triples Damages · · Score: 1

    If you read the OSI position paper, it doesn't say that Linux had SMP before SCO's unices did.

    In the section titled "SCO/Caldera's claim to own Unix scalability techniques is weak" it says that Linux had SMP working _on Intel_ before SCO's unices did. It also mentions that Linux has greater-than-4-way SMP capability, a feature that SCO's OpenServer does not itself support.

    K.

  19. Re:One question... on RFID Tags in Euro Banknotes · · Score: 1

    Cos some of us would prefer to not have our buying habits tracked?

    Apart from my house bills (mortgage, water, gas, phone, electricity) which are all paid by direct debit, I've not paid for anything electronically in over a year. I have an ATM card that I use to get cash, which I buy everything else I need with.

    It's also really handy for sticking to a budget. I get £100 out the bank Saturday morning. That has to last me for everything (petrol, food, beer, etc...) for the next week. When I was using a card to buy stuff, I used to spend so much money without realising it. Now that I actually see how much I have to last me till Fri evening, it's really easy to keep track of it and not overspend.

    K.

  20. Re:Yep buy Microsoft! on Any Reason To Buy Microsoft? · · Score: 1

    Actually, I do buy MS hardware. I prefer microsoft mice to most others; I currently have an MS IntelliEye optical mouse, and would hate to go back to one with a ball.

    However, it is interesting to note that MS don't have a monopoly on hardware. The hardware they make is replaceable by other hardware of the same kind (Keyboards, mice, joysticks, etc...) with no issues whatsoever.

    The fact that they are forced to play on a level field when it comes to hardware means that the stuff they come out with is good. It has to be, otherwise people would just buy the alternatives.

    K.

  21. Re:Close but not quite. on GoboLinux Rethinks The Linux Filesystems · · Score: 1
    However, making a user application work independently of case in file names is a reasonable idea. However, it would have to be specified by the UI framework, for example Gnome. I'm not sure exactly if that idea would work at all since I haven't given it much thought.

    The Right Thing would be if the kernel FS calls that write or modify file/directory names ensure that all names passed to them are valid UTF-8 strings. That's all the kernel really needs to do.

    How do you access files?

    • From the GUI? Select a file with the mouse? The correct filename has now been put into a text box for you.
    • With a script? `find . -type f -exec grep -E -H foo {} \;'? Well, you've not typed any filenames in, they've been selected and iterated over for you. All the correct filename representations have already been used.
    • From the command line? When was the last time you typed a full filename in? Years ago for me; I use tab-completion all the time. Put a strcoll(3) instead of strcmp(3) call in the tab-lookup function, and tab-completion re-encodes the collating element you got wrong, in user-space, using the UTF-8 collating information that's already present in your C library.

    If you really wanted to, create a new library function to do the conversion for you. Something along the lines of:

    char ** glob2(char const * src, int flags);

    Find all directory entries that collate equally with the glob-pattern src.

    All directory entries collating equally with the glob-pattern src are returned to the caller in a NULL-terminated array of pointers to strings.

    If src starts with a `/', the match is made from the root directory; if it starts with `~' and GLOB_NOTILDE is not specified in flags (see below) the match is made from the relevant user's home directory, otherwise the match is made from the current working directory.

    fslookup malloc(3)s a single block of memory large enough to hold the array of pointers and all the entries themselves. The caller is responsible for free(3)ing this block of memory.

    flags is a bitwise-or of any of the following flags, which alter the behaviour of glob2 as follows:

    • GLOB_MARK - append a slash to each path which corresponds to a directory.
    • GLOB_NOSORT - do not sort returned pathnames
    • GLOB_NOESCAPE - meta characters cannot be quotes by backslashes.
    • GLOB_NOBRACE - csh(1) style brace expressions {a,b} are not expanded
    • GLOB_NOTILDE - tilde expansion is not carried out on src

    On error, NULL is returned, and errno is set. Possible errors are:

    • ENOMEM - could not malloc(3) enough memory to hold results.
    • EINVAL - src was NULL
    • EACCESS - You don't have permissions to read a portion of the path specified in src
    • ENOTDIR - A component used in src as a directory is not one.

    Example: The following example prints out the list of files matching an input glob to stdout. (Excuse leading dots, I couldn't figure out how to get it formatted properly without them)

    void
    printmatches(char const * glob)
    {
    ....char ** matches;
    ....char ** match;

    ....matches = glob2(glob, 0);
    ....if (!matches) {
    ........fprintf(stderr, "%s: %d: %s\n", __FILE__, __LINENO__, strerror(errno));
    ........return;
    ....}

    ....f or (match = matches; *match != NULL; ++match) {
    ........printf("%s\n", *match);
    ....}
    ....free(matches);

    ....return;
    }
  22. Re:He doesn't understand Scientists on Psychology of a Programmer · · Score: 1

    Yeah, I get that.

    It's really annoying that my subconscious is more intelligent than I am. :)

  23. Re:...her? on Psychology of a Programmer · · Score: 1

    Well, last I heard from the popular media (although I've not come across any myself) there's a whole bunch of vocal feminists that do claim that they need to be compensated for, for the years of opression by men that have kept wome^Hyn down.

    So I tend to use `her` whenever possible as a gender-neutral pronoun, and have never heard anyone (until you) complain about it. It (supposedly) shuts up these (alleged) vocal feminists, most other women don't seem to mind, and I've not met any other blokes insecure enough to whine about it.

    Just as long as you're consistent, you should be OK.

    And while I hate the PC brigade, using the female pronoun as gender-neutral is IMO just as PC or non-PC (however you want to look at it) as using the male pronoun in a gender-neutral sense. It sure grates on me a hell of a lot less that writing `him/her`, or writing oh-so-sensitive disclaimers, or using `ver` (a supposed gender neutral gender neutral pronoun), or any of the other `solutions` that I've seen.

    K.

  24. Re:If MS went OSS... on What if Microsoft went Open Source? · · Score: 5, Funny

    Surely you mean:

    EGON : "Try to imagine all life as you know it stopping instantaneously and every molecule in your body exploding at the speed of light."

    RAY (awed): "Complete protonic reversal."

    VENKMAN: "OK, That's bad. Good safety tip; thanks Egon."

  25. Re:The lies prepetuated on Screenshot History of Windows · · Score: 1

    Heh. One thing that proves that 95 is a shell over DOS 7.0 is that with an original Win95 installation (not sure if it still works in OSR2) after shutting down your system, you could type `mode co80' which DOS would interpret (as always) as a request to change to an 80-column video mode. Voila! C:\ prompt with full functionality after supposedly shutting down your system.