Slashdot Mirror


User: julesh

julesh's activity in the archive.

Stories
0
Comments
8,446
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 8,446

  1. Re:The rise of Javascript. on JavaScript Decoder Plays MP3s Without Flash · · Score: 2

    The closest thing it has to actual classes feels like a crudely bolted on hack (like Perl, but with even less syntax support).

    In some senses, this is a good thing. The fact that you don't need specific syntax to declare a new kind of object is quite liberating. I can define new object kinds by manipulating old ones, or by the more traditional ruote of declaring a constructor function. You're quite able to set up functions that produce new object kinds when you call them. All this makes the environment very flexible. Yes, there is the down side that certain simple tasks become a little harder, and a certain amount of boilerplate code becomes necessary to achieve them. You can't have everything,.

    It uses the same symbol for addition and string concatenation, leading to the necessity of ugly hacks like parseInt() that could just as easily be done transparently if the two (conceptually dissimilar) operations had separate symbols.

    Turning a string into a number is an information-losing transformation. In my book, such transformations should never occur automatically, so parseInt() is IMO better than automatic conversion.

    Most of the commonly built-in JavaScript APIs abuse developers by forcing them to use callbacks because JavaScript has no notion of blocking calls and doing work in other threads at the same time.

    This is an issue with the design of the web browser object model, not javascript itself. To be frank, allowing multithreaded web pages would be a nightmare for browser developers, and is not something I would have expected in any reasonable timeframe. The fact that it is supported (sort-of) by HTML5 came as quite a shock to me.

    Worse, most JS APIs (e.g. XHR) don't provide any extra parameters for passing context data through them to your callback. This forces you to do such awful hacks as hiding program data in the DOM tree and building generated helper functions on the fly for every freaking call. Such design makes the use of those functions very, very cumbersome, to say the least.

    This is only an issue because you're doing it wrong. JS supports closures, which means you do not need a parameter to pass context data to your callback. You do it like this:

    function setCallbacks(object, context)
    {
        object.callback = function () { // code that uses context
        };
    }

    Or like this:

    function bindMethod (fn, object)
    {
            var boundFn = fn;
            var boundObject = object;
            var outerargs = arguments;
            return function () {
                    var newargs = Array (outerargs.length - 2 + arguments.length);
                    for (var i = 0; i < outerargs.length - 2; i ++)
                            newargs[i] = outerargs[i + 2];
                    for (var i = 0; i < arguments.length; i ++)
                            newargs[i + outerargs.length - 2] = arguments[i];

                    return boundFn.apply (object, newargs);
            }
    }

    object.callback = bindMethod(context.method, context, "additional parameters go here");

    This turns the object callback into an invocation like context.method(context, "additional parameters go here", [parameters that would normally be passed to the callback).

  2. Re:Jurisdiction on British Student Faces Extradition To US Over Copyright · · Score: 1

    "Crimes" against a nation's people? For *linking* to copyrighted content!?

    Since (according to the Berne convention) copyrights are automatic, that means pretty much every website on the Internet is copyrighted. Which means every hyperlink to a page that you don't own is potential copyright infringement. I think it would be safe to say that under this definition, almost every website on the planet is now guilty of a crime.

    Generally speaking (there are exceptions) for something to be a crime you must be aware that you are doing it and that it is likely to have the effect that the law is intended to prevent [note that this is not the same as knowing the law exists]. In order to successfully prosecute somebody for criminal contributory copyright infringement (as this case would be) the prosecutor will have to prove that (1) the links were to infringing content, (2) the accused knew at the time of publishing them that they were to infringing content and (3) that they had (or the accused should have known that they were likely to have) the result of encouraging more people to infringe the copyrights in question. If you have such links on your web site, you will (by definition) know about them.

  3. Re:Jurisdiction on British Student Faces Extradition To US Over Copyright · · Score: 2

    Well, since both countries are signatories to the Berne Convention [wikipedia.org] ... technically, by treaty the US is legally entitled to ask for the extradition.

    Could you point out to me where in the Berne Convention extradition to the country of origin is mentioned as a remedy. In fact, it's quite clear in the opposite direction: violations are to be prosecuted in the territory where the infringement took place, in this case (if any infringement did take place) that is the UK.

  4. Re:Who cares on $500,000 Worth of Bitcoins Stolen · · Score: 1

    Maybe you can, but I can't (all my legal relations happen in the UK, where US bank notes are not legal tender). Yet, I'd still call US notes money. Why not, therefore, bitcoin? As long as it's freely exchangeable, it seems to me to meet the definition.

  5. Re:But on $500,000 Worth of Bitcoins Stolen · · Score: 2

    Who said it was safe? The idea was to emulate real cash as closely as possible, and one of the consequences of this is that it is possible to steal it.

  6. Re:Anonymous payments on $500,000 Worth of Bitcoins Stolen · · Score: 1

    Always make sure you're better armed and trained than your guard. They're only human and are corruptible.

    You can have however much armament and training as you want, if somebody you're working with unexpectedly pulls a gun on you, there's nothing you can do about it.

    That said, you presumably have copies of their identity documents in a safety deposit box somewhere, and $500K won't last long on the run. Maintaining a fake identtity is expensive.

  7. Re:Another option on Japanese Scientist Creates Meat Substitute From Sewage · · Score: 1

    Genesis 1:28 doesn't say "have piles of babies", except to the most simple minded. Something that abounds on Slashdot.

    So what does "be fruitful and increase in number" mean, then?

    Here's a quote from the top-ranking google commentary on the verse:

    The meaning is quite clear, and needs little elaboration. God created two humans of different sexes so that they could reproduce. He ordered them to have children and start to populate the world with more humans. There is obviously a limit to the number of children that Eve could give birth to. One might safely assume that God's instruction to Adam and Eve were also binding to their children, grandchildren, even down to the present generation.

    (source)

  8. Re:ASCAP and BMI charge for covers / jukebox music on Senate Bill Could Make It Illegal To Upload Lip-Synced Videos · · Score: 1

    Because for as long as youtube responds to DMCA takedown requests, they benefit from the safe harbor protections in the DMCA and are therefore not liable. The recording industry would lose the case. They don't want such an expensive, highly public loss.

  9. Re:C/C++ faster but produces more bugs on C++ the Clear Winner In Google's Language Performance Tests · · Score: 1

    I am not OP anonymous coward, but for I can say this: Yes, sometimes I have memory problem in C++. Like 3 or 4 times a year. So the problem exists, but it is much much less serious than GC proponents attempt to claim.

    And how much time do you spend thinking about memory management issues in an average day? It's very hard to measure, but I'm willing to guess it's not trivial. Tracking down bugs is not the only cost associated with manual memory management.

  10. Re:Java is fast on C++ the Clear Winner In Google's Language Performance Tests · · Score: 1

    Meh, in a world of IT where cost of servers in a small/med business is a very large concern

    Additional cost of a better server to cope with GC overhead: ~$500, plus maybe $100 per annum extra power/cooling costs.
    Cost of developer time to deal with manual allocation on a nontrivial project: could easily come to $10000.

    Yes, off-the-shelf products designed to be used by large numbers of users should be written with manual memory management, because they can offset this cost into large numbers of customers. Most software out there is not used by this many people, though.

  11. Re:Uhm, wrong about LOTRO on Steam Now Offering Free-To-Play Games · · Score: 1

    In LOTRO you can buy everything -including the expansions and quest packs- using turbine points you can earn in game.

    This also applies to DDO, FYI.

  12. Re:Problem of perception? on Mozilla MemShrink Set To Fix Firefox Memory · · Score: 1

    No, there is a method to do it as part of the API. It happens that no pages are ever discarded, but programs could be using it right now, and an OS update could cause them to be discarded in the future.

  13. Re:duh? on Ars Technica Review Slams Duke Nukem Forever · · Score: 1

    It certainly does seem that what made Duke Nukem 3D Awesome is missing from DNF.

    You know what really made Duke 3D awesome? The fact that it was a fully-3D shooter, released 6 months before Quake (which most people seem to regard as the first such shooter these days).

  14. Re:This is why on First Challenge To US Domain Seizures Filed · · Score: 1

    They could but the problem would persist because the DNS root servers are in US .

    Erm... http://en.wikipedia.org/wiki/File:Root-current.svg

    Looks like there are root NSs all over the world to me.

  15. Re:This is why on First Challenge To US Domain Seizures Filed · · Score: 1

    And pray tell, how do you get an international domain name such as .com without going through a US registrar? Monopolies are bad.

    I register mine with Total Registrations, who are a UK company. There are several other non-US .com registrars. The government could try exerting influence on ICANN, but in the end *any* domain could be influenced via that route, as ICANN theoretically has the power to reassign TLDs to new registrars who might be more amenable to US government requests.

    This is one of the reasons ICANN needs to be an international body, so that no individual nation is able to exert undue influence on naming systems.

  16. Re:R.I.P on First Challenge To US Domain Seizures Filed · · Score: 1

    It's hard to see how the 4th and 6th apply in this case, to be honest. The fifth is quite clear though:

    [...] nor shall any person be [...] deprived of [...] property without due process of law; nor shall private property be taken for public use, without just compensation.

    (emphasis mine)

  17. Re:Toss up on First Challenge To US Domain Seizures Filed · · Score: 1

    This the US government acting unilaterally without jurisdiction and a complete disregard for the judicial processes, laws, and sovereignty of foreign nations.

    I don't think foreign nations enter into the equation here. A domain name, in the end, is a contractual agreement with a registrar to provide resolution services. If that registrar is a US corporation, then the contract is fulfilled in the US and is therefore subject to US law.

    Now, whether the seizures were legal under US law is another matter entirely.

  18. Re:What about the Eee Pad? on A Deep-Dive Look At Samsung's Galaxy Tab 10.1 · · Score: 1

    I don't believe the Galaxy 10.1 has a memory slot (at least, I have not found any spec sheet online that mentions it). Major FAIL if true.

    This one mentions it: http://www.androidauthority.com/ipad-2-vs-motorola-xoom-vs-samsung-galaxy-tab-10-1-10341/

  19. Re:Missing the point on A Deep-Dive Look At Samsung's Galaxy Tab 10.1 · · Score: 1

    It's funny that these formerly PC performance sites decided to jump into the fray and began applying the gamer rig logic to tablets with pointless specs that don't explain anything of value to the average consumer.

    Speaking as somebody who's already decided to buy an Android 3.x tablet but has yet to decide which one, reviews like this are very useful. The specs in question are quite helpful: CPU performance, graphical performance, battery life. These things are important, especially as more and more people are buying tabs for portable gaming purposes.

  20. Re:Well on A Deep-Dive Look At Samsung's Galaxy Tab 10.1 · · Score: 1

    The price of a 16GB Galaxy Tab 10.1 with no 3/4G is $499, identical to the iPad 2 [apple.com].

    Yes. But in terms of hardware spec, it's far superior.

    1280x800 10.1" display vs. 1024x768 9.7". Galaxy Tab's also narrower, meaning it is more likely to fit in pockets, etc.
    595g vs. 610g
    1GB RAM vs 512MB
    sdhc slot vs. no expandability of storage

  21. Re:Not as bad as Opera on Mozilla MemShrink Set To Fix Firefox Memory · · Score: 1

    There is a limit for how much memory a 32bit application can address, 3GB being it (if running on 64bit system with extended memory support set in the executable, otherwise its 2GB)

    Most 32-bit systems are more than capatable of providing 3GB of application address space. Under Windows, you'll need the /3GT kernel command line option. Under Linux, it should just work.

  22. Re:Problem of perception? on Mozilla MemShrink Set To Fix Firefox Memory · · Score: 1

    First off, for better or for worse there's no way for an OS to actually free an allocation used by an application in either Linux or Windows. There is no mechanism in either the page or heap allocation APIs in either operating system to declare an allocation in such a way as to let the OS know that instead of paging this memory to disk when low on memory, it should instead just free it and let the application know it has done so.

    Good point. Except that there is. GlobalAlloc(size, GMEM_DISCARDABLE) on Windows is a published API for providing just such a declaration to the OS. It happens that all 32-bit versions of Windows ignore the flag, but it is still part of the public API, and as it was extremely useful under Win16 I have often wondered why MS removed it.

  23. Re:Good Idea on Man Creates Open Source Flashlight · · Score: 1

    The 18650 used in the HexBright Flex is less common

    Hmmm... 18650 is the closest thing there is to a standard size for rechargeable li-ions. The fact that there isn't much market for standard-sized rechargeable li-ions is probably the only reason you don't see them more often. They are quite readily available on ebay, from most electronics components shops, etc.

  24. Re:It's not just Bitcoin. on Bitcoin Used For the Narcotics Trade · · Score: 1

    I know GPU is much, much faster, but we're looking at sinking multiple real-world cents worth of electricity into every bit cent that's generated

    It's not only much faster, it's also much more energy efficient. You can make money bitcoin mining, as long as you have the hardware already (paying off your hardware costs seems unlikely). So, if you have another application for a cluster of high performance GPUs, bitcoin mining on the side can be a way of recouping some of your expense.

    there's a finite quantity to mine, most of which is already in the hands of BC's founders

    AIUI, the amount available to mine grows at an approximately linear rate over time (50 bitcoins every 10 minutes approx).

  25. Re:It doesn't work on Ask Slashdot: Compensating Technical People For Contributing to Sales? · · Score: 1

    Absolutely. You have to ask why your customers trust your engineers better than they do your sales staff, and the obvious answer is that the engineers would never recpommend a more expensive solution unless the customer really needed it. Put them on commission, and this will change really quickly.