Slashdot Mirror


User: orthogonal

orthogonal's activity in the archive.

Stories
0
Comments
1,606
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,606

  1. Re:The Master Of C on Which Coding Framework for Mac OS X ? · · Score: 5, Informative

    Re C and pointers:

    Understanding pointers is a challenge for many C newbies. It helps if you remember that a pointer is just a number, usually a variable but sometimes a constant, which represents an address in memory. It helps even more if you can remember that that address in memory is just an offset from the start of the memory (note this only works on architectures with flat addressing; it gets a bit hairier on, say, DOS).

    Since C is a pass by value language, passing a pointer (or anything else) means passing a copy of a value. In the case of a pointer, that means a copy of the address, so now both the caller and the called function know that some memory exists, and can (in the abscence of const) modify it.

    Since the pointer is just a number, it can be added to. Adding to a pointer actually means that the address is incremented by the amount of the addition times the size of the thing being pointed to. In other words, the compiler takes some pains to ensure one is alsays pointing to the start of what should be an object, and not within the guts of the object. So if I declare a a pointer to a 2 byte sized object, adding one to the pointer will point me to the next two byte oject in memory, and not to the second byte of the first object.

    Naturally, the programmer must allocate the memory to be pointed to. The pointer is merely an address, it's not the memory being addressed. Declaring a pointer gives the programmer a place to write the address down; it does not create the mmemory: the fucntion call malloc ("memory allocate" ) "creates" the memory.

    I beleieve the OP noted he came from an assembly background, which means that he's used pointers (untyped ones at that) so it may be less of a challenge.

    The other C pitfalls for the unwary are the declaration structure, and (related) to this, the way arrays are handled. Several primers exist on decoding declarartion syntax; in a nutshell, declarations should be read from the inside out, left to right until a right parenthesis forces reading right to left. The declarartion:

    int ( *f )( char ) ;
    is read "f is a pointer to a function taking a char argument and returning an int.

    In C, arrays are not first class objects, and so when passed to functions they "decay" to pointers to the first element of the array. An array name can be treated like a pointer, and indexing into an array is defined by the language to be exactly equivalent to dereferencing an array plus the index:
    Given
    char array[ 4 ] ;
    array[ 0 ] is just *( array + 0 ); and array[ 3 ] is just *( array + 3 ). array[ 4 ] is *( array + 4 ) and is an illegal (well, undefined) dereferencing of the "element" one past the end of the array.

    I have said too much for a post, so I'll end now. The point is, as long as one remembers a few key ideas: pass by value, pointers are numbers for addresses, and declarations need to be read inside-out, C is rather straigtforward.

  2. Re:Intelligent pr0n filters.. on Predicting User Behavior to Improve Security · · Score: 2

    They have a script that filters all images over XX bytes into a program that then scans for flesh tones within the images.

    Jeez. Why not just hire employees you can trust? Or was this instituted as part of a court-mandated consent agreement?

  3. Re:Keep It Simple, Stupid? on MS Backs Down On Encrypted Digital TV Recording · · Score: 2

    The true market segment for Media Center PCs are lonely techno-hermits, 15 y.o. media pirates and some geeks who like toys.

    So you mean Microsoft will be advertising Media Center PCs solely on Slashdot?

    (P.S. I know what a TV show is, but this show on Thurdays, what do they mean by that word, Friends? And how do you say it in Klingon?)

  4. Pardon my ignorane on Low-Cost MEMs-Based Gyroscopes · · Score: 2

    How small a movement (small in force, small in distance) will this device pick up? Will it pick up on movements of milimeters or centimeters or meters?

    How gentle can, how abrupt must, the change in position be?

    Any elucidation appreciated!

  5. Re:hehe, nippon on Exchange Email Addresses With A Handshake · · Score: 2

    and (as far as I know) the word 'black' in french is 'noir'.

    I can't speak for the Portugese (been a while since I heard that as a possible origin), but dictionary.com gives the etymology of "nigger" as "[Alteration of dialectal neger, black person, from French nègre, from Spanish negro. See Negro.]"

    "Noir" is French for black, but I don't that it is (or is not) the only French word for black, and I suspect, as in English, there are numerous synomyms. (In English, off the top of my head: dark, coal, jet, inky; using dictionary.com's thesaurus: jet, ink, ebony, coal pitch, soot, charcoal, sloe, smut, raven, crow, black, sable, swarthy, somber, dark, inky, ebon, atramentous, jetty, coal-black, jet-black, fuliginous, pitchy, sooty, swart, dusky, dingy, murky, Ethiopic, low-toned, low in tone, of the deepest dye.)

  6. Why's a BANK need to push advertising this hard? on You Will Read Our Ads, And Like It · · Score: 5, Insightful

    On first reading this submission, I assumed myciti was a content provider of some kind. And I figured, if I wanted their content that badly, I'd just pay for it. More likely, it wasn't something I needed more than I need my peace -- and buzzy banner ads manage to disrupt my peace far far more often than they encourage me to buy anything. After all, I've already given up reading washingtonpost.com at home, as I'm not even able to register with them using Mozilla.

    But myciti.com isn't a content provider; it's a banking/investment service. Presumably, if I take the trouble to browse there, it's because I think I might want to see what services they offer.

    But apprently they assume their services are so worthless that before I'd purchase those services, I'd have to be overcome by their advertising. Or they think their marketting position is so precarious, they must have a captive audience.

    Or perhaps they're confident in their services but want to subject me to ads for their third-party affiliates? Is citibank worried they can't profit without selling my eyes to third parties?

    Whatever the case, it appears that citibank isn't doing so well. Either their products don't sell without extensive, in-your-face advertising, or the company isn't profitable without selling marketting in addition to investment products.

    Either way, it seems a good indication -- one might say an invitation even -- to stay away from citibank.

    And that's what I'll be doing, thanks.

  7. Re:hehe, nippon on Exchange Email Addresses With A Handshake · · Score: 4, Informative

    whats is the origin of the word 'nip' in racial text to asians [and "wog" and "nigger"]?

    "Nip" is short for "Nippon", the Japanese name for their country, or short for "Nipponese", the Japanese name for the people of Japan.

    "Nigger" derives from words various European languages use for the adjective "black"; various etymologists speculate in originated in the French, the Spanish, or the Portugese words for "black".

    "Wog", a disparaging British slang term for non-European "native" peoples, or in some constructs ("the wogs start at Calais") anyone not British, probably derives from Golliwog, a rag doll with African features in a children's storybook, though some probably apocryphal folk etymologies claim it's an abbreviation -- sarcasticly-applied -- of "Worthy Oriental Gentleman". Apparently the term is also applied, derisively, by mmebers of the Church of Scientology to non-Scientologists (?).

    In any case, all these terms are considered disparaging and offensive, especially when used by persons of whom they are not descriptive. (Although "nigger" finds a use, within the black American population when applied to others of the same ethnicity, similar in meaning to "(that black) person".)

  8. Re:... and while you're at it on Exchange Email Addresses With A Handshake · · Score: 1, Offtopic

    Did you know that certain people are for some reason totally immune to crazy glue?

    I'm guessing oily hands. Try using soap. ;)

  9. PrntScrn on E-Book Copy Protection, For What It's Worth · · Score: 5, Funny

    Print Screen, a treacherous tool of terrorists for twenty-rwo years.

    Obviously, only terrorists use Print Screen.

  10. Re:More than a mouthful on 3D LCD Display · · Score: 2

    2D seeing is good. 3D seeing is better. Feeling would be nice, but I'm not too sure about smelling...

    But it can never beat the real thing!


    Oh, c'mon, once Slashdotters get their 3D screens, they'll be beating their real things constantly.

  11. Re:9-inch-square on Pyramid Rover Finds A Third Closed Door · · Score: 2

    <I> Am I just jaded or is a 9-inch-square chamber not much of a big deal to find on a 8-inch square shaft?</i>

    /**
    Please insert smutty joke about 9 inch "chambers" and 8 inch "shafts" here.
    */

  12. Re:um, clarification please on Chimps, Humans Differ More Then Thought · · Score: 2

    Uh, oh. The evolutionists are going to have fits

    Uh, yeah.

    Uhuh. Because that extra 3% is all God's Work? Right?

    ....And on the sixth day, He created chimps in 95% of His image. But feeling that as The Lord, he had a more perfect image to maintain, on the seventh day he....

  13. Re:Mirrors ! Mirros ! Mirrors ! on TheKompany: tkcOggRipper: Easy-to-use Ogg Vorbis C · · Score: 2

    Try CDex. cd-paranoia back-end, bunch of encoders, writes to any sort of file structure and file name you'd like (e.g. my preference, Genre/Artist/Album/Songnumber- SongName -- Album - Artist), does local and remote cddbs.

  14. Re:Never say never on David Sorkin on Internet Law and Spam · · Score: 3, Insightful

    People who skip commercials *are* stealing tv shows. How do you think that stuff get's (sic) paid for?

    In the U.S., television broadcasters are allocated radio spectrum (TV channels) essentially without payment (except for certain regulatory fees), because they are presumed to be providing a public service in return.

    When the broadcasters pay market rates for the radio spectra (as wireless telephone providers have in recent years in the U.S.), and when they contract with viewers to provide services in exchange for viewing commericals, perhaps they can argue that not watching some portion of their signal is theft.

    Until then, they use their spectra public trust, and without any contract with their viewers.

    Or shall I argue that since you've read this far, you're obligated to read my sig?

  15. Re:Vinyl/Vinile on Ripping Vinyl Via Your Scanner? · · Score: 2

    note: [the use of the word] [sic] almost always conveys a sense of the writer [is] thinking [himself] or herself better and more intellegent [sic] than the source. [I]t's a very arrogant little journalistic device. [I]t's sometimes needed, but not very often.

    No, it conveys the sense that the writer who's quoting a source found that source confusing, wrong, or of dubious accuracy, in a context where the alternate sense of the quoted source is so compellingly obvious that the quoting writer needs to emphasize that the source actually conveyed the non-obvious interpretation.

    :)

  16. Re:Far more useful on Cloak of Invisibility Coming Soon? · · Score: 2
    Your point is well-taken. Making the results of work I freely donate freely available is also very important to me. From the FAQ, which admittedly could be easier to find:


    Who "owns" the results? What will happen to them?

    Unlike other distributed computing projects, Folding@home is run by an academic institution (specifically the Pande Group, at Stanford University's Chemistry Department), which is a non-profit institution dedicated to science research and education. We will not sell the data or make any money off of it.

    Moreover, we will make the data available for others to use. In particular, the results from Folding@home will be made available on several levels. Most importantly, analysis of the simulations will be submitted to scientific journals for publication, and these journal articles will be posted on the web page after publication. Next, after publication of these scientific articles which analyze the data, the raw data of the folding runs will be available for everyone, including other researchers, here on this web site.

  17. Re:How long? on Slashback: Google, Prince, Bayesian · · Score: 3, Insightful

    The only excuse for that "shorthand" crap is if the writer has some physical problem entering text.

    Since we become accustomed to read by seeing regular word forms, "733t" is just a strain on the reader. It lessens the impact of the message, because the reader's resources are spent decyphering the medium. It's insulting to the reader because it points out he's excluded him from whatever subculture uses that "7eet" medium. It's less effective and more annoying: not the way to convince anyone.

  18. Re:Far more useful on Cloak of Invisibility Coming Soon? · · Score: 2

    I'll be more impressed when a Cloak of Charisma is released; hellloooo, laydeez|boyz!

    Or in Bangkok, hello lady-boys!

    Which reminds me, the Cloak of Charisma already exists: it's called a money-clip full of fifties.

  19. Re:Cookie? What cookie? on Mr Anti-Google · · Score: 2

    Or use Proxomitron to change all cookies to session cookies, if a cookie is needed. Otherwise, let Cookie Cop or Proxomitron block 'em. (Cookie Cop's interface makes it a bit easier, so I run Cookie Cop behinf Proxomitron. I really ought to reverse the order though.)

  20. Re:Proxomitron on Disabling IE Scripting in a Useful Manner? · · Score: 2

    Yeah, what he said.

    Seriously, Proxomitron's the way to go. You could even filter on the name of activeX objects.

    Install Proxomitron on your company's servers, or on individual PCs.

  21. Re:DMCA DMCA DMCA on Verizon Lawyer Explains Telecoms' DMCA Position · · Score: 1

    a lot of Slashdotters don't know what its correct name is

    Good point.

    However, it's "it's", not "its", because in your sentence, the way you're using it, its use is as, and it's used as, a contraction not a possesive.

    its != it's
    your != you're

  22. Not RealAudio on KPIG is Back - By Subscription Only · · Score: 5, Insightful
    I'd pay $5/mo for KPIG.

    But not via RealAudio. Real sucks for so many reasons, allow me to list a few:

    It likes to spy on users' listening habits

    To prevent the spying, one has to tour through several configuration screen, and sub-screens, and buttons that open sub-sub-screens, making sure to select the right options, options which are described so ambiguously as to make me believe that all of this foofarah is designed to make it too onerous to prevent spying, while still claiming the option(s) are there.

    Even after all this, even with all privacy options set correctly, you can't stop it from phoning hone once a month anyway.

    It loads slowly.

    Its interface is obstrusive, clunky and counter-intuitive, the better to provide ad space. (Compare this to winamp's ability to add skins and maximize or minimize different parts of the app.)

    Its codecs appear to be inferior to free codecs, like Lame; its sound quality certainly is.

    In short, RealAudio is just too slow, ugly, and nosey for me to run it. No mater how compelling the content.

    The only thing in Real's favor is that it hired Andrei Alexandrescu, the C++ template guru.

    Offer me KPIG at $5/mo via winamp, and I'm in.

  23. Re:GeekPac on Grubb for Congress. By Weblog. · · Score: 2

    Mod this dude up. opensecrets.org is an excellent tool for learning who gave what to whom.

    Search for your boss's political donations! Your company's. That girl you've got a hopeless crush on. And her parents!

    This information definately wants to be free!

  24. Re:corruption imlies violence on ElcomSoft Back For More · · Score: 2

    Bob Dylan sang it, but Woody Guthrie wrote it in the song (well, three versions of the song) Pretty Boy Floyd.

    Comparing Pretty Boy Floyd, an outlaw who was said to have given to the poor, to (unspecified) business interests, Guthrie wrote:

    Well, as through this world I've rambled
    I've seen lots of funny men.
    Some will rob you with a six-gun
    And some with a fountain pen.


    But as through this world you ramble
    As through this world you roam
    You won't never see an outlaw
    Drive a family from their home.

    As for me, I dreamed I saw Joe Hill last night, alive as you or me being sent to a brig as an illegal combatant.

  25. Re:Where do they get the addresses? on Politicians Seek Spam Loophole · · Score: 2

    Spam also changes the way that you read email. I use HTML mail, which makes it even worse -- did you know that some spammers use CGI image generation (with a unique ID encoded in the URL) so that even viewing an HTML mail spam will confirm your email address?

    Either don't use HTML mail (mail should be plaintext!) or don't allow your mail client to talk to any port other than 110 and 25.

    (Actually, only allow it to talk to those ports on your mailserver's address.)

    My mail client is MS Outlook, which has a much deserved reputation for allowing all sorts of stupidity through, but I haven't had a problem. Why? It's allowed only to talk to localhost and to my mailserver.

    Additionally, specifically disallow any program other than your browser from connecting to ports 80, 81, 8080, 8888. Or even better, allow only your web proxy filter to talk to those ports, and disallow any proggie but your browser from talking to your proxy.

    MS Windows:
    Kerio Personal Firewall is free for personal use, and allows you to create rule-based filters either manually or interactively in reaction to attempted connections. Proxomiton's a great web proxy.

    Linux:
    Any of various versions of ipchains and squid.