Slashdot Mirror


User: AKAImBatman

AKAImBatman's activity in the archive.

Stories
0
Comments
11,370
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 11,370

  1. Re:Very Cute on Metafor: Translating Natural Language to Code · · Score: 1

    Unfortunately, no. Code tends to lack a great deal of meta-data that describes what the interactions between code modules are trying to achieve at a human interface level. The NLI -> code interface appears to actually throw away a lot of coherent info when producing code.

  2. Re:Other uses? on Metafor: Translating Natural Language to Code · · Score: 1

    Dude, I was replying to someone who was suggesting using the natural language interface for cooking programs.

  3. Re:Other uses? on Metafor: Translating Natural Language to Code · · Score: 1

    Drop the curly bits as the scope information is already present in the (SHOCK HORROR !) spacing.

    We did that in the days of COBOL. It sucked.

    Get rid of the ;'s rather use another glymph to indicate that the default line break behaviour does not hold, something like a \, perhaps.

    Or perhaps we could leave it as is? Alternatively, don't allow mid-instruction breaks. Modern computers can *scroll* horizontally, so there should be little issue with just requiring everything on one line.

    Wait, what have we here ? Another piece of beatifull Python code !

    Not another one of you people. Go away, will you? You're an annoyance to those of us who are getting things done.

  4. Re:Other uses? on Metafor: Translating Natural Language to Code · · Score: 1

    Except that you're reading it literally like a human might. Each "command" is really just a function that knows how to properly implment the action. e.g. If you have a function:

    breakEggs(&bowl)

    You would expect it to break the eggs into the bowl and discard the shells. Same thing here. It's just a meta-description.

  5. Re:Very Cute on Metafor: Translating Natural Language to Code · · Score: 1
    It would if you cleaned it up:
    if ($dataarray[0][4] ne "endinfo")
    {
    print "endinfo doesnt match\n";
    }

    if ($dataarray[0][1+$infonum+$comnum] ne "endcoms")
    {
    print "endcoms doesnt match\n";
    }

    if ($dataarray[0][2+$infonum+$comnum+$quanum] ne "enddata")
    {
    print "enddata doesnt match\n";
    }

    # set up infoarray
    for ($i=0;$i=$recordnum-1;$i++)
    {
    for ($j=0;$j=$infonum-1;$j++)
    {
    $infoarray[$i][$j] = $dataarray[$i][$j];
    }
    }

    # set up comarray, includes name and contact info: 0-5, 6 = other? comment
    for ($i=0;$i=$recordnum-1;$i++)
    {
    for ($j=0;$j=$comnum-1;$j++)
    {
    $k=$j+$infonum+1;
    #($infonum-1)+1+1
    $comarray[$i][$j]=$dataarray[$i][$k];
    }
    }
    FWIW, PHP could really do with a "println" function. It would allow programmers to remove those ugly "\n"s from their Strings.
  6. Re:Very Cute on Metafor: Translating Natural Language to Code · · Score: 4, Informative
    My guess is that if you're having trouble wrapping your head around OOP, then you're going to have trouble wrapping your head around the ins and outs of a natural language interface.

    For what it's worth, OOP is quite easy. The first thing you need to think is data encapsulation. Data encapsulation is simply the practice of bundling related data together. i.e. Color, make, year, and model are all attributes of a car. So you'd tend to put them together. You know, like structs. For example, a game sprite might have x, y, width, height, and direction variables.
    class Sprite
    {
    int x;
    int y;
    int width;
    int height;
    int direction;
    }
    Of course, we want to know what the direction stands for, so we add static constants:
    class Sprite
    {
    const RIGHT = 0;
    const LEFT = 1;
    const UP = 2;
    const DOWN = 3;

    int x;
    int y;
    int width;
    int height;
    int direction = RIGHT;
    }
    Now for the truly OOP part. We need a way of making the data operate on itself. For an example, I'll choose changing direction.
    class Sprite
    {
    const RIGHT = 0;
    const LEFT = 1;
    const UP = 2;
    const DOWN = 3;

    int x;
    int y;
    int width;
    int height;
    int direction = RIGHT;

    void changeDirection(int dir)
    {
    direction = dir;
    }
    }
    Doesn't seem like much, but what if we want to ignore improper directions?
    class Sprite
    {
    const RIGHT = 0;
    const LEFT = 1;
    const UP = 2;
    const DOWN = 3;

    int x;
    int y;
    int width;
    int height;
    int direction = RIGHT;

    void changeDirection(int dir)
    {
    if(dir < 0 || dir > 3) return;

    direction = dir;
    }
    }
    In a real OOP program, we'd probably throw an exception, but you get the idea I hope. Now that we have our Sprite class, it can be treated as a complete data type of its own:
    Sprite sprite = new Sprite();

    sprite.changeDirection(Sprite.DOWN);
    There you have it. A five minute introduction to OOP. Hopefully this will help unblock whatever mental issue is in your way. (Or badly written books as the case may be.) :-)

    (Stupid lameness filter. Recognize code will you? No, that would be too difficult wouldn't it? Stupid lameness filter. Did I mention how stupid the lameness filter is? Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you? Stupid lameness filter. Recognize code will you?)
  7. Re:Other uses? on Metafor: Translating Natural Language to Code · · Score: 4, Interesting
    Just a thought, but wouldn't it be easier to produce a specialized programming language for this? The instructions could then be pivoted into either a readable recipe, or commands for a robotic machine. Something like this:
    Ingredients
    {
    2 egg;
    1 tsp vanilla;
    4 cups flour;
    }

    Equipment
    {
    mixing bowl;
    oven;
    12x6 inch pan;
    }

    Directions
    {
    preheat oven 450 degrees farenheit;

    break 2 egg into mixing bowl;
    pour 1 tsp vanilla into mixing bowl;
    pour 4 cups flour into mixing bowl;

    mix mixing bowl;
    pour mixing bowl into 12x6 inch pan;
    place 12x6 inch pan into oven;

    bake 15 minutes;
    }
  8. Re:of little value here! on Metafor: Translating Natural Language to Code · · Score: 1

    of little value here!

    The natural language interface is of little value here!

    Forget it being a tool for this crowd then!

    You may then forget about the natural language interface being a useful tool for the Slashdot.org crowd!

    There, that should debug it. ;-)

  9. Re:Very Cute on Metafor: Translating Natural Language to Code · · Score: 1

    Hmm... something seems to have broken in the pasting. Here's a patch to the second paragraph from the original document:

    It wasn't long before it was realized that programming was a structured discipline, similar in form to mathematics, and must be treated as such. Many of the more successful languages actually broke away from English and relied more heavily on easily-parsable, special characters to define structure.

  10. Very Cute on Metafor: Translating Natural Language to Code · · Score: 5, Insightful

    While this is a cute concept, I don't think you'll be seeing computer programmers disappearing any time soon. The natural language bent was the original point of high level languages. Early languages like COBOL, SNOBOL, and BASIC were all designed to abstract programming to a level of natural language. Save for BASIC's success as a beginner's language, none of them accomplished their goal. In fact, the "natural language" design of COBOL only served to complicate the language and cause a variety of errors due to missing periods, improper spacing, and other common typing mistakes.

    It wasn't long before it was reul languages actually broke away from English and relied more heavily on easily-parsable, special characters to define structure. We can see the results of this in today's C/C++, Java, LISP, PERL (bleh), and Python languages. This new interface does nothing but try to perform some of the structural thinking done by the programmer. (Although I have my doubts as to its current real world ability.)

    So the question that then comes to bear is, "Who would use this natural language interface?" Sadly, the answer is most likely "programmers". But why would a programmer use this interface if he has to be trained in computer logic in the first place? It would seem like an unnecessary level of abstraction that would only serve to hinder a programmer's natural abilities.

    Of course, there is the documentation issue. Supposedly this interface will be useful for producing requirements in addition to code. But who produces the requirements? Not the programmer. That's usually the job of the business analyst, someone who may not even have experience with coding logic. And for code documentation, nothing quite beats the JavaDoc style documentation that has become popular in the last few years.

    I think that research like this is interesting, but I doubt it will have many uses until AI and voice recognition improves to a level similar to that seen in Star Trek. Only about 300 more years and counting. ;-)

  11. Re:yea!!! on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    That wasn't such a significant role, though.

    It wasn't? She got major screen time in many episodes, and was even the star actress in the android episode!

    No sign of the cute redhead either.

    Who?

  12. Re:Blackbox is the best! on Blackbox (Finally) Updated · · Score: 3, Insightful

    Believe it or not, I really did enjoy using CDE on my old Sun Ultras. It looked terrible, but the overall feel of the system was extremely solid and pleasent to work with. My only real complaint with it was how Sun added features by kit bashing command line utilities and Java programs into the WM. Would it have killed them to write a proper volume control instead of using the immature JMF control? Not to mention the *need* for a Winzip type of archive tool.

    Still, beggars can't be choosers, and CDE blew the hell out of early KDE and GNOME. :-)

  13. Re:Blackbox is the best! on Blackbox (Finally) Updated · · Score: 5, Insightful

    And it doesn't have all the hideous widgets from Gtk based WMs. They sure are ugly.

    Au Contraire! My favorite Window Manager, XFCE, shows how a GTK+ Window Manager can be created while still looking beautiful.

    I originally chose XFCE because it had low memory requirements and had much of the same polish that existed in CDE. At the time, neither KDE or GNOME had both features. (I'd go as far as to say that GNOME had neither.) Since I first started using it, though, XFCE has become more attractive and even more polished with time. It probably won't run as well on a 16MB P120 as the original versions, but it would probably give GNOME and KDE a good run on a 64MB machine.

    FWIW, I do like how far GNOME and KDE have come. GNOME can feel very pleasent to work in, but only if the distro preconfigures it correctly. The default installation is crap.

    KDE, OTOH, is more beautiful than ever. It's applications are solid, its installation easy, and its capabilities top notch. It's just too bad that they've never worked the kinks out of that "too much cluttered 3D" feel it has.

  14. Re:yea!!! on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    (one of them being Majel Barrett- fairly hard to reconcile with her later portrayal of the motherly-and irritating- Lxwxyayxxxwhatever Troi).

    You forgot that she also played Nurse Chapel in TOS.

  15. Re:From the series and books on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    It could work

    The Academy. The officer's first steps. These are the voyages (sorry, classes) of future Starfleet officers, on their four year mission to get good grades and suck up to admirals. To boldly go where every starfleet cadet has gone before!!!

    [CUE CAMPY TITLE MUSIC (Pop? Subdued Orchestra? Death Metal Rock?)]

    Sorry, it's just not doing anything for me. Star Trek fans are craving it old skool style. i.e. The only way we'll be happy is if the next series has the following charter:

    Space. The Final Frontier. These are the voyages of the Starship Enterprise. On its continuing mission to explore strange new worlds. To seek out new life and new civilizations. TO BOLDLY GO WHERE NO MAN HAS GONE BEFORE.

    [CUE AWESOME ORCHESTRA MUSIC]

    Ever notice that every show that didn't suck had that monologue at the beginning, plus strong orchestra music? Notice that every show that sucked didn't have either one?

  16. Re:Oh I See! on Professor Finds Fault with MS Grammar Checker · · Score: 3, Funny

    I submit that "definitely" is the most commonly misspelled word here.

    Defenetely.

  17. Re:Oh I See! on Professor Finds Fault with MS Grammar Checker · · Score: 4, Funny

    Yes they're laughing, but at the notion of hearing slashdot and grammar in the same sentence.

    That's GRAMMER, you twit!

    [...]

    Err... wait a moment....

  18. Re:Hey Bill? on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    Amusingly, that book was called Star Trek: Enterprise. (Although it was subtitled "The First Adventure".) Damn good book, but I don't think it was canon. That's why I didn't mention it myself. (Besides, a flying horse?!)

    Did you ever read Strangers from the Sky? Now THAT was a bit of Vulcan history worth making canon. :-D

  19. Re:Academy.. on William Shatner Pitches 'Starfleet Academy' Show · · Score: 2, Interesting

    No offsense to Wheaton (I know you're probably reading this), but wouldn't he come across as a bit too dopey for the role? Gary was supposed to be a hotshot competitor to Kirk that kept the both of them pushing their limits. In many ways, we can probably thank Gary for Kirk being the youngest captain.

    Whoever plays Gary Mitchell *needs* to come across as a TopGun pilot.

  20. Re:Prequels are just plain HORRIBLE on William Shatner Pitches 'Starfleet Academy' Show · · Score: 2, Informative

    The Borg were introduced as a whim to make a particular Q episode a little more interesting

    Actually, no. The Borg were supposed to be the end-of-season villian for ST:TNG season 2. If you remember the (second to last?) episode of that season, the Enterprise and the Romulan were investigating planets along the Neutral Zone that had been destroyed. The last episode was supposed to be Best of Both Worlds, but the show ran out of money. As a result, we got that stupid flashback episode instead and BoBW waited until the end of Season 3.

    What I really want to know is, what happened to the little bugs-in-the-ear from the Season 1 finale?

  21. Re:Academy.. on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    Who would play Gary Mitchell?

  22. Re:Facetious on "English" Not Threatened By Webspeak · · Score: 1

    Actually, you're making my point. "Facetious" has a very rich meaning that is difficult to describe using simpler constructs. My high school books defined it as "clumsy or innappropriate joking" which is technically correct, but misses so much of the intonation.

  23. Re:Starfleet Academy on William Shatner Pitches 'Starfleet Academy' Show · · Score: 1

    It completely owned Wing Commander IV in every way.

    Except for the fact that the gameplay sucked, the story sucked, and the actors sucked. I still have that title on my shelf. I never finished it. The core problems with the game were:

    1. The story was non-immersive and really had nothing to do with anything. ("He did this!", "Oh yeah? Well she did THIS!" Meh.)

    2. Since when do Starships fly like fighters? Or for that matter, why is my firing arc only about 10 degrees in front of the ship?

    3. The gameplay was boring and the story was boring. I picked the game up several time trying to finish it, and I kept putting it back down. "Own" Wing Commander, it did not. :-(

    If you really want a taste of story-driven starship combat, go grab a copy of Bridge Commander. Still a bit simple, but light years ahead of SF:Academy!

  24. Re:Hey Bill? on William Shatner Pitches 'Starfleet Academy' Show · · Score: 3, Interesting

    And another thing, Bones was WAY older than Kirk (by 15-20 years, I believe)! Especially when you consider that Kirk was the youngest Starfleet captain ever! (canon, I believe) The only way Bones would have been at the Academy during Kirk's tenure is if he was the Doctor on staff!

  25. Re:Love his style on William Shatner Pitches 'Starfleet Academy' Show · · Score: 2, Interesting

    No offsense, but noone takes Berman seriously anymore. Even Paramount has been less than cooperative with him as of late. Honestly, the guy must have a lifetime contract or something, because he should have been fired YEARS ago.