Slashdot Mirror


User: dgym

dgym's activity in the archive.

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

Comments · 51

  1. Re:python with psutil on Ask Slashdot: Is C++ the Right Tool For This Project? · · Score: 3, Insightful

    Having a working Python implementation will also give you a better understanding of which parts are performance/memory sensitive. This may help guide you while rewriting in a different language, or you may find that you can achieve your goals just by hot spot optimizing your Python code using some of these fine tools:

    http://www.numpy.org/ can give you compact arrays of unboxed types and fast operations over them.
    http://cython.org/ is an amazing and versatile tool which allows you to compile your Python code, optionally add type information, optionally manage memory yourself, optionally interact with C/C++ code very easily.
    OpenCL/CUDA if your work can take advantage of them.


    If the standard Python runtime isn't simply too big for your project I can't recommend Cython highly enough. Only tackling the parts that need it is one of the keys to successful optimization and Cython lets you do just that even if it is just one loop in an otherwise pure Python file.

  2. Re:Philanthropy on Melinda Gates Pledges $560 Million For Contraception · · Score: 1

    It isn't just the end result that is important, it is also the means.

    Would we celebrate bank robbers, drug dealers and fraudsters if they were to spend a little of their money on charity? No we wouldn't because that money was gained as the result of illegal and immoral actions.

    While Gates was running Microsoft it was found guilty of abusing its desktop monopoly to take out competition in other markets. Arguably their dominant and stagnant position has set back the computing industry many years. Significant amounts of money were made as the result of illegal and immoral actions taken while Mr. Gates was running the show, and this has cost society. Giving a little back now doesn't make it alright.

  3. Free to play, not to compete on EA Launches Ultima-Based Browser Game · · Score: 3, Insightful

    EA also produce Battle Field Heroes which is free to play. They originally stated that the premium content would be limited to perks, and not give a significant game play advantage. They later decided to change that, so although you can still play for free you are very much limited to being cannon fodder for those that have bought the extremely powerful abilities and weapons.

    Why should we expect anything to be different with Lord of Ultima? In this sort of game you can spend months building everything up, and someone else can destroy it in a week, so people are going to feel compelled to buy competitive advantages if they are available.

    Free to start but expensive once you are addicted, this is becoming such a common business model it needs its own word.

  4. Re:What bullshit on UK Internet Filtering Bill Watered Down · · Score: 1

    If you are a content creator and you can't make a living, then do something else. There are many jobs I would like to do for a living, but I wouldn't get paid enough (or at all) so I do something else, it is quite straight forward. In fact if this bill goes through I will probably be put out of business (the whole hosting industry in this country will probably be collateral damage) so I will in fact do something else, thanks.

    Of course it is a shame that people copy content without paying for it, but it isn't really a problem compared to the problems of other businesses, and certainly not worth breaking something as important as the internet over.

    Shops for instance rely on physical goods. It is illegal to steal them, and yet this still happens. Shop owners spend a lot of money on physical security, and insurance in case things get stolen, and yet still don't campaign for the right to have people stopped from going near their shops (i.e. some form of imprisonment) without any proof of actual theft. When comparing "theft of intellectual property" to actual theft it is clear that the content industry has it easy, and this bill is only about alleged infringement, not actual infringement, to make matters far worse.

    But now we have an industry that has relatively few problems demanding that the internet is damaged for no good reason, and the people using the internet should pay for this expensive whim. I say no good reason because (1) no one has proved file sharing is actually bad for said industry (2) the industry seems to be doing well despite the global recession, and (3) the only point that really matters: no one has proven that the content industry is more important to more people than a free and open internet.

    I can live without TV, without films, without music, and it really wouldn't bother me. If all those industries disappeared overnight then fine, so long, and thanks for all the fish. The internet, however, improves my quality of life so much (as well as providing my income) that I would gladly keep it over the entertainment industry.

    Liberty is more important than entertainment.

  5. Re:Ask them on Good Language Choice For School Programming Test? · · Score: 1

    To give them a reasonable chance of making a good decision make sure they understand that when development time is limited C is rarely going to produce the fastest results.

    Given the obvious (and hopefully obviously wrong to anyone with experience) observation that C is harder to program but runs faster, and Python is easy to program but runs slower, I think a lot of people would go for C because it seems to be better placed for winning the competition.

    However, code normally has bottlenecks, so 95% of run time will be spent in 5% of the code. Optimizing the parts that aren't bottlenecks is a severe waste of time, and will surely affect your competition results. Anyone who knew what they were doing and wanted to win would (1) write the bulk in a high level language, (2) use a profiler and identify the bottle necks (3) spend their time trying to find better algorithms at the bottle necks, (4) finally optimize the code at the bottlenecks, pushing it to a lower level language if skill and time allowed.

    Going with the OP's original inclination would work well here. Python can be used for stages 1-3 and will give students time to try more algorithms on the all important stage 3. For stage 4 you can use c to create a dll/so and use the ctypes library to drive it directly from Python. If anyone stumbles at this stage then it isn't too much of a problem, they already have a viable entry they can submit and be proud of from the end of stage 3, this extra bit is just for the really talented to go for 1st place.

    Not only would this approach give the students an advantage in the competition, but also a really good idea of how to tackle projects in the real world too.

  6. Re:They physically own the box on GoDaddy Wants Your Root Password · · Score: 1

    We set up an authorized SSH key on every VPS at provisioning time, and tell our customers about it. However, as you state, having access is one thing and having permission to use that access is another entirely. We will only access a customer's VPS with their explicit consent, to do anything else would be immoral and illegal.

    This would be quite different if it was a managed VPS, as that implies permission, otherwise how would the hosting provider be able to manage it? However, it does not seem to be the case here.

    If the host found that the VPS was doing anything against their TOS (they suspected malware, and could have confirmed that from the network traffic) then the proper cause of action would be to notify the customer, and if they deemed it necessary they could have cut it off from the network until the customer responds. Attempting to gain unauthorized access is not the right approach, it is a quick way to lose customers and it is also illegal just about anywhere with computer crime laws.

  7. Re:Does XEN have a future? on The Book of Xen · · Score: 1

    Xen and KVM are completely different types of virtualization solution. The supposed rivalry between the two is largely bad journalism, not rooted in anything to do with the platforms themselves.

    How is that? They both support full virtualization, and they both support paravirtualization for things like networking and disks (they even use the same protocols for this - virtio). Most of the debate I have seen regarding the two is whether it is better to have a specialized hypervisor (Xen) or use a general purpose, but heavily developed and very much optimized, hypervisor (Linux). The performance benchmarks are six of one and half a dozen of the other so this debate doesn't seem overly relevant.

    If you want to run a single physical computer with multiple operating system instances, such as replacing a bank of servers with a single machine, Xen is your guy. If you want to run VMs under Linux, KVM is your friend. Conflating the two is like comparing... well, to use a car analogy, for this is Slashdot, a railroad with a tractor trailer.

    I'm not sure why you think this is the case, I consider them to be pretty much equivalent. The reason we use KVM is because Xen wasn't up to date enough to run on our brand new hardware. KVM does a fine job as a Xen replacement, and we have been using it as such for years.

  8. Re:Christ, AGAIN!? on ARM-Powered Laptops To Increase Linux Market Share · · Score: 4, Funny

    But we were all told about the 10 ARM netbooks that would appear on the market by Q3 2009. It is now Q4 so they must exist, and you must be wrong.

    I'm pretty sure this is a Microsoft stunt to make their market share look better. If you can't make geeks buy Windows, then make sure they don't buy anything at all because of all the sweet smelling vapourware on the perpetual horizon. Then again I'll blame them for most things, including a sock I lost.

  9. Re:Lyrics distract on Music While Programming? · · Score: 3, Interesting

    Or listen to swedish death metal, there might be lyrics at some imaginary level, but nothing I can discern. Literally something to scream along to.

    One place I worked had a guitar we could use when we wanted. Again, no lyrics, just people quietly playing away to the best of their ability, easily drowned out by headphones if necessary.

    There is something about the rhythm, pace and harmony of playing on a guitar for half an hour that seemed to help me make the right changes to the code when I went back to the computer. This was a place where the importance of making the right changes (and preferably only the right changes) was well understood.

  10. Re:Similar support was in Tru64 years ago. on DRBD To Be Included In Linux Kernel 2.6.33 · · Score: 1

    You can achieve live migration with iSCSI and AoE too, and if you use a SAN you will probably continue to use one of these network block device protocols.

    What DRBD does it make it relatively simple to set up a redundant SAN, using commodity hardware, from which you can export iSCSI devices etc.

    Of course if you are going to use local storage for your VPSs it is just as easy to set DRBD up on those hosts and forgo any network block device layer on top of it. Dual primary mode makes live migration in this scenario particularly convenient.

  11. Re:Similar support was in Tru64 years ago. on DRBD To Be Included In Linux Kernel 2.6.33 · · Score: 4, Interesting

    I'm not about to dismiss your experience, but things have changed over the last 15 years so it might not be as relevant as it once was.

    In that time processors have become much faster, memory has become much cheaper, commodity servers have also become much cheaper and a lot of software has become free. While that has happened hard disks have become only a little faster. As a result many people consider custom hardware for driving those disks to be unnecessary - generic hardware is more than fast enough and is significantly cheaper.

    There might still be some compelling reasons to go with expensive redundant SAN equipment, but for many situations a couple of generic servers full of disks and running Linux and DRBD will do an admirable job. The bottleneck will most likely be the disks or the network, both of which can be addressed by spending some of the vast amount of money saved by not going with typical enterprise solutions.

  12. VNC on Collaborative Software For Pair Programming? · · Score: 1

    If you have somewhere to host them you could set up some VNC servers running a desktop and all the applications they need. Two people can share the same VNC desktop so you can do the joint development. What this doesn't do is coordinate things at all, but for that I would suggest VOIP as it doesn't need mouse or keyboard input.

    One bonus is that they don't have to set up much software, just a VNC client and a VOIP client. Setting up the VNC servers is easy too, you only need to get a host installed with all the right software and then run as many VNC servers as you need on top of that.

  13. Re:Where is VMware host support? on FreeBSD 6.4 Released · · Score: 1

    Jails are great, but if you do need to run other operating systems on the same machine then you can always run Linux KVM, with FreeBSD as a guest.

    I've just tested this release and the installation went flawlessly under KVM.

  14. Re:benchmark information on Review of Sun's Free Open Source Virtual Machine · · Score: 1

    Sadly this benchmark is next to useless, there is some vital information missing.

    It is nice to see recent kernels being used, but what was the hardware, and what options were used?

    Many people are still benchmarking KVM performance on Intel chips, which is unfortunate. NPT (as found in AMD's recent chips) is a second generation virtualization technology that has a major impact on VM performance. The compile test would run nearly twice as fast on NPT enabled hardware. Intel will be bringing something similar out with their next product line up.

    There is also the question of which drivers were used. KVM supports virtio for paravirtualized drivers, but did the guest support it and was it used? I'm sure the other systems tested also have a wealth of options that could make a significant difference, sadly we don't know what was used for any of them.

    I haven't seen any good benchmarks in ages, anyone want to fund some research?

  15. Re:small footprint on VMware ESXi Available For Free Starting Today · · Score: 1

    As I said, a usable Linux system can fit on two floppies (1.44MB), so under 3MB. This would fit in some BIOSs.

    Of course this is irrelevant, any system of these proportions can be embedded with the minimum of expenditure.

    My point was that while ESXi makes sense as an embedded VM, it isn't the only option. Linux KVM can be smaller, and has more driver support, so I think there should be some healthy competition.

  16. simplicity on VMware ESXi Available For Free Starting Today · · Score: 2, Informative

    There are many setups that should work, but don't. I have used the following extensively, and in production, so maybe it can help.

    On each node I setup LVM, from which I can allocate logical volumes for the guests (e.g. guest 1 gets /dev/guests/1 on both machines).

    I then use DRBD to mirror the logical volumes, so yes, there can be quite a lot of DRBD devices - one per guest.

    For OpenVZ the DRBDs get ext3 (so quota works) and it is mounted on the node running the guest. This doesn't support live migration, instead I suspend to disk, copy the dump, and restore it on the other machine. With the intermediate steps of unmounting, switching primaries, and mounting this takes about 5 seconds.

    For KVM the guests just use the DRBDs directly. I enable dual primary which lets me do live migrations over TCP. This is extremely fast, fast enough that it would be appropriate for load balancing.

    One notable benefit of this system, as opposed to cluster file systems, is that there is no locking across the network. Each logical volume is "owned" by one node at a time, so there is no need for synchronizing access for every read or write.

    Seen too many options yet?

  17. small footprint on VMware ESXi Available For Free Starting Today · · Score: 1

    Does it really have a smaller footprint? Linux can be stripped down for embedded systems, as can the user space. You can even boot it from just a couple of floppies.

    Considering you also have a huge library of drivers available for all sorts of hardware, I think Linux makes sense as a hypervisor.

    I know many people think of Linux KVM as something you run from a full blown installation, but it doesn't have to be that way, and I think Redhat's new lineup might change that.

  18. what did you test? on VMware ESXi Available For Free Starting Today · · Score: 1

    There are so many options out there, and so few up-to-date benchmarks, can you let us know what else you tested?

    I haven't seen a good (recent) Xen vs Linux KVM study (on hardware with NPT). Adding this free VMWare offering into the mix should be interesting.

  19. It is good that you can't write Python so badly on Does an Open Java Really Matter? · · Score: 1

    The whole indentation thing is perfectly inline with the goals of Python. Programs are typically read far more than they are written. They are read every time you try to understand them, extend them or debug them.

    One of Pythons goals was to be extremely useful, which means it is desirable to encourage easy-to-read even at the expense of easy-to-write. Programmers have a much easier time reading properly indented code. In Python all code is properly indented, all the time. If the indentation is wrong the code is wrong, so it is still properly indented.

    Now these lofty ideals easily extend into elitism. If you can't write code that is properly indented then you can't write Python and it might be for the best if you don't even try. Some would argue that if you write code that is unclear even at the indentation level then what chance has the logic got, probably best if you don't write code at all. I would say that is going a bit far but then I'm not currently working with anyone who really should be banned from coding.

    Keeping track of indentation isn't too hard so I don't mind. I use vim, and you said you did too. Yes, you can't autoindent, but manual indenting is as easy as hitting "V", selecting the relevant lines, and then hitting "<" or ">".

    That said I do like autoindenting, which is one of the reasons why my language of choice is a lisp dialect. But even so I still keep a keen eye on indenting, the process is just reversed. When editing lisp I make my changes and run autoindent, looking for any movement that I wasn't expecting - which would indicate I had got my parentheses wrong.

    When reading code I still prefer Python because I know I don't have to reindent it first.

    By the way, your example of adding an if statement is a bit bogus. In a C like language you have to go to the start, add the statement, and the brace, go to the end, add the brace, then hit autoindent. There are no more steps in Python, you just start highlighting at the start, move to the end and hit manual indent. It is exactly no harder.

  20. Create fake fake moon landing videos on What Shall We Do With the Moon Once We Get There? · · Score: 4, Insightful

    It is the perfect set, don't let it go to waste.

  21. This is why even more openess is needed on Negroponte Says Windows 'Runs Well' On XO Laptop · · Score: 2, Insightful

    This wouldn't be a problem if the hardware was open, the company would just be forked and OpenXO would be available to those that want it.

    As it stands this project seems doomed, maybe not from the point of view of getting a laptop to a lot of children, but the original goal was to get an enabling device to a lot of children and was a far better idea.

  22. Buggy products on AMD To Shed 10% of Its Workforce · · Score: 5, Interesting

    I wonder if they will be getting rid of the people who decided to release the Phenom X3s and the energy efficient Phenom X4 with the TLB bug intact? By releasing a lot of new chips at the same time, some with the fix and some without, it seems as though AMD are trying to confuse people into buying buggy chips with awful performance.

    Apparently we have to wait even longer before this mess will be cleared up. Is it any surprise that revenue is down?

  23. Re:Credibility? on Using Google To Crack MD5 Passwords · · Score: 4, Informative

    Your strings have newlines in them, maybe you meant:
    echo -n happy | md5sum

    most password fields don't accept newlines, so trying without them:
    3e652df0f1332cfc9df779d49667defc - still nothing
    99b1ff8f11781541f7f89f9bd41c4a17 - still nothing
    e99a18c428cb38d5f260853678922e03 - abc123
    fd03204cfdc557b0f0d134773ae6fff5 - obscure, it finds a flash app on a site called pickles and things
    56ab24c15b72a457069c5ea42fcfc640 - happy

    So it is still not that much of a problem, but at least happy is on the list.
    I wonder if negative outlook words are more or less secure?

  24. A little random can be a lot of fun on A Report From the Heart of the Board Games Industry · · Score: 1

    Go is certainly an excellent game that I am very fond of, as are "Through the Desert" and "Hey! That's my fish!" which only have random boards, and everyone sees them before game play begins. I do enjoy randomness if it is done well and have seen some really good mechanisms for tempering it to a sweet spot for a game. For example in Power Grid the shuffled deck of power plants is fairly crucial but 8 of them are on display, and you can only buy one of the four worst ones so although there is an exciting chance of getting something seriously good, it isn't enough to throw the game out of balance.

    Any good game should require an adaptive strategy, you are trying to outwit your opponents and vica versa, if they can't throw you a few surprises then the game is going to be pretty boring. An AC mentioned poker, saying that by my reasoning it too must be a bad game because you have no control of what cards you get. This misses several important points of poker, in most variations you get to decide if you want to continue before accepting another card so you do get some say, but above all in poker there is very strong player interaction and it is the other players you play, not your hand.

    I think that mostly I just can't stand dice. Shuffled cards have some reliable properties, dice have none. Just the fact that it is possible to be out of a game of Monopoly without ever landing on a property you can buy puts me right off. If you are suffering from the ultimate unlucky streak you can literally have no choices to make for your entire game (other than deciding to throw the board on the floor of course).

    One thing I see in the some of the games I have enjoyed the most is negative feedback - the better you do the harder it is to keep on doing well, and the worse you do the easier it is to catch up. It means that the players doing well have to be just as careful as anyone else, and even someone who has been having a mostly rotten game (might even have been out of their hands if the other players have been mean) can still be in with a chance if they can just pull off their highly rewarding move of pure genius. Close races are more exciting, so this is definitely something I would be looking at if I ever get around to designing my own game.

  25. The biggest difference is strategy on A Report From the Heart of the Board Games Industry · · Score: 2, Interesting

    The board games I played as a child all suffered from the same problem, the choices to be made were important, but not as important as good luck. Obviously the worst example of this is snakes and ladders, where there are no choices at all, but Monopoly is pretty terrible on this front too as you have almost no control over where you land.

    It was a refreshing change to be introduced to German style games where there is often much less random in a game (if any at all after the initial setup) so it really is down to strategy. Some of the people I play with are more interested in playing the players rather than the game directly, and with a lot of these games relying on trading or creating alliances or peace pacts this can be a vital element. My partner prefers games where other people can't mess with what you are trying to do too badly, and there are plenty of games where the players can help, not hinder, each other.

    The Settlers of Catan is mentioned in the article and it is a very popular game but I think that it too suffers from too much random. There is an expansion pack that replaces the dice (worst game mechanic ever) with a set of cards in all the right ratios. I can't recommend this variant enough as it really helps promote the power of your choices over the power of the dice.