Slashdot Mirror


User: lkcl

lkcl's activity in the archive.

Stories
0
Comments
1,391
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,391

  1. Re:What's new is old is new again?! on Web Browser Programming Blurring the Lines of MVC · · Score: 1

    Would it not be simpler to just do this?


    ImgBox = Box.New([styleReference]);

    this is _exactly_ what GWT, Pyjamas and RubyJS/rwt allow you to do.

    actually it would, in pyjamas, be:

    from pyjamas.ui import Image

    i = Image("./icon.png")
    i.setStyleName("name-of-icon-css-style")

  2. Re:What's new is old is new again?! on Web Browser Programming Blurring the Lines of MVC · · Score: 2, Informative

    The problem is that I have yet to see an implementation through a browser that can challenge a native GUI implementation and yes this includes Sales Force, Google Mail, Google Docs and all the rest of them.

    that's why i ported pyjamas to the desktop:

        http://pyjs.org/

    pyjamas-desktop basically rips out all of the javascript, and replaces every single javascript-based function with exact same corresponding functionality that manipulates the DOM model of the underlying technology.

    and i chose http://webkit.org/ as the DOM-manipulating technology.

    i _could_ have chosen XUL / Gecko, but it took so damn long to find Hulahop - http://wiki.laptop.org/go/HulaHop - that i had to go for webkit.

    i could have chosen PyKDE / KHTMLPart but it has very subtle bugs that require the entire KDE library to be compiled with c++ RTTI switched on. if it's switched off, the whole thing falls over.

    by porting pyjamas to the desktop, it's possible to make the same application run as EITHER a desktop application (and i don't mean "running as javascript under Adobe AIR") OR a web application.

    same source code. unmodified.

    it's very cool.

  3. Re:Haha, Python programmers on Web Browser Programming Blurring the Lines of MVC · · Score: 0, Flamebait

    that's why i mention RubyJS and GWT as well. all three - RubyJS, Pyjamas and GWT - are javascript compilers.

    there are plenty more: see part-way-down the responses to http://advogato.org/article/985.html for a list which one of the advogatians posted.

  4. Re:History of the Internet (condensed) on Web Browser Programming Blurring the Lines of MVC · · Score: 1

    I cover this question in the article. partly it's to do with user expectations; partly it's to do with useability.

    the "traditional" web application, on error-form-checking, has to _regenerate_ the entire page, inserting error messages.

    the response time of such applications conflicts badly with users' expectations.

    if some javascript can do the job - immediately - of checking the password against some basic criteria, for example, why make the user wait several seconds until the server works it out?

  5. RubyJS on Web Browser Programming Blurring the Lines of MVC · · Score: 3, Informative

    also found, since the submission, rubyjs which is a ruby-to-javascript compiler and yet another port of GWT - this one's called rwt

  6. powerful but obtuse on jQuery in Action · · Score: 2, Insightful

    web programming itself is completely misunderstood. HTML is a "display" mechanism, and people believe it to be "programmable".

    then along comes javascript, one of the most fundamentally powerful yet utterly obtuse programming languages, and it gets "thrown in" amongst the "display" mechanism.

    we've known for years that mixing HTML into a programming language and vice-versa is a bad idea: you only have to look at how people get themselves into an awful mess with PHP to appreciate that. in that respect, javascript is no different.

    my take on this is that it's far better to do web client programming in a higher-level-language such as python or java. fortunately, javascript is an extremely good fit with python, and java has a limited subset of the dynamic capabilities of javascript, so is also a good (one-way) fit.

    by programming in python, java or ruby and having it translated into javascript automatically, the fear that people have of getting into an awful AJAX mess goes away.

    http://pyjs.org/
    http://code.google.com/gwt

  7. average speed of 180mph!! on Rocketman Crosses Colorado Gorge · · Score: 1, Funny

    geeez, what's not mentioned explicitly is the implpications of the fact that he managed to cross the 1500 feet - 1 mile - in 21 seconds.

    that's an *average* speed of 180mph!

    dang.

  8. Javascript Compilers: AJAX in Java, Python, Ruby on jQuery in Action · · Score: 1

    Javascript is an awful language to develop in, yet it is also incredibly powerful.

    That makes it a better target as an "intermediate" language - as human-readable assembler, if you will.

    There are two projects that allow web browsers to be programmed in much more understandable languages:

    1) GWT http://code.google.com/gwt which is a java-to-javascript compiler and AJAX library

    2) Pyjamas http://pyjs.org/ which is a python-to-javascript compiler and AJAX library

    by using this kind of technology, not only do you get to write your code in a decent high-level language, subdividing it into modules, classes and functions, but also the technology takes care of all the browser incompatibilities - again, by putting them behind well-written modules and classes with a common API.

    until AJAX was properly discovered, browsers were being treated as no more than "thin clients", where the HTML was generated by the server. AJAX has turned that on its head, as code is now being executed client-side (browser-side).

    it's becoming increasingly clear that javascript is a wildly inappropriate language to do web development in, yet it's also not going to go away and, because it is so powerful, it shouldn't HAVE to go away.

    and, if you have a compiler which turns decent high-level languages into javascript, automatically, javascript DOESN'T have to go away.

    see http://advogato.org/article/985.html comment "a question and an open request" for more information on javascript compilers such as rb2js.

  9. Solar Power carbon-hostile? on Portable Solar Power For Portable Hardware? · · Score: 4, Informative

    Before saying "I have found a way to save the planet!" check that the cost in planetary terms of the product is worth it:

    http://www.genersys-solar.com/carbon-savings/carbon_footprint_solar-panel_manufacture.asp

    seems to be saying that there's a reduction of the carbon cost when compared to other power-generation mechanisms, over the expected 35 year lifespan of the home-sized solar panels.

    are the small, portable solar panels you're advocating as carbon-friendly?

  10. scripting languages use intermediate byte code on Generic VMs Key To Future of Coding · · Score: 2, Interesting

    you have to bear in mind that scripting languages, in order to be _reasonably_ efficient, have to do intermediate byte code _anyway_.

    python uses a FORTH-like intermediate byte code, for example. the similarity to CLR will be pretty high.

    when you come to things like V8, that does on-the-fly _compilation_ which is basically the same thing as intermediate byte code, only a bit more extreme and aggressive.

    so the technology is beginning to move in the direction of "grey area" - thinning the distinctions.

    i like the idea of using javascript as the VM intermediate language.

    what's really neat about using javascript is that people have been optimising the hell out of it for a loooong time.

    so, pyv8 demonstrated an empirical result of running python TEN times faster than the standard compiler does, by translating the python into javascript and then V8 compiling it to i386 assembler on-the-fly.

    that's _very_ cool.

  11. Javascript - as a VM intermediate language(!) on Generic VMs Key To Future of Coding · · Score: 3, Informative

    no don't laugh, it works very well! there are a number of very good reasons for this.

    1) javascript is actually an incredibly powerful language, in particular due to the concept of "prototype"ing.

    2) javascript, thanks to web browsers, has an unbelievably large amount of attention spent on it, to optimise the stuffing out of it. as a result, the latest incarnation to hit the streets - the V8 engine - actually compiles to i386 or ARM assembler.

    3) the number of "-to-javascript" compilers is really quite staggering. see the comments from pyv8 article for an incomplete list.

    GWT has a java-to-javascript compiler; Pyjamas has a python-to-javascript compiler. There's a ruby-to-javascript compiler - the list just goes on.

    then there's the pypy compiler collection, which has javascript as a back-end. (and, for completeness, it's worth mentioning that it also has a CLR backend, LLVM.org backend, and a java backend).

  12. new form of cryptanalysis on Cool/Weird Stuff To Do On a Cluster? · · Score: 1

    you could run a new form of differential cryptanalysis on it, which i'm developing. contact me for details if you're interested in cracking block ciphers.
    note: this is not a hoax, a spoof or a joke.

  13. FINALLY! an UMPC with = 1024 x 768 screen on Dell Shows Off Its Eee PC Rival · · Score: 1

    i don't know if you've ever tried using firefox on 1024x600 but it's awful.

    fully 2/5ths of the screen is taken up with impossible-to-remove toolbars, and, on these tiny screens, you are left with 2 inches of readable space in which to view the web page.

    the minimum useable screen resolution is 1024 x 768 - yes those extra 168 pixels make a massive difference - and so i am deeply impressed to hear that dell have got it right, by providing a 1200 x 800 screen.

    you can always increase the font size on an 8in screen of that resolution, so that people who are blind can read it: you can't go down in font size if the resolution isn't there....

  14. readability on What Makes a Programming Language Successful? · · Score: 1, Interesting

    BASIC and PASCAL etc. are of the "functional programming" ilke (as is SQL, but that's another story - look up "the vietnam of computer science" if you're interested and also http://advogato.org/article/964.html ).

    python falls into the same category as LISP, scheme and smalltalk: incredibly incredibly powerful.

    it is very difficult to write unreadable code in python, for two key reasons:

    1) the indentation method

    same number of tabs (or spaces) indicates a block - FORCES programmers to make their code "tidy". many programming languages are absolutely xxxxing awful and impossible to read due to inadequate use of white space.

    2) compactness and elegance.

    key to python's readability is the lack of messing about and the use of english words. LISP, SCHEME and SMALLTALK were all developed when space was at a premium. so, you kept the source file small by using as obtuse-as-possible a syntax.

    by the 90s, this was completely unnecessary, and so languages like python are not only highly readable, but also due to having similar OO capabilities as the other elegant languages (lisp, scheme, smalltalk) you can do more with less code.

    result: less code on-screen, therefore you don't end up wading through pages and pages of code.

    overall... there's just really... no comparison to any other programming language.

    _especially_ java.

  15. Re:I don't really get the Java hate around here on What Makes a Programming Language Successful? · · Score: 5, Interesting

    see http://norvig.com/python-lisp.html section 10

    the author looks like he is inexperienced, and unaware of the function "reduce", which was added initially as a patch to python 1.5 by an experienced lisp programmer (along with map, lambda and filter) and so his example in section 10 could be replaced with:

    from operator import add
    reduce(add, [1,2,3])

    but the point of mentioning this is that java is extremely verbose - and consequently cumbersome.

    there is a class of programming language which python 2.x, lisp, smalltalk and other extreme-OO languages fall in to, which have an incredible elegance of expression and a level of empowerment that is wayyyy beyond anything else.

    it is not possible to count python 3000 in amongst those languages with extraordinary power, because the developers - primarily guido - believe that the functional-language-based primitives (map, lambda, reduce, filter) are "unnecessary".

    i initially thought that this was a joke - it was announced on april 1st.

    unfortunately it turns out to be true. the removal of these key features is profound: the language (python 3000) is dead before it is completed. it's difficult to explain but these functional-language primitives are extraordinarily powerful, providing a kind of "zeroth dimension" of data manipulation.

    on a single line, you can do incredible data manipulation. i regularly do things like this:

    from string import strip
    for l in open("file.csv").readlines():
          l = l.strip() # take off newline especially
          l = l.split(',') # split by comma
          l = map(strip, l) # strip white space
          l = map(int, l) # convert everything to ints

    of course you could fit that all on one line but i deliberately kept it to 4 lines in order to include the comments. you could also equally do this:

        l = l.strip().split(',')
        l = map(lambda x: int(x.strip(), l)

    the flexibility is just... amazing, in python.

    the other thing about python is that it tends to be self-documenting, and also, there appears to be a tendency of coders to actually write _some_ documentation.

    that, and the fact that it is possible to walk the source code (or, more usually, the object-code) and 'read' it from inside a program, such that you can access the documentation strings and in fact the entire program...

    so things like happydoc can auto-generate you HTML documentation, by walking the code itself and collecting all the module, class and function documentation strings - just .... just... incredible!

    i regularly do things like this:

    import os
    print os.path.__doc__

    i don't bother to look up online how the function os.path works, i print its documentation string!

    you just don't get these kinds of things with java.

  16. Re:intellectual property: enslavement of intellige on What's the Solution To Intellectual Property? · · Score: 1

    "Following your logic, intellectual property would be enslavement of soemthing intellectual in nature, it would not be enslavement of the intellect iself."

    interesting. thank you for pointing this out. both are the case. both are equally abhorrent and have significant detrimental consequences.

  17. Re:Capitalism: The real WTF: on What's the Solution To Intellectual Property? · · Score: 1

    a corporation is only supposed to "make a profit" if that is part of the articles of incorporation.

    if you change the articles of incorporation to say "non-loss" instead then you can focus on social goals. such as having enough world resources for humanity to be able to survive.

    read professor yunus' new book, "creating a world without poverty".

  18. intellectual property: enslavement of intelligence on What's the Solution To Intellectual Property? · · Score: 4, Interesting

    "intellectual property" is the 21st century's version of the victorian slave trade and other issues.

    think about the phrase "intellectual property" for a moment.

    intellectual. property. information. owned. intelligence. enslaved.

    therefore, "intellectual property" is the "enslavement of intelligence".

    this isn't some sort of waffly joke, the words "intellectual property" _say_ so.

    the implications are quite straightforward: the use of the phrase "intellectual property" has behind it just as much enslavement and disempowerment as physical slavery.

    * when you sign an employment contract, your "intellectual property rights" are taken away. you are given money, as a "sop". you cannot get any work anywhere else - you cannot get any money to live on - if you do not follow the "norm".

    * when you come up with an idea, which you find that nobody is implementing, you are afraid to make money from it because there might be someone who will bully you into submitting to their will because there is a "patent" - a government-sanctioned right to bully - the owner of which has been waiting for someone just like you, so they can take money away from you.

    ultimately, however, "intellectual enslavement" is driven by "maximisation of profit".

    fortunately, there are solutions: read muhammad yunus new book, "creating a world without poverty", in which he describes "social business" as being "capitalism with non-loss, non-dividend" at its core.

    if you have non-loss, non-dividend replacing "maximisation of profit" at the core of your articles of incorporation, then you do not have to suppress or own to "make money". you can cooperate with your former competition, working towards social goals.

    it's a long story.

  19. Re:Why do we assume it isn't possible? on Group Wants Wi-Fi Banned, Citing Allergy · · Score: 1

    did any of these studies also take into account the amount of toxic metals in the subject's bloodstream and fat deposits?

  20. metal pollution / poisoning + wifi = "problem" on Group Wants Wi-Fi Banned, Citing Allergy · · Score: 1

    in a large city where you can pick up large amounts of pollution, much of which will contain metal, it should come as no surprise that the human body would become a big antenna.

    so, being "allergic" to 2.4ghz (12.5cm) radiation isn't such a surprise. ... but if i'm correct, i think actually that such people should worry more about the toxic metals in their bloodstream and fat deposits than they should about the 2.4ghz radiation.

  21. OOXML is not an ISO standard on Microsoft Office 2007 to Support ODF - But Not OOXML · · Score: 5, Informative

    well - only if microsoft is able to buy their way through the standards process will anyone be able to buy an OOXML ISO-compliant version.

    UKUUG is currently waiting on the UK judicial system to decide whether to do a judicial review of the British Standards Institute's recent decision to ratify OOXML.

    clonking "comments" together in blocks of 100 for vote "yes no", towards the end of the (only) 5 day process, smells a bit fishy. especially as the comments weren't actually reviewed as having been actioned / corrected (in the 6,000 page document).

    the BSI came up with something ridiculous like 900 comments on the 6,000 page document.

    it's all incredibly fishy - long story. far too much to fit into one silly slashdot comment, so i'll stop.

  22. "content consumption" on Microsoft Acknowledges NBC's Wish is Its Command · · Score: 1

    i like the way that content is referred to as "consumed" in these articles. as if a video or a tv show can be slurped into your brain, like runny ice-cream or jelly. hey, which reminds me: maybe we can get food-DRM installed into american fast-food joints, to stop kids getting fat!

  23. virtual 3d office (no - not "virtual 3d desktop") on Most Business-Launched Virtual Worlds Fail · · Score: 1, Insightful

    the most practical way to make a virtual world actually "useful" is to make a virtual office.

    no, not a virtual desktop, because that would imply that placing every single item - like a 3D filing cabinet - onto the 3D rendition of the "desk top" - is something that people would find "useful".

    the "desk top" metaphor has been overused and overburdened, and, after several decades of pain, i think it's clear that it's no longer "useful".

    a 600mhz ULV pentium M, in combination with the older 815 extreme graphics chipset, is perfectly capable of fast 3D work - certainly such 600mhz ULV pentiums cannot be made to go more than 450mhz when running the "default" features of compiz / beryl desktop.

    so it's not like the technology isn't up-to-standard or anything.

    so - imagine a 3D virtual environment where you have a desk (with four legs). on the top surface is two, three or four monitors - as many as you want - representing your "application spaces". there's a telephone (bakerlite, of course). when you get a skype call or an IM, it grabs your attention by vibrating. there's a clock on the wall (not on the top of the desk). it tells the time. there's a calendar on the wall (not on the top of the desk). you click on it and it takes you to google apps or to evolution or to outlook. from a distance, panning back, you can clearly see some scheduled events on it.

    the list goes on - of things that aren't on "the desktop".

    my favourite is a "filing cabinet" which is really a filing cabinet, with drawers that open and bring up real "folders" with A-E F-K etc. on them.

    why am i mentioning this? well, against this background, taking it a step further, you might want to "meet" someone - in 3D. you might want to collaborate on a document, or show them a presentation, which will be on a virtual "easel" or in a 3D "room" with a virtual rendition of a projector. if you want to pause the presentation and go to discussing or editing a document, collaboratively, you can, with very little to distrupt the conceptual continuity.

    this is a _useful_ 3D "virtual world".

    one which you could conceivably work in on a day-to-day basis. which i think is a _great_ excuse to get stonking games machines.

    now all we need is a 3D version of mine-sweeper ha ha :)

  24. Your ant and dog are willing attackers... on USAF Considers Creation of Military Botnet · · Score: 1

    ...and are just behaving like ants and dogs.

    which makes stepping on ants and kicking dogs pointless, cruel and inhumane.

    shouting at or kicking a dog for being a dog - for it being what it is, and for a dog being true to its nature - that's just... utterly dumb.

  25. usenix paper on "IMC" - Illinois Malicious CPU on Air Force Aims for Control of 'Any and All' Computers · · Score: 1

    http://www.usenix.org/event/leet08/tech/full_papers/king/king_html/

    describes the real-world cases where this has already been done, and demonstrates - DEMONSTRATES - that surprisingly little integrated circuitry modification is required.