Slashdot Mirror


User: Jamie+Lokier

Jamie+Lokier's activity in the archive.

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

Comments · 502

  1. Re:Better than some alternatives on Where Can I Find Linux Porters? · · Score: 1
    the guys who have experience doing this type of stuff are too busy

    Well they must be taking some of this kind of work, or they wouldn't have the experience doing this stuff and be busy, would they?

    So it comes down to whether there's decent money or other motivation on the table.

    And if they're freelancers, as many of the good ones are, then it's also a matter of luck, timing and interest with each one as to whether they're ready to take on the project.

    And if you're offering decent money, that comes back to the initial question: how to find people. Or more usefully: how do you recognise the good ones.

    -- Jamie
    "who likes to think he's one of the good ones"

  2. Re:Say what? on PK'ing Banned in China For Minors · · Score: 2, Insightful
    If you look at boobs in a game, the effects are way more similar to the effects of seeing real boobs.

    In other words, not much effect at all, and what little there is is probably good for you. In my opinion, seeing real boobs is perfectly normal among healthy human beings. The fact that seeing them on screen is a bit like seeing them in real life is hardly an argument for censoring them, is it? That would only make sense if the effect was harmful, and in all honesty, I think it's actually beneficial to be used to seeing boobs in ordinary, non-abusive situations, to the point of it not being a sensitive thing.

    Seeing someone die on a game is very different than seeing someone get gunned down in real life. Just ask someone who's witnessed a drive-by or been to war. They start sweating and their heart-rate increases when they start talking about it. The video game death is out of our heads in minutes.

    Do you think that's a good thing, that images of suffering leave your head quickly, even if they're very realistic? That you've become insensitive to portrayals of violence? That's not innate from birth, you know.

    If you show a young child realistic images of murder and brutality - the nasty stuff, not mere brawls - they're upset by it. Older children less so, and all the more if they've seen plenty already. Don't you think extensive exposure to violent imagery might have something to do with the extent of that desensitisation?

    It's easy to think that semi-realistic killings in games, by the time your old enough to enjoy them, aren't bothersome because you know they aren't real. And that murder and brutality in films aren't real, so they're ok. But desensitisation goes in deeper than that. Notice you don't break out into a sweat when seeing real brutal violence and murder on the news, either, even when it's much more horrific than what you have personally witnessed.

    If you'd hardly ever seen a dramatic portrayal of killing as you grew up, if you hardly ever witnessed such images, then as an adult you'd be shocked and outraged when you saw it happen. You might be more motivated, in a way that's more deeply-ingrained than just overcoming fear and apathy, to prevent it from happening, to intervene. Think about that. Imagine if the world were full of people with that sort of motivation.

    For an adult example: remember the first video beheading from Iraq? People were shocked. If another one came out now, peoples' collective response would be much more muted.

    Isn't it something of a tragedy to become insensitive to portrayals of suffering, while hypersensitive to portrayals of pleasure and bodies and things like that whether real or not?

    Often these debates centre around the way dramatised violent imagery might cause violent behaviour (the evidence is inconclusive), or the bother the imagery might cause to people seeing it.

    It's easy to neglect the obvious, down to earth and undeniable effect: See a lot of something, whether good or bad, and you become insensitive to those types of images. Isn't it something of a tragedy that we grow up insensitive to portrayals of the most awful experiences, yet hypersensitively angsty over glimpses of the pleasures we're too frightened to admit are daily, happy, good occurences for many healthy people everywhere?

    I still talk about the time my roommate and I had someone get murdered in our apartment building. I never talk about the time we almost saw someone's boobs.

    Guess seeing boobs isn't a big deal then, neither real nor dramatised. So why's it such a big deal?

    -- Jamie
    "Chinese people are my friends"

  3. Re:Water on Intel On A Building Spree · · Score: 1

    That would make sense if the new fabs were doing things exactly like other fabs. But they're not: this is the new 45nm process, supposedly 2 generations ahead of the ones currently used for mass production. There's more to that than just changing the optics... And frankly, they've had 40 years to get around to recycling the water - considering how much complexity goes into purifying it and measuring it, and the number of times every part of the fabbing process have changed, recycling would seem to be a no-brainer if they're really not polluting downstream as they'd claim...

    My (uneducated) guess is that they need to emit plenty of water to ensure the trace substances which are difficult to dispose of any other way are sufficiently diluted that the outgoing water is considered safe. And that's probably ok, but difficult to confirm.

    -- Jamie
  4. Re:Water on Intel On A Building Spree · · Score: 1

    Yeah, it's called a profit, and in many ways what they are doing makes sense.

    The water going in will more than likely be and remain the same, when they rotate the filters, they will do so according to a strict schedule. The water is no longer a variable.

    When they release the water back, it more than likely has all heavy metals and known problem chemicals removed, it is then more than likely sent into the sewer to be treated with everything else, including the loads of stupid shit people dump down the drain anyhow, so I'd bet what intel is releasing when they're done is fairly clean stuff. Probably cleaner than the drinking water in many communities to begin with,

    Sure, that makes sense. The water had better be cleaner than when it went in because some of the chemicals it's in contact with in the factory are quite toxic.

    What doesn't make sense is why it's not recycled. You haven't given a good explanation for that.

    You said it's ok to tamper with the factory design while yields are low, and not to tamper with anything including the water process while yields are high.

    But that explanation does not make sense: 1. Why isn't the water recycled at the low yield stage? 2. If altering the water process makes any observable difference to the yields, that logically implies that you either don't know what's in the water you're putting out of the factory, or you don't know what's in the water coming in.

    Evidently you do measure both of those things in great detail otherwise you couldn't legitimately say what goes out is safe for the public water supply... So where's the problem with recycling?

    take the anti-corporate bullshit elsewhere and move out of mom's basement

    So quick to switch from logic to name-calling? There's nothing anti-corporate about pointing out that your explanation, in the absence of further context, makes no logical sense.

  5. It's a poor choice for "swap" on The State of Solid State Storage · · Score: 1

    You'd be better of using ordinary RAM instead for those things, given the price is $125/GB for the new device according to this comment.

    Ordinary RAM is faster and cheaper. The non-volatile solid-state storage is only useful for things that must survive loss of power.

  6. On reprogramming the nervous system, inner light on Meet Web Hypochondriacs · · Score: 1

    Indeed, and for some types of problem particularly including many musculo-skeletal conditions, releasing "inner light and thought-energy" is effective when done in certain ways.

    The configuration of your muscles is largely governed by your nervous system. To a lesser extent, so is the pattern of heat and fluid flow through the body, as well as the pattern of bone growth, immune response, and internal organ function. What's the obvious way to reconfigure the programming of your nervous system? Hint: It's not a pill, not surgery, and not coarse electrical stimulation.

    Just as you reprogram a computer in the languages it uses through the keyboard (or whatever), not by poking the individual transistors (which even has no effect on error-correcting machines), similarly you reprogram a nervous system most effectively in the languages it responds to, through the I/O it offers for the purpose.

    The subjective experience of "thought-energy" (whether it's physical in origin or entirely imaginary), especially when it's focused in certain places in the body, has been found to be one of those effective languages for reprogramming a nervous system's musculo-skeletal configuration.

    In my experience (I practice massage), the subjective feeling of moving energy within the body (whether that's physical in origin or merely imaginary) is more effective than merely visualising a corrected musculo-skeletal configuration (such as visualising a better posture), and also more effective than physically stretching the body into the new configuration.

    Also, regarding placebos: There are studies in which the placebo effect has been shown to be more effective for some conditions than the medical treatment it replaces, with both significantly more effective than no treatment. (Obviously there are many studies where it isn't more effective. It depends on a lot of factors).

    Whatever you think about placebos and "in the mind" medicine, don't dismiss it. When there's a real condition, and it's a type of condition for which the facts indicate mind medicine is effective, then it's prudent to use it.

    Unfortunately, it's much more difficult to conduct good controlled trials of medicine which is facilitated by subjective mental processes, than to trial substances. Even designing such trials is a challenge: double-blind trials rest on several kinds of logical assumptions of statistical independence, which are technically invalid and practically difficult to arrange when "mental intention" is part of the process to be measured. The very act of a person choosing to participate in a trial is by itself a modification of the trialled conditions of subjective mental intention, which complicates the analysis and all sorts of logical riddles are used to argue for or against this type of medicine as a result.

    -- Jamie

  7. Re:I thought so .. changed my site from .ro to .co on Google's Site Ranking Secrets · · Score: 1

    I've been wondering the same thing about a site I manage for a good local college: www.bristolmassage.co.uk

    It's a highly relevant site for the subject in a particular city, and in all honesty should be on the first page if not the first position for several searches which include the city's name and variations on the subject. But it's nowhere near there.

    I have both the .com and .co.uk registered, and the .com permanently redirects to .co.uk, so that everyone's bookmarks consistently refer to the .co.uk - it's local after all, and URL consistency is good. And I'd like the .co.uk to appear on Google's results, rather than the .com.

    Because of the surprisingly low ranking (at the moment) I've been wondering if the .com registration and redirect is the cause.

    Thanks for mentioning that you've noticed what I was thinking. I shall change the .com to display the same pages as the .co.uk, and see what happens after a month or two. I still wonder whether the .com's pages should link to other pages in the .com site, or have exactly the same links, i.e. to the .co.uk pages.

    Anyone else notice redirects like this causing significantly lower Google rankings? I did the redirect because it seemed the right thing for a 'good citizen' site to do, but it's not going to stay if it attracts that sort of penalty.

    Cheers,
    -- Jamie

    ps. And yes, I did include the link as a cheeky one-off link-farm ;-) But the post is relevant and my question genuine.

  8. Re:What the? on Extending Pop Music Copyrights · · Score: 2, Insightful

    I gritted my teeth and voted Labour last month, but with this and the renewed push for ID cards, they've lost my support within a month.

    Idiots.

    They got exactly what they wanted, so they were smart. They were honest, too. Labour made it quite clear they were going to push strongly for ID cards; if you don't like that policy, then you were stupid to vote for them. They also made it clear (by their actions in the patent debate) that they support strong IP in favour of big cartels. Again, voting for them was a stupid thing to do if you don't support that.

    And now you're surprised!

    Sadly, millions of people thought like you did - that is, with your brain switched off - now we have to deal with the consequences.

    Please locate the "on" switch and give it a try.

    Thanks,
    -- Jamie

  9. On sub-pixel anti-aliasing in theory on Are CRTs History? · · Score: 1
    In short: If you don't use the native resolution, Cleartype will make the quality WORSE. Even at integer scaling (1600x1200 -> 800x600).

    That's absolutely correct.

    In theory, something like Cleartype with appropriate scaling parameters could improve the image when scaled too (a little bit), but I doubt it's ever done.

    Also in theory, since the monitor communicates it's specification to the computer these days, you'd have thought that Cleartype would switch off automatically when rendering to an LCD with scaling... or to a CRT. Same with Gnome/KDE sub-pixel anti-aliasing. Alas, such things are not yet automated.

    -- Jamie

  10. The visible effects of temporal dithering on Are CRTs History? · · Score: 1

    Yeah, I noticed the temporal dithering on a screen in a computer shop yesterday.

    A friend couldn't see it until I showed him how to look, but to me it was visible from a couple of metres away.

    With temporal dithering, if you sweep your eyes across the screen at a rate of 1 pixel per frame (i.e. 60 pixels/second or so), then the temporal dithering pattern is visible as spatial dithering - i.e. a fine checkerboard pattern becomes visible when you move your eyes at the right speed.

    That's easier to do if you move the mouse pointer and follow it with your eyes - then the dithering pattern is visible in the image behind the pointer. But just sweeping your centre of vision across the screen is enough.

    I find it somewhat disconcerting, as the image shimmers between smooth colours and high-resolution dithering pattern according to how I'm moving my attention around the screen. But it's obvious enough that I can easily avoid buying such a screen. (I haven't seen an LCD good enough that I can afford yet, though).

    It's more visible with some screens than others - presumably it's worse with screens that have better response times.

    -- Jamie

  11. Re:Burn out is putting it mildly. on Burnout and Depression Among IT Workers? · · Score: 1

    My experience: It took me about 9 months to recover after a severe burn-out at one job. I wasn't entirely without motivation, but I really needed to rest throughout that time, or do something very different, until I was ready to apply myself to computer work again.

    I was lucky enough to sustain an injury during that period of unemployment, so that I could get the mental rest I needed - otherwise the unemployment money would have dried up and I'd have had to work before I was ready.

    Since then, I couldn't repeat the same pace and pressure of work in that kind of environment. But that's just as well, as it was stupidly unhealthy.

    It was the culmination of 60 hour weeks, a complete lack of diurnal cycle, and an emotional disaster waiting to happen. There was a lot to recover from, and I haven't felt much interest in computer games since then...

    Several jobs later, I think I've found a recipe which works for me: Working for myself, as a consultant. It's a very precious thing to me that everything I think of and talk about is not taken from me in such a way that I might be forbidden in future from working in my own field, but instead sold by me to clients on terms that are mutually beneficial - in other words, what I write now is a long term investment, I put my heart and soul into it and do a great job for someone else, without feeling like my spirit is sucked dry, feeling instead that I'm creating something good for us both and doing a genuinely good service in the process.

    Ironically, I work harder now as a self-employed consultant than I did when I was burning out in video games. But I'm not burning out, because the energy I put into my work is an investment into something I take pride in, I do a great job because I really enjoy doing a great job and helping someone in the process, and the relationship with my clients is mutually beneficial in a mutual-respect sort of way.

    I think that's a big part of the secret of enjoying work for me. It comes with risks, but I think they're worth it.

    -- Jamie

  12. Not quite on Excursions at the Speed of Light · · Score: 2, Informative

    Normally we use the words absorbtion and re-emission to refer to electron energy-level transitions within the molecule: photons are absorbed and promote electrons to higher energy levels; then, at a somewhat random time and in a somewhat random direction (not uniformly), electrons drop to lower energy levels and re-emit photons. (Note that these transitions aren't instantaneous, nor entirely well defined in time, but we call them quantum events anyway).

    A notable effect of complete absorbtion and re-emission events is the tendancy to randomise the direction and phase of the radiation.

    When slight slows down in a substance, this is different. It's due to coupling between the light and the molecules of the substance. Photons aren't absorbed in the sense of electron energy-level quantum transitions, but rather the passing photon wave packets interact with the electron waves to modify the phase of the photons. You could think of it as fractional absorbtion and re-emission, each molecule affecting the path and phase of each photon only a very small amount.

    There is a qualitative difference between the two effects: light slowing down in a substance usually only randomises the phase and direction very slightly.

    Here's a daft analogy. Light slowing down is like running through a vast plain of spinning merry-go-rounds, occasionally touching one with your hand or foot so that it affects your motion. Absorbtion and re-emission is like occasionally jumping onto a merry-go-round, waiting for a little with your eyes closed, then jumping off again.

    -- Jamie

  13. Prior art or violation in pthreads and Emacs? on Winelib Hobbled by Exception-Handling Patent · · Score: 1

    See pthread_cleanup_push and pthread_cleanup_pop, in conjunction with asynchronous cancellations. They (usually) work by maintaining an explicit chain of trapping structures on the stack, just like SEH. That's not filtering on exception types, though, so maybe it doesn't come under the patent's claims.

    See the C source for GNU Emacs (and Xemacs), which has done something like this for >20 years. It uses an explicit chain of structures on the stack, some handlers filter on the type of exception being thrown.

    -- Jamie

  14. Terminology & structure: the QA is done elsewh on Myth of Linux Hobby Coders Exposed · · Score: 2, Interesting

    You're looking at the wrong part of the system. You're criticising the product based on internal development snapshots, and criticising the release process due to confusing product releases with kernel-developer releases, which are roughly equivalent to the code that would be sent between groups within an enterprise product development team. That's an easy mistake due the public nature of the engineering process.

    The vanilla 2.6.0 kernel (vanilla meaning the one from kernel.org) is not intended to mean that the kernel has reached a threshold of quality that you'd compare with a commercially released software product.

    It is a quality milestone of sorts, but the main purpose of 2.6.0 was to say "right, this is the point at which we commit to the feature set and are moderately happy to begin tidying the implementation".

    In other words, Linux 2.6.0 is comparable with somewhere just before alpha quality release from a QA standpoint. It's not intended for public consumption; it's not considered "ready for beta testers" at that point.

    However, so many people took it that way, which is why now we have these silly "sub-point-point" releases: 2.6.11.1, 2.6.11.2, 2.6.11-rc3, 2.6.11-rc3-bk2-aa1 etc. just to make absolutely clear that there are staged releases, which developers need due to the distributed process, but which are not considered ready for widespread testing. We're seeing longer and longer sub-point release cycles, just because there are more people involved who treat the numbers as comparable with classic software product versions. That's fine for some people, but for secondary kernel developers it's a pain.

    Linux has a multi-level QA system. The one which corresponds to a "Release" that you mean in an enterprise product is called a "Vendor Kernel" in Linux terminology. You should understand that QA is a very large part of the process of producing a "Vendor Kernel".

    In other words, you're looking in the wrong part of the system, and it's an easy mistake because the development process is so welcoming to public participation. For enterprise software style QA, look at the place in the system where that's done: the distributions.

    (That's another way the terminology is different. A "distribution" in Linux means something very different from a "distributor" in the enterprise software sense. The larger "Distribution" vendors perform a lot of QA work and also significant development - they are roughly analogous to your enterprise QA, Testing and Release Management teams. "Distributors" typically just sell stuff and provide after-sales support.)

    -- Jamie

  15. The 1 second pause may be avoided on Morse Code Faster Than SMS · · Score: 1

    844,4447777
    T h i s

    Where , is a one second pause to wait for the cursor to return so you can type the next letter.

    FYI, you don't need the pause. Just press a different key and immediately delete the letter that is inserted. Those two keypresses are quicker than waiting 1 second for the cursor.

    (That said, I use T9 too. But sometimes T9 needs to be turned off, if it doesn't know the words or when entering a URL or such).

    -- Jamie

  16. Not when they kill your mom it isn't on The Chimera Dilemma Manifested in Sheep · · Score: 1
    I mean, if my mom had something like CJD from eating euro-beef 10 years ago, and you could sacrifice a legion of humo-sheep hybrid brains to save her.. Sacrifice away!

    And how would you feel if someone decides they want cells from your mom, without her consent?

    Ok, that's not realistic. But imagine yourself as someone else a few decades from now. Imagine your mom is technically considered a chimera because she was created through genetic engineering combining human and animal cells, and that you are therefore the descendant of a chimera.

    When we have real chimeras, do you think animals showing human mental traits will be treated as humans? Probably some will, some won't.

    It will blur the line, and some people will use it as an excuse to question whether, for example, certain "races" of people we consider human should still be considered fully human enough to have basic rights, like the right to life and self-determination....

    Think that can't happen? Do you really think we're completely past the times of treating, to pick an example, "black" people as though they're sub-human and therefore not entitled to the most basic human rights? (Substitute any labelled group of humans for "black").

    I think the existince of chimeras will be used as yet another excuse for all sorts of horrors.

    -- Jamie

  17. Would make sense if linked to download statistics on Dutch Pass iPod Tax · · Score: 1

    If the distribution of the levy were according to official download statistics, measured in a sensible way by independent observers, this proposal would make more sense.

    It would still be taxing people who don't download, but think about it: the money would go to artists that people actually like. When downloading, you'd have a motivation to choose to download artists that you want to reward, and avoid artists that you don't want to reward, while not having to pay cash to express those wishes.

    It also means everyone's opinion counts equally, not just those who are willing to pay directly for music. People buying old second-hand players for example, may be poorer but will have the same effect on download statistics.

    Yes, it penalises people who don't download. But, done as I've described, it also creates an environment where people are guilt-free able to enjoy artistic works, knowing the artists are being compensated too.

    The only real question then is: whether it's worth penalising those who don't download (or download only a little), to create a society where everyone is free to enjoy artistic works, happily guilt-free, and sustainably.

    Here's an analogy: in the UK we lobbied for a long time for "flat rate" internet access where you pay a fixed monthly fee and can then use the 'net as much or as little as you like. People who don't use it much as subsidising those who use it more (but only a little bit nowadays, because there are so many plans to choose from). But it means that people can be comfortable when using the 'net, instead of keeping an eye on the number of minutes online, and many people think that's a good thing because it changes how people use the 'net for the better.

    Imagine the same for music: where people pay more up front, but then are able to be comfortable listening and watching whatever they want to, and it's legal. That's only workable when people know the money goes to the artists (and producers etc.) who are producing the work people actually choose. It does not work if the money only goes to "industry representatives" who don't represent all the artists. Done wrong, it's ugly. But done right, even your friend artist neighbour would get a little share, if people are choosing to download a little bit of his work... Think about it.

    -- Jamie

  18. Re:An idea.. on Dutch Pass iPod Tax · · Score: 1

    A notebook computer can play MP3s. That makes it an MP3 player.

    Are you sure they're not going to tax your notebook as well?

    -- Jamie

  19. Re:Boring missing features... on What to Expect from Linux 2.6.12 · · Score: 2, Insightful

    kqueue is in FreeBSD since 4.1 or, at least, April 2000. epoll was first introduced into Linux-2.5.x (when exactly?)

    The initial version started in December 2001. epoll in its present form was added to the base kernel in 2.5.45, October 2002.

    and is still not present in production kernels

    Wrong. It's in every 2.6-based distro, which is most of them right now, and for the "commercial enterprise class" users that includes Red Hat Enterprise Linux 4 and SuSE Linux Enterprise Server 9.

    Linux' failure to implement a known, well documented and exemplified, freely available API, which predates Linux' own solution by several years, is the gist of my complaint.

    I know the gist of your complaint, but kqueue really was considered during the design of the current epoll, and was rejected. Looking at the kqueue documentation now, I think Linus was right to reject it.

    The ideas underlying kqueue are good, but the implemented API has flaws. Take a look at the documentation, and ask: Can you wait for reading/writing on a terminal file descriptor? What about an audio device? A serial port? The answer is not according to the documentation, yet it ought to be possible to wait on an any file descriptor with the same meaning as select/poll.

    The initial versions of /dev/epoll had the same flaws and others. But that was rejected too, and it had to be changed to the epoll you see today before it was accepted.

    epoll isn't perfect. In fact I argued for a more general event-waiting API at the time, but Linus likes simplicity, and that's what we have now. It is nice and simple to use. It's major ommision is that it doesn't play well with AIO, and that will have to be solved eventually.

    Your mistake is trying to map a write-only file. It's not permitted because the CPU is not capable of write-only pages, so all write-only mappings are really read-write mappings. If BSD is letting you map a write-only file on the same kind of CPU, that's a security hole in BSD.

    Nice theory, but wrong. Try exploiting it. Unless you open with O_RDWR (or O_RDONLY), you can not mmap with PROT_READ (EPERM). And if you don't mmap with PROT_READ, you can not, well, read (SIGBUS).

    It's you who are wrong on this. Ok, let's try exploiting it.

    I've mapped a write-only file with PROT_WRITE only (not PROT_READ), opened with O_WRONLY. The file is write-only: it has permission 0200 (--w-------), and it can't be opened for reading or read-write: verified by "cat test_mmap_file" correctly saying "Permission Denied" and other ways it cannot be read.

    Then I read from the mapping and printed what was read, to prove it was really reading the file's contents. I tried both a local file in /tmp, and also a file over NFS. Results:

    FreeBSD 5.3/i386: I can read from the write-only file using mmap.
    NetBSD 2.0/i386: I can read from the write-only file using mmap.
    FreeBSD 5.3/Alpha: I can read from the write-only file using mmap.

    Well, well, the exploit works. You should really test a feature before arguing about it. :)

    Tsk, a security hole in the current production versions of FreeBSD and NetBSD no less. :) [It's unlikely to have major consequences, though, as write-only files are rarely used and never for anything critical.]

    The results for i386 are no surprise, as the CPU itself is incapable of write-only mappings. (It's a bug that BSD let's you map a write-only file at all, but given that it does then it's not surprising you can r

  20. sigsafe on What to Expect from Linux 2.6.12 · · Score: 1
    The biggest pain there is handling signals and epoll stuff simultaneously in a correct manner. If you need to, I urge you to check out the documentation for my sigsafe library. It describes some things not to do plus a couple good ways: the self-pipe trick (a popular way if you're using select/poll/epoll) and my own sigsafe_* signal call wrappers.

    Interesting library.

    By the way, there is somewhat portable way to do the same thing that doesn't need syscall wrappers or cpu-specific and os-specific assembly language. That is to call dup2 in the signal handler, to replace the fd that's about to be blocked on with a non-blocking pipe writer whose read partner is closed (dup2 is specified as async-signal-safe, and generally is). You can't write and can't read it, so those operations return without blocking or changing the pipe's state. Afterwards you can use dup2 again to restore the original descriptor.

    Enjoy :)
    -- Jamie "portable code 'r' us :)"

  21. Re:Boring missing features... on What to Expect from Linux 2.6.12 · · Score: 1
    epoll's man-page is dated 2002, whereas kqueue exists in FreeBSD since (at least) 2000. I think, it was wrong for Linux to introduce a totally different API to address the same concerns.

    When we designed epoll for Linux 2.5, kqueue was considered as well as the experimental /dev/epoll. Both were rejected, in fact they had similar faults, but /dev/epoll was greatly simplified and became the epoll interface you see today.

    Our RedHat is running 2.4.20-31.9bigmem and does not have epoll anyway...

    That's because it's a 2.5/2.6 feature. It could be retro-fitted to those old 2.4 kernels but RedHat haven't done so.

    But if it did, would one be able to use epoll to make tail -f more efficient? Or is that, whan [id]notify are for?

    Yes, you'd use inotify to watch for changes to the file. If you want a scalable event loop too, use epoll to wait for inotify events along with other things.

    epoll is missing some things. The most awkward is waiting for AIO completions. Then again, Linux AIO is still being designed, and the kqueue man page says that although it's mentioned, AIO completion in kqueue isn't yet implemented either...

    As for mmap() -- please download my simple program and try to get it to work on Linux.

    Sure, just fix the bugs and it works. :)

    - outd = open(argv[1], O_WRONLY|O_CREAT, stat.st_mode);
    + outd = open(argv[1], O_RDWR|O_CREAT, stat.st_mode);

    Your mistake is trying to map a write-only file. It's not permitted because the CPU is not capable of write-only pages, so all write-only mappings are really read-write mappings. If BSD is letting you map a write-only file on the same kind of CPU, that's a security hole in BSD.

    - in = mmap(NULL, stat.st_size, PROT_READ, 0, ind, 0);
    + in = mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, ind, 0);

    Technically one of MAP_SHARED or MAP_PRIVATE is required, and Linux enforces this.

    Enjoy :)
    -- Jamie

  22. Re:Boring missing features... on What to Expect from Linux 2.6.12 · · Score: 2, Interesting

    For file descriptor events, Linux has a better implementation than kqueue, called epoll. It's better because it works with all types of file descriptor (thanks to using the same kernel functions as poll/select internally), not just the subset documented in the kqueue man page. Which means you can use epoll in a generic replacement for select/poll, which you can't quite do with kqueue.

    kqueue can do other things, including aio which is useful, and it is marginally more efficient due to fewer system calls for registration, but the documented file descriptor limitations are a weak point so it should not be copied exactly the same into Linux. It is possible to add the other things that are useful from kqueue to epoll, but nobody has done so. Perhaps there isn't much demand for it.

    mmap: you can grow files while using mmap on them. That's what ftruncate and mremap are for. Oh, did you want to grow files automatically to the nearest rounded-up page when you write to a page beyond the current size? That's not as useful as it sounds, because typically you must still check against a bound, otherwise you'll write beyond the end of the mapping's virtual address. Given that you must have that check, you can easily check against a smaller bound instead and call ftruncate when you're about to exceed it, plus mremap to arbitrarily extend the mapping, which is better than limiting yourself to a fixed maximum size with mmap in advance.

    And if you don't want to allocate disk blocks: ftruncate creates a sparse file, the disk blocks are allocated on demand when you write to individual mapped memory pages.

    Enjoy,
    -- Jamie

  23. Re:A comcast rep once called me on Music Industry Drafts Code of Conduct for ISPs · · Score: 1

    They mean "server" in a legalistic rather than a technical-and-then-only-if-you-believe-TCP-listene r-equates-to-server sense.

    If your FTP client connects to an FTP server in active mode, then even though there's a TCP connection established from the server to your client, your end is still the FTP client, as it's still the end requesting service.

    -- Jamie

  24. Re:Are ISP's next? on Supreme Court Takes Hard Look at P2P · · Score: 2, Informative
    They [ISPs] are actively advertising to their customers to use P2P. Couldn't the music biz interpret this too as aiding file-sharing and destroying their business model? Perhaps [ISPs using such advertising] need to be shutdown?

    No, because there is plenty of music available for legitimate sharing and downloading with the blessing of its copyright holders. (An example: Magnatune).

    It is therefore a very legitimate feature for ISPs to advertise - and this is becoming more and more so as sharing-friendly licensing initiatives like Creative Commons take root.

    Oh, and the music biz has no intrinsic right for their preferred business model to be protected. They have to compete on a fair playing field like everyone else - including artists using a sharing-friendly business model. Protecting copyright is not the same as protected one specific business model among the many built upon copyright.

    -- Jamie

  25. Re:Oh really? What happens when... on Solving the /etc Situation? · · Score: 1

    In case you're wondering if that's just me being a Luddite or if there's a solution in mind, perhaps there is.

    It's for each application to include metadata for each of its config files, indicating the types of data, ranges of options and so forth, and how to present the information in a config file editor. In addition, a certain free-form commenting and option-rearranging facility is needed when presenting configs in a config file editor.

    Such metadata would be quite complicated in some cases (examples of complicated configs: /etc/iptables.conf, /etc/samba/smb.conf, /etc/apache/httpd.conf). However, and XML Schema or something similar would likely cover most of the practical cases.

    Comments are important in config files, when a configuration is unusual. For example in my OpenVPN config, I have three options and a comment which I'll summarise here as: "ping-restart 60, ping 15, nobind -- all three are needed together to workaround a problem with some NAT routers, when the ADSL-side IP address changes dynamically".

    Somehow, a GUI, TUI, or even XML view which presents configuration files in a standardised syntax must be able to record this kind of human-relevant information somewhere. It's not enough that programs can read and edit the configs; they record important information for human users too.

    When the structure of a config file is described by some kind of metadata, that begs the question: can't the metadata described the syntax of the file too? There is no need to use XML, if the syntax can be adequately described by metadata in addition to the structure.

    Finally, it's essential that such metadata is updated by individual application updates, and not as part of a "config editor" package. This is because the metadata is only useful if it reflects the range of options currently supported by each application, not merely the options that the config editor knew about at its last release cycle. This may seem like a difficult thing to get widely adopted, but it would not be so difficult provided metadata was easy to write, described the kind of file formats that application writes are happy to use, and was actually useful. For better or worse, XML is not such a format, precisely because it's not very human friendly in comparison with many of the text formats.

    -- Jamie