Slashdot Mirror


User: tomhudson

tomhudson's activity in the archive.

Stories
0
Comments
14,724
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 14,724

  1. Re:What?!?!? on The End of Native Code? · · Score: 1

    I've got to admit I find the current methods of handling web server code to be a screw-up.

    Either have a runtime VM and create a new context for the classes, load your classes into the VM, and dump it all on each page call, or have a module and initialize it for each page, load and initialialize your script, run it, and dump it on each call.

    Still, it can't be any worse than my old c cgi routines ... server runs the cgi, cgi reads from stdin, performs the work, writes to stdout, server passes stdout to the client machine ...

    I didn't bother benchmarking, but it just seemed faster (the routines to access mysql in c aren't that hard to figure out, and you can test the whole thing from the command line, just like any other cgi). Maybe that'll be a project for a weekend.

  2. Re:What?!?!? on The End of Native Code? · · Score: 2, Informative

    whereas the human assembly language coder will peter out juggling registers after few hundred lines of code

    I guess we can call that the new peter principle - every piece of code rises to its coders level of incompetence :-)

    Every year we hear stories about how c is dead, but its still alive and kicking. The "java chip" that the Java OS was supposed to run on never materialized. Various other managed languages are either unmanageable (hello, perl! - sorry, had to throw that one in) or just can't compete on speed.

    What's the BIGGEST problem with c? Buffer overflows and forgetting to free memory. These are both the same problem - somebody making a mistake in their code. Its not the language's fault - its the programmers. Falling back to managed languages because people are too lazy to check for corner conditions just promotes bad code in general. If you don't have the discipline (and curiosity) required to check for corner conditions, you don't have the discipline and curiosity to write good managed code either. But that's just my 2 cents.

    After using the "P" languages over the years (Perl, Python, PHP), I still find c to be my favourite (probably because I really like the preprocessor).

  3. Re:What?!?!? on The End of Native Code? · · Score: 2, Insightful

    ... and only a compiler can write code to use SIMD extensions? You forget history - that originally, it was people abusing the fpu (in assembler) to have it process multiple chunks of data with one instruction that gave rise to SIMD extensions, formalizing what was already going on. We're seeing the same thing again, with people using the gpu on graphics cards to process non-video data.

  4. Re:What?!?!? on The End of Native Code? · · Score: 1

    1. Write it in c
    2. Embed optimizations in c function calls
    3. If really anal, replace all the function calls with macros to call each routine directly.
    After all, once you've completed step 2, you more than 95% there anyway ...
  5. Re:And yet? on The End of Native Code? · · Score: 1

    ... and you can write a c compiler in c, and an assembler in assembler. If you look at the pages, you'll see that while it might be written in python, it still ends up having to generate code in another language - either native code such as c or an interpreted language such as javascript, that needs a runtime written in native code:
    http://codespeak.net/pypy/dist/pypy/doc/architectu re.html

    # the code generator which translates the resulting flow graph into another language, currently C, LLVM, Javascript (experimental).

    Last I heard, c wasn't on the list of managed / non-native languages, the llvm back-end emits c code, and javascript requires an interpreter.

    Ultimately, there's native code at the base of every program running on your computer. The cpu can't run anything else.

  6. Re:And yet? on The End of Native Code? · · Score: 1

    Oh, I agree, but lets face it, how much hardware portability do you need nowadays? Would you rather a game with embedded assembler that plays fast on one platform, or sucky on all platforms :-) BTW, the linux kernel does this - c with embedded assembler routines, different routines for different platforms http://en.wikipedia.org/wiki/Assembly_language

    It's also common, especially in relatively low-level languages such as C, to be able to embed assembly language into the source code with special syntax. Programs using such facilities, such as the Linux kernel, often construct abstractions where different assembly language is used on each platform the program supports, but it is called by portable code through a uniform interface.

    Browse the source code for Delphi - again, embedded assembler.

    Now imagine a database that can run x times faster because its written in a non-portable way. Will it find a market? Sure, there's always someone who needs MORE speed, and is willing to pay for it. Even if the speedup is only 2x, it would be a market shake-er-up-per.

    Your SNES - assembler.

    The embedded systems running your car - written in assembler.

  7. Re:What?!?!? on The End of Native Code? · · Score: 0, Flamebait

    Fifteen years ago, before you were senile,
    ... sorry (NOT!), we've known for over 20 years how to predict senility before you reach adulthood (you'll have to search the hard copy stacks for it - a logitudinal study reported in Scientific American that examined 200 nuns from birth to death, and found 100% correlation between their writing styles as kids, and whether they became senile later on in life) ... so there is zero risk of my going senile, based on my early writing style :-)

    I'm sure your benchmarks were of reasonable conclusions.
    Then why bitch and moan? Oh, right ... "times have changed" ... but like the old saying goes ... "plus ça change, plus ça reste la meme ..."

    Your C skills must have never been much to flaunt if they were compiling to a result 200 times slower than the "bare metal".
    ... spoken like someone with zero experience with assembler. Go play with your managed languages. You need them. Me, I use them when they make sense (a lot of the time, lately), but I'm not blind to their limitations.

    The simple truth - JIT suz. Its failed to deliver on its promises, over and over and over. Its one of those "real soon now" "any time" "we're almost there" "manana" things ... tomorrow never comes. There will always be a place for assembler, and c. Managed languages have their place as well, but not when performance counts ... and not when your goal is simplicity and provability of code to guarantee its execution in a timely manner. The need for runtimes doing all sorts of verification and "yes, we've executed this exact code with this exact context before, so we can run the native code we've compiled and stashed away in the VM cache from the last iteration ... oops, its no longer in the VM cache ... damn) make that impossible.

  8. Re:What?!?!? on The End of Native Code? · · Score: 5, Interesting

    If you want to see a beautiful programming language, how about one that allows one to express code as data?
    In assembler, its all code / its all data. The difference is only a JMP away.

    One of the neat things was te 4k graphics demo contests - try to write the most impressive graphics demo with only 4k of assembler. There was a LOT of code writing code in memory, code using other code that had already run as raw data for designing the next iteration, then using it again as code ... a 4k program that could take you through a 3-dimensional roller coster ride for 20 minutes, never repeating, all done in real time, on hardware that you wouldn't deign to pick out of the scrap heap.

  9. Re:What?!?!? on The End of Native Code? · · Score: 1

    The problem with the VM startup time is that a lot of code nowadays is "glue code". A small app starts up, shells out to another one to do a task, takes the returned data, shells out to another one .... all those new VMs get expensive.

    the workaround is worse - 1 VM that starts up and never quits, just hosting each new process. In other words, 1 bad process can now bring all the processes down, so you have to add even MORE code to check that's not happening. Sychronize is already hugely expensive in Java ... this will add a whole new layer of "things to check between code points". The speed gains won't materialize, as the checking that has to be done increases faster than N+1.

  10. Re:What?!?!? on The End of Native Code? · · Score: 1

    ... are you really going to claim that ANY c spat out by a compiler can be faster than hand-optimized assembler? Especially when it comes to graphics code.

    Think. As one example, the compiler makes assumptions about registers that I'm free to ignore. Ditto with pushes and pops, etc. There are shortcuts you can take in assembler that you can't in c. It doesn't get any faster than assembler. and assembler is probably the most beautiful language to work in, because its what YOU make of it.

  11. Re:And yet? on The End of Native Code? · · Score: 1
    ... and lots of embedded assembler.

    Use C as a wrapper, embed your custom assembler for each platform inside each function, and you've got portability AND performance.

    that's how its done. And that's not going to change. Besides, at the rist of bringing this back on-topic (they mentioned the requirements of Vista) how "portable" is Windows nowadays? Oh, right, its the least portable mainstream OS there is.

    "Managed code" sucks. And the runtimes for those "managed code" languages are written in ... wait for it ... native code. Can't run that "managed code" without a runtime.

  12. Re:What?!?!? on The End of Native Code? · · Score: 2, Interesting

    It's all bs.

    15 years ago I benchmarked assembler vs c for graphics code - c was 200 x slower. There is NO way that any interpreted runtime will even begin to approach the "bare metal", never mind c.

    Most of the benchmarks crowing about the speed of JIT compilers ignore the startup and initialization time, as well as the end-run time.

    I couldn't believe some of the naive assumptions on one published benchmark - they had the java code print out its start and end time and said "see, only 4x slower than c"; naive is being polite. Proper benchmarking would mean putting a wrapper around both code examples, to handle the start and end time notification.

  13. Re:Well, this is a classic dilemma on Password Complexity in the Enterprise? · · Score: 3, Funny

    Of course writing your password down and keeping it in your wallet or purse is better ... follow the MONEY!.

    Just use the serial number off a piece of currency, and a few letters, and you're gold. Just don't spend your password,

  14. Re:Overkill on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    I was surprised to find out that Welch's Grape Juice uses sugar from corn syrup as a major ingredient, so (sadly) I dropped it. I guess I'll stick with unsweetened orange juice, coffee and tea without sugar, water, and beer.

  15. Re:Overkill on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    I think nicotine is on the way out for pretty much everyone.

    there are a lot of places where its illegal on the job.

    Here it doesn't matter - even in a private office, its still against the law, with fines of up to $10,000.00 for employers who ignore a first warning and earlier fines (and the employee also gets hit with fines of up to $600.00 per incident).

    ... and as of the first of this month, its illegal to smoke within 30 feet of an entrance to a building as well, so smokers can't "duck outside" for a quick one - they have to stand in the middle of the street ...

    Québec used to be known as the smoking section of Canada ... but smoking rates are plummeting, and even smokers are glad about the new law (they say it'll help them quit).

    Of course, those who are smoking as a form of self-medication (schizophrenics, manic-depressives, etc.) are going to have to find an alternative.

  16. Re:Overkill on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    There's a big difference between the sugars your body creates by converting carbs, and the raw sugars you consume. so no, I didn't fail cell bio, but it looks like you may have forgotten a few things. Its like the difference between the alcohol that's created by your cells as an interim product, and the alcohol in the beer I'm drinking while posting.

    Kids today are getting a lot larger dose of sugar than kids a generation ago, and they're getting it starting at an earlier age. Why do you think they're so much FATTER ... and they're getting this higher dose along with tons of caffeine. NOT a good thing.

    You've never seen someone who hasn't had access to sugar ... but 30 years ago, there were still people living in the hinterlands who never had raw sugar. One of them came into town, had a cup of coffee, liked the taste with sugar, loaded the next one up, and passed out. That's a normal reaction. Unfortunately, we feed our kids so much sugar from the moment they're born - check out the frigging baby foods - SUGAR SGAR SUGAR, same with the baby juices - SUGAR SUGAR SUGAR - to the point that when we remove it from the diet, they go into withdrawal.

  17. Re:Overkill on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    Sugar is not a stimulant.

    Try telling that to any parent who's dealing with a kid on a sugar high from too much soda pop/candy/cake/ice cream/whatever. The question isn't whether its a drug, but the effect on the person. In that sense it sure as hell IS a stimulant.

    Stop taking it in any form (a sugar-free diet) and watch how quickly you go into withdrawal ...

  18. Re:Females can suffer from impotency, too. on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    If a female cannot produce the fluids that lubricate the vagina during intercourse, having sex will be virtually impossible without the use of some sort of lube.

    ... That's what a little oral sex beforehand (have a muffburger :-) is for ... you know, foreplay?

    Other problems may involve the vaginal muscles not loosening enough
    ... and that's what a little alcohol is for ... relaaaaaxx ... candy is dandy, but liquor is quicker ...

  19. Re:These people are just punishing themselves. on Psychopharm Going 'Mainstream' In Schools? · · Score: 1

    An inability to get an erection past the age of 30 would be the best payback for students ...

    Somehow I don't think the girls in school are worried about getting erections ...

    Little Johnny: (pulls down pants) I've got one of these and you don't!

    Little Sally: (lifts up skirt) I've got one of these, and my mommy says that with one of these, I can get as many of those as I want.

  20. Re:Overkill on Psychopharm Going 'Mainstream' In Schools? · · Score: 5, Funny

    90% of current programmers probably do not use those drugs, since they're overkill for Visual Basic coding...

    shouldn't that read ...

    90% of current programmers probably do use drugs, since you've gotta be on drugs to be coding in Visual Basic ...

    All kidding aside, if you count caffeine, I think you'll hit 99.99999 ... ah wtf, say 100%. Both programmers and school kids. Ditto for sugar.

  21. Re:$4,250.00 ? on Duke Nukem Forever Due This Year? · · Score: 0, Redundant

    The supplementals say they only laid out $827 in cash for ALL the businesses, with a book value of $15,000. This means they paid $827,000.00 for $15,000,000.00 of assets, plus write-offs, etc. Cheap at twice the price, at 20 to one.

  22. Re:$4,250.00 ? on Duke Nukem Forever Due This Year? · · Score: 0, Redundant

    The supplementals say they only laid out $827 in cash - that means $827,000 to acquire total assets with a book value of $15M.

    Nice leverage, and they also acquire some tax loses, and the ability to float new shares or financing against their deep-discount purchase.

    Like I said, show me a way I can spend a buck to acquire $20 of assets, plus a few bucks of deductions ... its a no-brainer. Cheap at twice the price.

  23. Re:$4,250.00 ? on Duke Nukem Forever Due This Year? · · Score: 0, Redundant

    And if you read the supplemental charts, their total cash outlay was 827 == $827,000.00, for ALL the companies they acquired. So they didn't pay $2. whatever million. They laid out 827,000 to get 15,000,000 (according to the supplemental charts) of assets, as well as the ability to grab some immediate write-offs. Bet you that at tax time, they get back every penny of the 827k they spent, so it ends up costing them zero.

    Of course, now they have these new assets, so they can borrow against them (or issue more stock to reflect their increased portfolio), so either way, they're getting a nice profit for a minimal outlay.

  24. Re:$4,250.00 ? on Duke Nukem Forever Due This Year? · · Score: 1

    If you check the "Cash paid for businesses acquired", the total is listed as 857. Even AFTER adding in 3 zeros, you're still looking at a total cash outlay for all those businesses of 857.000.00. Like I said, cheap.

    Promisory notes, shares, etc., cost them nothing up front, and in return they get immediate tax relief. How much you want to bet that at least someof those acquisitions are actually profitably right now even if a product never ships? Show me another business where I can lay my hands on assets valued at over $15 million and it won't end up costing me anything at year-end ...

  25. Re:Isn't that really... on Techies Asked To Train Foreign Replacements · · Score: 1

    Damn, good point, but I'll bet you get mod-bombed for it.

    Its a small world. Intentionally screwing up stuff just to have revenge is dumb. Give it time, and if they're no good, they'll screw it up themselves no matter HOW much help you give them. You'll have your "revenge", without it costing your soul/reputation/whatever. Either way, you can sleep better at night, and you haven't done your part to cause even more layoffs when the banks' IT systems go down, they lose market share, and your neighbour, who works in another department, is now also out of a job.

    After all, if you were quitting, wouldn't YOU offer to train your replacement, so that everyone leaves on good terms?

    (of course, if they suggest someone who has no skills, like the brother of the boss, who current job is to wash cars, you have every right to say "Sorry, can't be done.")