Slashdot Mirror


User: Mr+Z

Mr+Z's activity in the archive.

Stories
0
Comments
3,254
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3,254

  1. integer square root on Math Toolkit for Real-Time Programming · · Score: 2, Interesting

    If you still need a decent integer square root algo, check out this page. I used the mborg_isqrt2 variant on that page as a starting point for writing my highly optimized Intellivision version for SDK-1600. My optimized version takes about 600 - 700 cycles for a 16-bit square root, on a machine where most operations take 6 to 8 cycles. (The version I was replacing took 4000 - 10000 cycles.)

    This book looks like it might be interesting to me. Here at work, we had our own math expert, but he's retired (or semi-retired). We've contracted with him to do math libraries, and that works for now. But what about 10 years from now? There's a lot of subtlety in some of these algorithms (it's not always just as easy as whipping through a Taylor series expansion), so it's probably time someone in our group started learning. :-)

    --Joe
  2. Matrix Orbital for backlit alphanumerics on Casemodding Enterprise Hardware · · Score: 1

    You might look at these guys first. You can really get that WOPR status-display look going. You won't get der blinkenlights from Matrix-Orbital though.

    --Joe
  3. Re:C is a gr34t langu4g3! P1eese k33p u5ing it!!! on ICFP 2002 Contest Winners Announced · · Score: 1

    I believe the implications are (and this stretching a little to make sense of the original post) that, with proper GC and proper abstraction, the following would happen:

    • Automatic locals would get allocated from the system heap rather than the stack.
    • Arrays and whatnot would automatically resize. (Much easier to do once the objects are on the system heap rather than pinned on the stack.)
    • As a free bonus (unrelated to stack smashing), passing automatic locals out of scope now automagically works.

    FWIW, this happens to be how perl behaves with 'my' variables.

    --Joe
  4. Re:Ahh the memories! on Dialtones - A Telesymphony · · Score: 1

    It would if I hadn't used ON KEY to trap presses of the [Ctrl] key. Basically, when [Ctrl] is pressed, I go and quickly clear the corresponding modifier bit at location 0040:0017. The relevant code is here:

    '...
    KEY 17, CHR$(32) + CHR$(29) ' pressing [Ctrl] while NumLock is set.
    '...
    ON KEY(17) GOSUB 103
    ON ERROR GOTO 101 ' effectively shut off error handling
    FOR t = 0 TO 31: KEY(0) ON: NEXT t ' no idea why I looped this.
    GOTO 2
    ;...
    101 RESUME NEXT 'on error resume next :-)
    103 DEF SEG = &H40 ' clear ctrl bit in BIOS status byte
    POKE (17), PEEK(17) AND &HFB ' clear the CTRL modifier
    RETURN

    QBASIC is limited in what you can hook. Because the machines I was working on boot up with NumLock on, I trap variations of keypresses w/ NumLock set. So, you could get around my 'lock' by shutting off NumLock.

    Another out is to press [Ctrl]-[Ctrl]-[Break]. (That is, press both [Ctrl] buttons on the keyboard.) But who would think of that? Sure it's "security by obscurity", but this is an obnoxious prank, not Fort Knox. And before someone remarks how crappy the code is, bear in mind three things: I hacked this up while a class was in session, I wrote this about 8 or 9 years ago, and QBASIC programs are inherently sucky. :-)

    --Joe
  5. Re:I can't believe this. on Dialtones - A Telesymphony · · Score: 1
    I'm not one to support Big Brother tactics, but I believe that every cellphone should have a chip that automatically detects when it's in a place like a theater or whatever, and when that happens, it should go into vibrate mode or something like that. Obviously, this should be a setting that the user can change or override because, like I said, Big Brother SUCKS! DOWN WITH BIG BROTHER!!!

    I agree -- there should be the equivalent of a 'cell phone damping field'. Essentially, any business has the right to shield their buildings so that no one gets reception at all within their boundaries. However, such a solution is costly and inflexible.

    What would be really useful is a voluntary mechanism whereby phones are informed to not ring, or to automatically send calls to voice mail, etc. If the latter is done, the caller should be given the option to override in case of emergency, of course. Abuse of the 'emergency' mode could be considered similar to prank 911 calls. Such a system would be administered by cheap beacons placed onsite in locations where it matters. With GPS functionality (or at least pseudo GPS functionality) built into the newer phones, the beacon could even identify the exact areas on the premises where ringing is/is not allowed.

    What's nice about such a system is that the "damping" could be turned on/off based on the present needs. For instance, during the day when rehearsals are going on, set construction is happening, etc. it may be useful to allow normal cellphone operation among the cast and work crews. At performance time, though, it's dampening time.

    What do you guys think? Perhaps we should lobby for this to go into 3.5G? ;-)

    --Joe
  6. Re:Ahh the memories! on Dialtones - A Telesymphony · · Score: 1

    I used to plant this QBASIC program in the labs at school and other unsuspecting machines. It fairly reasonably emulates a good ol' car alarm, and it manages to lock out Ctrl-Alt-Del.

    This was even more fun, because the school had just bought a lab full of machines that had no reset button, and had a dual-stage power off (you had to hit a button on the side, and then the button on the front). Strange AT&T Pentium-60 machines.

    --Joe
  7. We already have SPAM art and spam art... on Dialtones - A Telesymphony · · Score: 1

    Witness this Andy Warhol classic. Or how about this creative abuse of Google's search-term highlight facility?

    Or did you mean email spam?

    What's interesting is that these SPAM and spam art links are very similar in overall concept to the cellphone ringer art -- take some banal aspect of modern existance and extrapolate some artistic absurdity from it. I love it!

    --Joe
  8. [OT] carputer on Freeing the Specs? · · Score: 1

    If you ever get one working, email me. I'd love to see it in action. Hell, I'd love to have one for my car!

    --Joe
  9. Re:It's all marketing on Linux Kernel 3.0? · · Score: 1

    I think the other poster was referring to the Solaris numbering scheme that went 2.0, 2.1, 2.2, ... 2.5, 2.5.1, 2.6, and then suddenly 7, 8, and soon 9. They just dropped the '2.' off the front.

    SunOS version numbers, though, which are closer to kernel version numbers, have marched steadily along through 5.x.

    The last time Sun rev'd the major version number is when they switched from a BSD core to a SVR4 core. I think that rates a major-version-number switch, don't you? (I don't know if I believe it's worthy of an increment, mind you, but that's another discussion for another day.)

    --Joe
  10. Uhm, that's cut/pasted from Kerneltrap. on Linux Kernel 3.0? · · Score: 1

    Thanks for the KernelTrap mirror.

    --Joe
  11. Re:Combination of branding and shape, probably on Microsoft's Vision Of Future Workplaces · · Score: 1

    Heh. Kinda reminds of "Milk Plus" from A Clockwork Orange.

    --Joe
  12. [OT] is this a slashcode bug? on Honest Job Sites? · · Score: 1

    Weird, definitely. They must have a broken pattern somewhere. Anyway, as far as I can remember, the 'Extrans' option has been around as long as I've been on Slashdot. Judging by my user ID number, it's longer than it seems. :-)

    Oh well. BTW, I did some investigation, and looked at the HTML that Slash is producing. Here's something that's curious looking. Notice the <nobr>, <wbr> and </nobr> tags?

    described with the<nobr> <wbr></nobr>.Dave and<nobr> <wbr></nobr>/Dave,

    It would appear that the weird handling of "." and "/" at the start of a line are part of some misguided word-break-control attempt. I mean, as best as I can tell, the tag sequence is a no-op. Perhaps it's worth filing a bug against Slashcode?

    --Joe
  13. Re:Spinning down disks - bad on What's the Best Server for Home Use? · · Score: 2, Informative

    Actually, no. If a hard-drive is going to fail, it's most likely going to fail in a power-down/power-up cycle. Just like lights are most likely to burn out when you turn them on.

    Hard drives that are on 24/7 wear down, the bearings get warm, etc. You shut them off, everything cools, and in some cases, seize. Basically, before any scheduled power-cycle on a machine that's 'always on', back up its drives. Plan on at least a few pct of your drives dying in a site-wide 'reboot' like that. (We see that here whenever they do a site-wide power down.)

    --Joe
  14. Re:HTML breaks on Honest Job Sites? · · Score: 1

    If you want <BR> to show up as <BR> and not a line-break, you need 'extrans'. Basically , "Plain Old Text" really means "try to guess where to insert <BR> tags and whitespace for me, but let all the other markup go through."

    This link has more details.

    --Joe
  15. Most secure OS in 5 years? on Microsoft's Vision Of Future Workplaces · · Score: 1

    Why, because there will be no other OSes on the market in 5 years to compare to? Or will they redefine "market" so it includes only them?

    --Joe
  16. (corrected link) on Microsoft's Vision Of Future Workplaces · · Score: 1

    ACK! The link got truncated. Corrected link

  17. Re:More Chestnuts? on Microsoft's Vision Of Future Workplaces · · Score: 2, Funny

    Yeah, but Microsoft already licensed PacMan, so what's the issue?

    --Joe
  18. Re:More Chestnuts? on Microsoft's Vision Of Future Workplaces · · Score: 2, Insightful

    The copy/paste from computer-to-computer in the manner discussed (just keep dragging, your mouse ends up on the other desktop) would be nice, as long as the mouse was suitably accelerated. I'd hate to drag my arm across half my desk to get the pointer off the edge of that gigantic monitor onto my laptop's desktop. There also needs to be position sensors on the laptop/desk so that my laptop's desktop and computer's desktop "connect" at a point that corresponds to their actual relative physical positions.

    Either that or a fixed "wormhole" that mousing into pops you over to the other desktop. And tell me again why that's much more efficient than (or even much different than) showing the laptop's HD in a window on my desktop's monitor?

    --Joe
  19. Combination of branding and shape, probably on Microsoft's Vision Of Future Workplaces · · Score: 1

    The 'D' probably comes from the shape -- thing of what a desk with such a semi-circle monitor would look like from above. The 'sharp' probably comes as a cross-branding w/ C#.

    C# is a hilarious name. "When Windows breaks you'll C# edges."

    --Joe
  20. Re:Faster app start times? on Running 100,000 Parallel Threads · · Score: 1

    ELF runtime linking is inefficient and does unpleasant things to your COW pages. I haven't investigated this in full, but Jakub Jelinek of Red Hat has written a program to "pre-link" your ELF libraries and executables, so that you can mmap, sanity check, and go without any runtime relocation.

    Awesome! Any word on when this will be 'production worthy'? Also, do you know of a website that has any performance numbers or other details?

    --Joe
  21. [OT] pasting URLs. on Mozilla Jumps on 'Lean Browser' Bandwagon · · Score: 1

    At least, under X, you can just 'paste' the URL anywhere in the main browser window with the middle mouse button and Mozilla will go there. So, when someone posts a URL that's not a link, all I need to do is highlight (left mouse button), and paste (middle mouse button). Very nice--I never touch the keyboard. I always miss that feature when I use Windows.

    --Joe
  22. Re:the linux c10k problem - solved? And Java? on Running 100,000 Parallel Threads · · Score: 1

    Yes, I read the page. The person I was responding to was only talking about RAM usage for the stack, so that's all I was talking about.

    --Joe
  23. Re:More uses for a union filesystem... on Unionfs for Linux? · · Score: 1

    You can do this with User-Mode Linux. Just put your root FS on a CD (you can even make it ext2 instead of iso9660), and then use UML's copy-on-write filesystem driver. Put the COW file in a ramdisk on the host OS. Voila!

    I actually plan to implement just such a hack so I can use UML jails more safely on services, and still do useful things that need the occasional temporary file. (I don't think I'll put the COW file on a ramdisk specifically, but I will delete it post-use.)

    --Joe
  24. Re:New locking primitive, "futex" on Running 100,000 Parallel Threads · · Score: 1

    A futex is a mutual-exclusion primitive that's based around file and file operations rather than some heavier mechanism. The idea is that the kernel doesn't keep track of all the folks locking the file and so on, with all the extra separate bookkeeping to handle when processes exit and so on. Futexes live mostly in user-space, making them very fast.

    I don't pretend to know a fraction of the details--only that I've heard of them before and what their benefits are, roughly. Read more here.

    --Joe
  25. Re:Faster app start times? on Running 100,000 Parallel Threads · · Score: 1

    It'll have nothing to do with it. Mozilla is at most a handful of threads.

    The bulk of the startup time for those apps is in dealing with all the dynamic linking and in faulting in all the code pages from disk. There's also a fair bit of time in loading non-code resources from the various files the app keeps. (eg. all the XUL and chrome that defines the user interface in Mozilla.)

    One way possibly to speed up loading large apps is to staticly link 'em (icky!) and then do "cat app > /dev/null" before starting it so it's in the disk cache first. That'll help a little. It won't solve the data-file issue, but then you could cat all those to /dev/null prior to app startup also.

    The reason catting a file to /dev/null gives a speedup is that the cat operation is linear. Thus, it gets good utilization from the disk. (assuming your filesystem isn't heavily fragmented, that is.) When an app relies on page faults to bring its code in from disk, the faults may be pseudorandomly spread throughout the file. Further, they may be timewise further apart, so the various I/O clustering algos (eg. elevator seek) won't cluster the reads.

    That said, you're still stuck with the CPU time the app takes to initialize and configure itself internally. Starting a statically linked Mozilla or OpenOffice from a RAM disk would still take a non-trivial amount of time.

    --Joe