Search results

  1. L

    least expensive MySQL data type for storing currency values?

    Never use floating point numbers for money. It will only cause trouble. IEEE 754 floating point numbers can't even represent the number 0.10 exactly. It is a repeating decimal in base 2. Just because it has a decimal point does not mean that it can represent all Real numbers -- in fact...
  2. L

    My first CS class is using Scheme...

    If nothing else, I want you to fundamentally understand one thing. You cannot escape recursion by dismissing it. Your implementation-dependent problems are just that -- flaws of your code or your compiler. This isn't about stacks, or your operating system's poor design. This is about...
  3. L

    My first CS class is using Scheme...

    This is the kind of attitude that I'm talking about. The one that views "recursion" as just some kind of weird alternative to iteration. Sadly, many professors teach in a way to leave this impression. Somewhere, the point is lost that recursion is fundamentally what allows you to compute with...
  4. L

    huge bind exploit

    Bind is a security hole, period. If you run it, do so in a chroot jail. I'm a fan of TinyDNS (DJB), personally. Besides that, there are ways for DNS servers to be modified other than changing the zone records directly. DNS allows servers to be setup as slaves to other servers, and they...
  5. L

    What's more "Green"

    No. Most dishwashers are much better about saving water than most humans.
  6. L

    Monitor with dual-inputs is flaky

    I have a strange problem. There are two DVI ports on the back of my monitor, the DS-263N. I plug my computer into one of the ports and it usually works. If I plug it into the other port, it works for a moment and then nothing. If I plug another input while the PC is connected, that's ok, but...
  7. L

    My first CS class is using Scheme...

    That's the point of teaching it first. Get the good habits in first, make the bad habits feel "wrong."
  8. L

    TV tuner that can Record HD from a HD Cable Box?

    How about this thing: http://www.hauppauge.com/site/products/data_hdpvr.html for $250 it records 1080i from component.
  9. L

    Large Hadron Collider

    The Collider is now calibrating. The Collider is still calibrating...
  10. L

    Why is it so hard to go to the moon?

    Or use that money to help develop commercial fusion power based on Helium-3, which can supply the world's energy efficiently with no radioactive by-product. A fuel which is found in large quantities on the Moon. http://www.chinadaily.com.cn/c.../26/content_649325.htm
  11. L

    TV tuner that can Record HD from a HD Cable Box?

    I'm in a similar situation, and I took an HDMI->DVI adapter cable and plugged it from my Comcast box into my LCD monitor. However, the picture is red-tinted, snowy, and intermittent. Any idea what that means?
  12. L

    Why is it so hard to go to the moon?

    First of all, $25 billion in 1969 dollars is about $150 billion in 2007 dollars; not to mention the weakness of the US Dollar atm. Second, when we go back, we want to establish a base -- that's totally new and expensive. Third, we have nothing like the Saturn V anymore; probably the most...
  13. L

    Why is the speed of light our "speed limit"?

    Flip your question around: why do massive particles not travel at the speed of light? Every "mass-less" particle travels at the speed of light: photons are simply the bosons which transmit the electromagnetic force. Bosons are a general category of particle -- with integral spin and not...
  14. L

    Driving slower = better gas mileage. Fact or myth?

    Cars at the time I imagine were mostly American made and with a pushrod design. Those were not well suited to high revs like the other posted suggested. The overhead cam design of many modern engines is much better at high RPMs. It's actually encouraged in european cars like mine to hit 5-6k...
  15. L

    What does the earth feel like?

    The Earth has over a 6000 km radius and the crust is only about lets say 60 km of that, to round off. Of that, humans have only really explored 10 km worth (being generous). Some of the ocean's floor is deeper than that, I suppose, but not much. Anyhow, I'm struggling to think that the...
  16. L

    What does the earth feel like?

    Woohoo, Earth omelettes anyone?
  17. L

    Driving slower = better gas mileage. Fact or myth?

    Faulty reasoning or not, this was used to justify lowering the natl highway speed limit to 55 back in the 70s.
  18. L

    programming software for 9 year old

    Thumbs up for Squeak, too. http://www.squeakland.org/
  19. L

    linux terminal and up key

    The program which can give readline-like history capabilities to any other command line program is called 'rlwrap'. rlwrap nslookup # and you should get history Another question: why are you using nslookup? That's been deprecated for over 5 years, I think? Use dig.
  20. L

    Government unveils world's fastest computer

    But can it run Crysis at decent framerates?
  21. L

    grep - why does this crash?

    find is probably better suited to this job than grep -R. \{\} expands to the current filename. \; ends the command. I include /dev/null so that grep will spit out the filename (which it won't do if there is only one file to search at a time). find / -exec grep tempdelete.pl /dev/null \{\}...
  22. L

    quick easy *nix question

    No. // is considered to be the same as /. This decision was made to simplify shell scripts a bit.
  23. L

    MergeSort in place on Linked Lists

    Some testing reveals that GCC, at least, handles in-place merge-sort on arrays better than in-place merge-sort on lists. There appears to be a constant factor of 1.5x slow-down with the list, even though I arrange it so that the list must be copied first into the newly allocated array before...
  24. L

    A 1080p LCD TV as a Monitor? How good is it compared to an LCD Monitor

    My friend has a 37" LCD TV as his monitor and he likes it. Frankly, it's too big for me, makes it hard to read text. In any case, consider what a TV is optimized for: long distance, non-interactive viewing, no reading. LCD computer monitors will be better adapted to computer users. For...
  25. L

    MergeSort in place on Linked Lists

    Now I see why Sun was reluctant to open source their compiler. Anyway... Performing insertion-sort at 7 elements is ok. That's a constant-time operation, asymptotically, and doesn't change the overall recurrence for merge-sort significantly. Copying the list into an array causes O(n)...
  26. L

    MergeSort in place on Linked Lists

    Sounds wrong. It should be easy to merge-sort even singly-linked lists in worst-case O(n*log(n)) time and constant space, if you can modify the references, which is the case in Java.
  27. L

    Can microwave sterilize food?

    HVAC, what does radioactivity have to do with microwaves? Microwaves are the upper (shorter) end of the radio wave portion of the electromagnetic spectrum, close to infrared. Back to topic: Kursk, I put "sterilize" in scare quotes on purpose. And recall, I wasn't trying to do this myself...
  28. L

    Can microwave sterilize food?

    On a similar note, one time I saw someone "sterilizing" a cup by putting it (empty) in the microwave. I told her that wouldn't do anything because microwaves heat only water molecules specifically. But then I thought about it some more: wouldn't micro-organisms contain water and therefore be...
  29. L

    Strange display detection problem

    I have a DoubleSight DS-263N which I got a couple weeks ago and it's been great up til now. I hooked it up to my Geforce which has 2 outputs. I was able to successfully run in dual-head mode with my old CRT for 2 weeks. The extra-large desktop space got me really spoiled. Anyway, yesterday...
  30. L

    What if the Earth stopped?

    Of course gravity will vary based on altitude and local density of mass. But the effect is so small you would not notice the difference without equipment. It would certainly not be a "loss of gravity." G = 6.672 * 10^-11 M = 5.9736 * 10^24 kg Rp = 6356000 m Re = 6378000 m Rm = 6371000 m...
  31. L

    What if the Earth stopped?

    Do you think the Earth's gravitation depends on its rotation, or is this some kind of brain malfunction?
  32. L

    Parallel Processing

    Hi. I haven't been able to find any proceedings for ISCA 2008, I suppose it hasn't been published yet. Do you recall the author and title of the paper? Here is a relevant paper I found from POPL'08: http://research.microsoft.com/...s/papers/2008-popl.pdf STM definitely has taken off in...
  33. L

    Parallel Processing

    That is true, however, the original work on composable STM was published in this paper: http://research.microsoft.com/...npj/papers/stm/stm.pdf and implemented in the Glasgow Haskell compiler. I think if you glance at the code snippets in there you'll find they have an "imperative feel" but act...
  34. L

    World's Largest Solar Power Deal

    I don't think current fusion generator research focuses on hydrogen fusion. Someone figured out that the easiest way is helium-3, and that's not exactly common on Earth. Even if we did master hydrogen fusion, splitting water into its components is quite energy intensive. What's neat about...
  35. L

    Parallel Processing

    Writing parallel programs in C or C++ is not fun. You can use things like OpenMP but they have serious limitations. You're basically restricted to un-nested, fork-join parallelism. You don't want to use pthreads to do parallel programming -- that is pure pain and little benefit. The state of...
  36. L

    World's Largest Solar Power Deal

    I like Stirling engines. Ridiculously simple and effective.
  37. L

    LaTeX Question

    PDF is a vector graphics format. You should check out the options on whatever it is you use to convert bitmap images into PDF (or EPS).
  38. L

    Given a plane and a point, how can I determine which side of the plane the point is on?

    dot-product sounds useful to you. A dot B = |A||B|cos Theta, or so. It's easy to compute, just being the sum of the components multiplied together. Dot-product between the normal vector and the vector from the plane to the point should tell you the angle. Even more simply, you can tell if...
  39. L

    ASUS $199 Eee PC laptop

    Why do you fools have such a hard-on for Windows? You'll need to buy two of the machines to run it: one for Windows and one for other stuff. If you want to waste your money on Windows then buy a beefy machine with specs to spare. I'm including the Anandtech reviewers in this rant. You're...