Apple introduces JScript, only 20 years too late





  • No, it's different, you see, it works on iOS!



  • Does it work on Lynx?



  • Probably not.



  • I'm not sure what that is, but JavaScript would be a huge step forward from Objective-C.

    Heck, ArnoldC would be a huge improvement over Objective-C.



  • This is replacing/supplementing AppleScript. They've already announced some idiot new language to replace Obj-C, Swift.

    So instead of VBScript and JScript, Apple will have AppleScript (very similar to VBScript in many ways) and ... JScript.



  • What we really need is more languages that look very similar but have slightly different names. Someone should make a language called C†† that extends VB5 to work with Ruby's standard library.


  • sockdevs

    @ben_lubar said:

    What we really need is more languages that look very similar but have slightly different names. Someone should make a language called C†† that extends VB5 to work with Ruby's standard library.

    And Java's exception handling and Python's dependence on whitespace :smile_cat:


  • Discourse touched me in a no-no place

    @RaceProUK said:

    And Java's exception handling and Python's dependence on whitespace :smile_cat:

    Take Python's fondness for fun with underscores too.


  • sockdevs

    @dkf said:

    Take Python's fondness for fun with underscores too.

    And while we're at it, how about the overwhelming use of parentheses from Common LISP?


  • Discourse touched me in a no-no place

    @RaceProUK said:

    And Java's exception handling and Python's dependence on whitespace :smile_cat:

    The evil ideas thread is :left_right_arrow: :arrow_up_down: :arrow_forward: over there.



  • @RaceProUK said:

    And while we're at it, how about the overwhelming use of parentheses from Common LISP?

    And let's also use Objective-C's fondness for brackets. Brackets and parentheses everywhere.



  • @ben_lubar said:

    What we really need is more languages that look very similar but have slightly different names.

    Right, but added to that, they need to have names that are impossible to Google.



  • I'm going to create a language named "Football", what could possibly go wrong?


  • mod

    @blakeyrat said:

    This is replacing/supplementing AppleScript. They've already announced some idiot new language to replace Obj-C, Swift.

    I thought that Swift was to be parallel to Obj-C.



  • How about Perl's symbols?


  • Discourse touched me in a no-no place

    @powerlord said:

    How about Perl's symbols?

    Better yet, Perl 6's symbols! (No other language goes quite that far overboard. Even APL pulls back from the brink…)


  • Discourse touched me in a no-no place

    @dkf said:

    Better yet, Perl 6's symbols!

    "fff" ? Is that actually a thing? [insert rage face here]


  • Discourse touched me in a no-no place

    Not because I'm enraged, mind, just because it's sort of funny.



  • I'm trying to think of a backronym for that, in the style of "ffs"


  • Discourse touched me in a no-no place

    @chubertdev said:

    I'm trying to think of a backronym for that, in the style of "ffs"

    That entire chart is some kind of fractal singularity of WTF. "iffy" "diffy" and "fiddly"? Weren't those the ghosts in pac-man?

    Every time I think I should learn more than the trivial amount of Perl I actually know, something like this makes me change my mind.



  • @FrostCat said:

    That entire chart is some kind of fractal singularity of WTF. "iffy" "diffy" and "fiddly"? Weren't those the ghosts in pac-man?

    Every time I think I should learn more than the trivial amount of Perl I actually know, something like this makes me change my mind.

    I only learned the trivial amount of Perl I know so that I could replace it with Python.



  • Here's that so far ( actually in Perl ):

    All the parentheses, braces, operator overloads, etc… one could want…

    $program = star($Statement) - $Parser::End_of_Input;
    
    $statement = _("PRINT") - $Expression - _("TERMINATOR")
                       >> sub { print ">> $_[1]\n" }
               | _("IDENTIFIER") - _('OP', '=') - $Expression - _("TERMINATOR")
                       >> sub { $VAR{$_[0]} = $_[2] };
    
    $expression = $Term - star(  _('OP', '+') - $Term
                                       >> sub { my $term = $_[1];
                                                sub { $_[0] + $term }
                                              }
                                |  _('OP', '-') - $Term
                                         >> sub { my $term = $_[1];
                                                  sub { $_[0] - $term } 
                                                }
                               )
                               >> sub { my ($first, $rest) = @_;
                                        for my $f (@$rest) {
                                            $first = $f->($first);
                                        }
                                        $first;
                                  };
    
    $term = $Factor - star(  _('OP', '*') - $Factor
                                   >> sub { my $factor = $_[1];
                                           sub { $_[0] * $factor } 
                                         }
                             | _('OP', '/') - $Factor
                                    >> sub { my $factor = $_[1];
                                             sub { $_[0] / $factor }
                                           }
                           )
                           >> sub { my ($first, $rest) = @_;
                                    for my $f (@$rest) {
                                        $first = $f->($first);
                                    }
                                    $first;
                              };
    
    $factor = $Base - (   _('OP', '**') - $Factor >> sub { $_[1] }
                        | $Parser::null >> sub{1}
                      )
              >> sub { $_[0] ** $_[1] };
    
    $base = _("INT")
          | _('IDENTIFIER', sub { $VAR{$_[0][1]} })
          | _('OP', '(') - $Expression - _('OP', ')')
          >> sub { $_[1] };
    


  • @dkf said:

    Better yet, Perl 6's symbols! (No other language goes quite that far overboard. Even APL pulls back from the brink…)

    WTF‽ When I need to script something, which I do quite a bit, I usually use perl because I've used it more, know it better and can be more productive in it than any other scripting language. However, you have just convinced me it is finally time to move on, before that... that... whatever it is is unleashed.



  • ^^ is apparently short-circuit xor. I'm curious to see how they managed to make that.



  • From what I understand Perl's been forked. Perl5 will live on and Perl6 will need to gain “market share” on it's own.
    Perl5 and Perl6 aren't even remotely the same language. Perl5 is co-opting some ideas from Perl6 ( which isn't even finished or production ready yet ) see Perl5i. But they are going to go their separate ways.



  • @M_Adams said:

    Perl5 will live on

    Good to know; I haven't really been paying any attention to Perl 6, because I knew it wasn't finished. But it's high time I really learn Python anyway. I've been meaning to for a long time. Some of my coworkers use it, and I can read it, but can't really modify it if I need to, and there's some interesting (to me) OSS written using it that I'd like to tinker with.



  • I too, need to dig into Python more. It's just, the white space issue… it drives me crazy.

    White space in every other language ever ( other than the white space esolang itself ), whether a natlang or proglang; is semantic, not syntactic.

    And that buggers my mind after a while. ( I've provided other, longer, more angst ridden posts in threads elsewhere ).


  • area_deu

    Blinky, Pinky, Inky, and Clyde.



  • @blakeyrat said:

    Right, but added to that, they need to have names that are impossible to Google.

    C†† is an excellent choice then - by default Google throws away the "††", so you'll end up with plain C answers.



  • @M_Adams said:

    I too, need to dig into Python more. It's just, the white space issue… it drives me crazy.

    White space in every other language ever ( other than the white space esolang itself ), whether a natlang or proglang; is semantic, not syntactic.

    And that buggers my mind after a while. ( I've provided other, longer, more angst ridden posts in threads elsewhere ).

    This boggles my mind. It took me less than an attosecond to get used to.



  • @chubertdev said:

    This boggles my mind. It took me less than an attosecond to get used to.

    Well as a riposte: It took me less than an attosecond to get used to the sigils in Perl that seem to bugger your mind.

    Let's call that one a draw.



  • @M_Adams said:

    Well as a riposte: It took me less than an attosecond to get used to the sigil diarrhea that seems to bugger your mind.

    Let's call that one a draw.

    FTFY


  • Grade A Premium Asshole

    @M_Adams said:

    I too, need to dig into Python more. It's just, the white space issue… it drives me crazy.

    White space in every other language ever ( other than the white space esolang itself ), whether a natlang or proglang; is semantic, not syntactic.

    And that buggers my mind after a while. ( I've provided other, longer, more angst ridden posts in threads elsewhere ).

    Same here. I know people that absolutely love Python because the syntactic nature of whitespace makes for clean, easy to read code. I, on the other hand, just prefer to make my code readable as a matter of best practice. I don't want specific rules dictated to me in regards to indentation. If whitespace can break my code, I get annoyed. It reminds me of Lisp and parens.

    I am reticent to say, but I am starting to dig Ruby. Maybe that is something for the "Programming Confessions" thread? What does @blakeyrat think?



  • @Intercourse said:

    If whitespace can break my code, I get annoyed

    THIS!

    I like being able to, in a large code section outdent my flow control stuff ( try/catch/throw/die, next/last/redo ) to highlight it's “exceptional” nature like:

    
    STARTOVER:
    for ( ..stuff.. ) {
    
          ...more stuff...
          ...even more stuff...
    
    die Exception::Whatever->new() if ...this is bad...
         ...more boring shit...
         ⋮
         ⋮
    
    redo STARTOVER if ...
    }
    

    That shows the flow control is important, as important as the for loop they're embedded in.
    That's the result of what linguist call the “End Weight Principle” the most important part of a communication is found at the end points, and in a block of code the those are: the top/bottom lines, and extreme right/left columns of that block of code.

    Requiring certain whitespace constructs destroys the utility of the “End Weight Principle” in a large set of circumstances.



  • The whitespace thing is a complete non-issue in practice.

    If you even vaguely format your code with tabs, you're already doing what Python requires you to do.



  • Oh wait, you were asking about Ruby?

    The language is fine, for certain tasks. Its lack of real threading makes it useless for many other tasks. (It has fake-o threads, so if your threads spend a lot of time asleep, it's a non-issue. If you're actually doing something CPU-heavy, you need another language.)

    The development tools are shit. But no worse than Python.



  • @M_Adams said:

    to highlight it's “exceptional” nature like:

    So people that struggle with basic grammar hate semantic whitespace. Got it.



  • People that struggle with points nitpick, Got it.

    Filed Under: Half my typing is proofread by cat.



  • Ok but here's the point: have you bothered to actually try working with Python?

    Because you'd quickly find the whitespace thing is a complete non-issue.



  • Reading is FUNdamental :smile:

    @M_Adams said:

    I too, need to dig into Python more.

    I've, to this point, only used Python to fix up stuff already written in Python or for which Python is the only “macro” language supported. Which isn't conducive to learning to appreciate it.

    I'm willing to fully agree that my Python Issues are, on the whole, as religious in nature as your Git Issues.
    And about as rational.



  • I just realized that I've never had to work on someone else's Python script. Maybe that's it.



  • I became interested in electronics, computers and programming ( in that order ) as fun hobbies as a pre-teen which through middle and high school were able to transform into fun, paying, hobbies.

    "Do what you love, and you'll never work a day in your life…" is completely true, and why I've had my current job for 15+ years.

    If I can find the `fun groove´ for Python, and divorce it ( temporarily at least ) from being a chore… Then I'll end up w/ another language notch on my belt.



  • @M_Adams said:

    If I can find the `fun groove´ for Python, and divorce it ( temporarily at least ) from being a chore… Then I'll end up w/ another language notch on my belt.

    That's probably it for me. I inherited a Perl site that I'm converting to Python, but it's a personal project (not professional), so even though I don't get paid for it, I get to make every single last decision about it.



  • And that's probably how I'd get “the groove” : start porting the fun projects I've done for my own use to Python. That's how I jumped into Java, Groovy ( ok—that's still Java ), and C# ( still trying to get past the `noob´ stage there ).



  • @blakeyrat said:

    Ok but here's the point: have you bothered to actually try working with Python?

    Because you'd quickly find the whitespace thing is a complete non-issue.

    There's still the "can't have tabs and spaces together" thing, which while makes a lot of sense, really makes for a cringeworthy experience when copying code.

    The thing is, whitespace tends to break. Pass your codes through the wrong communication channel, and you lose all your beautiful indentations.



  • Control-K, D



  • @blakeyrat said:

    Control-K, D

    Let me get out my channeling crystals and tarot cards:
    :diamonds: :diamonds: :diamonds: :diamonds: :diamonds: :flower_playing_cards:

    Ommmmmm....

    WTF :heavy_exclamation_mark::question: Why should I have to fart around with this, it should DO IT RIGHT. It should magically FIX ITSELF. It's a goddamned crime against the user to have to remember such arcane shit!

    Filed Under: Just messing w/ ya Blakey! It IS nice to have you back.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    Control-K, D

    Works fine for C#, but remember we're talking about Python here. Let's try it on a sample:

    while a:
        b
        c
    d
    e
    

    If this gets mangled in transmission, how does the editor know how many statements should be included in the while?



  • I don't remember what the combo was in PyCharm, but I recollect it worked correctly.

    Anyway, my point is the tabs/spaces mixing thing is also a non-issue because IDEs (you are using an IDE, right?) have auto-format features.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.