Is ruby dying?



  • @Arantor said in Is ruby dying?:

    Assuming something new that isn't internally fucktarded comes along.

    Being fucktarded doesn't matter as long as it's new and cool.



  • @Arantor said in Is ruby dying?:

    So it doesn't work for one site, it works just fine on others. But I guess that would require you actually knowing something about the language and its ecosystem, which last I checked, you don't.

    JESUS FUCKING CHRIST. WTF was that cunty reply for?

    Don't get into arguments outside your comfort zone with people who actually do deal with these things.

    1. I will get into any arguments I am drunk enough to want to get into. You don't get to tell me anything. You ain't my Dad.
    2. I had a pretty balanced opinion based on facts and opinions from other developers. Then I used decent judgement to form an opinion based on what I have previously read. Fuck I must be such a dickhead.
    3. I backed my opinions on evidence that I presented, and I think I am fairly well read about web tech.

    In future don't be a fucking dick. I was asking for an argument.



  • @Arantor said in Is ruby dying?:

    what language would Zed Shaw recommend?

    So you know what to avoid?


  • Winner of the 2016 Presidential Election

    @dkf said in Is ruby dying?:

    @lucas1 said in Is ruby dying?:

    That is the thing, you can do some really clever stuff with strongly type languages that you can't with JS, Method Overloading you can't do sensibly in JS, you gotta fuck about with the args variable.

    OTOH, strongly typed languages usually find taking full advantage of variadic calling really difficult. It's a very different paradigm, one of the things that if you change it, you change everything despite it being theoretically pretty much trivial…

    Why's that?



  • @Dreikin I am guessing it is because it has to go from knowing there is a set number of parameters of a particular type, to an unknown numbers of parameters of possibly unknown types.

    But it is only a guess.


  • Winner of the 2016 Presidential Election

    @lucas1 said in Is ruby dying?:

    @Dreikin I am guessing it is because it has to go from knowing there is a set number of parameters of a particular type, to an unknown numbers of parameters of possibly unknown types.

    But it is only a guess.

    That sounds like the switch from strong typing to dynamic typing, which doesn't really seem "trivial".

    Also, the function has to be able to know what to do with the things it's receiving, so there should still be some constraints on what is passed in. The worst case I can think of is string formatting, but for something like C# all the problematic stuff is taken care of by things like Object.ToString() + is/as for specialized formats. Other things could be taken care of by default parameters and named arguments, all of which would seem to fit within the strong typing paradigm.



  • @Dreikin I was comparing JS to C# in that sentence.

    but you explanation makes sense.


  • :belt_onion:

    @RaceProUK said in Is ruby dying?:

    To be honest, all these "[language] is dying!" articles are just FUD. All it means is the cool factor has expired, and it's no longer the 'new hotness'.

    To be fair, from what I can see of it, the "new hotness" is about all that Ruby had going for it. So maybe it is in fact dying...


  • FoxDev

    @lucas1 said in Is ruby dying?:

    Method Overloading you can't do sensibly in JS, you gotta fuck about with the args variable.

    Or just check for undefined, which is the technique used by a lot of libraries, including jQuery.

    @dkf said in Is ruby dying?:

    OTOH, strongly typed languages usually find taking full advantage of variadic calling really difficult

    In C#, you can do SomeMethod(params dynamic[] arguments), which will do essentially the same job as JS's arguments autovariable. But then you'd be throwing away all that type safety, so you'd have to be sure it's the right thing to do.



  • @RaceProUK said in Is ruby dying?:

    Or just check for undefined, which is the technique used by a lot of libraries, including jQuery.

    No.

    You must use args.


  • FoxDev

    @lucas1 Are you saying this isn't valid JS?

    //arg1 is optional
    function thing(arg1, arg2, arg3) {
        if (arg3 === undefined) {
            arg3 = arg2;
            arg2 = arg1;
        }
        //Do work
    }
    
    thing(2, 3);
    thing(1, 2, 3);
    

    Because it is valid:
    0_1480899809106_upload-dda4b904-04e3-4ade-b43b-13f8fe3774eb



  • @RaceProUK no.


  • Discourse touched me in a no-no place

    @RaceProUK said in Is ruby dying?:

    In C#, you can do SomeMethod(params dynamic[] arguments), which will do essentially the same job as JS's arguments autovariable. But then you'd be throwing away all that type safety, so you'd have to be sure it's the right thing to do.

    But my point was more to do with the patterns of function calls that it enables, and that's not an area which JS has really taken a lot of advantage of. It's even more foreign to the way that C# libraries work. It's really a complete up-ending of the rules and what you can expect to achieve with them. And I'm never going to explain this coherently at 1am…


  • FoxDev

    @lucas1 I've given you an example of how to emulate method overloading in JS, along with proof that it works, yet you still deny it's valid JS? Just how much JS experience do you actually have?

    The argument list for a JS function isn't part of the signature. JS identifies a function solely by its name, and you can pass as many arguments as you like. If there are named arguments, JS will automatically fill them for you until it runs out of wither named arguments or passed argument, then execute the function itself. So, for thing(arg1, arg2, arg3), all of these calls will work:

    thing();
    thing(1);
    thing(1, 2);
    thing(1, 2, 3);
    thing(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
    

    And that's why JS doesn't have method overloading: it doesn't need it.



  • @Arantor said in Is ruby dying?:

    @Polygeekery you really think the next hot big thing will be more retarded than JavaScript on the server? Really? Really really?

    I believe he just implied that the next hot thing would likely be "internally fucktarded". Being dumber than server-side JS is a rather low bar for the limbo.

    @flabdablet said in Is ruby dying?:

    COBOL.JS is the future.

    See? Difficult, but not impossible.



  • @RaceProUK said in Is ruby dying?:

    I've given you an example of how to emulate method overloading in JS, along with proof that it works, yet you still deny it's valid JS? Just how much JS experience do you actually have?

    Didn't say that ever.



  • @RaceProUK said in Is ruby dying?:

    The argument list for a JS function isn't part of the signature. JS identifies a function solely by its name, and you can pass as many arguments as you like. If there are named arguments, JS will automatically fill them for you until it runs out of wither named arguments or passed argument, then execute the function itself. So, for thing(arg1, arg2, arg3), all of these calls will work:

    I know all of this.


  • FoxDev

    @lucas1 Then you're going to have to explain what you're talking about, because right now, it's not at all clear.



  • @RaceProUK Not my problem



  • I am tired I am going to bed.



  • @RaceProUK said in Is ruby dying?:

    @lucas1 I've given you an example of how to emulate method overloading in JS, along with proof that it works, yet you still deny it's valid JS? Just how much JS experience do you actually have?

    The argument list for a JS function isn't part of the signature. JS identifies a function solely by its name, and you can pass as many arguments as you like. If there are named arguments, JS will automatically fill them for you until it runs out of wither named arguments or passed argument, then execute the function itself. So, for thing(arg1, arg2, arg3), all of these calls will work:

    thing();
    thing(1);
    thing(1, 2);
    thing(1, 2, 3);
    thing(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
    

    And that's why JS doesn't have method overloading: it doesn't need it.

    Because it's dumb. You're relying on always passing a different number of arguments. Say the function is Area(object). With Circle it should do pi*r^2. Rectangle is height*width, and triangle Β½*height*width.
    The first two could work - use the ugly hack and just pass the parameters. The first and third would collide. There are two parameters in both calculations (and they're presumable the same type).
    That would leave the only difference between area(rectangle) and Area(triangle) the argument type. And js doesn't do that, does it ?



  • @lucas1 said in Is ruby dying?:

    I was asking for an argument.

    And you're having an argument. What's the problem, exactly? 🚎



  • @swayde said in Is ruby dying?:

    That would leave the only difference between area(rectangle) and Area(triangle) the argument type. Ana java doesn't do that, does it ?

    Java does (what JS don't).

    You can always emulate the dispatch:

    function area(shape)
    {
        if (shape.type === "circle") //stringly typed is best typed!
        {
            return areaCircle(shape);
        }
        else if (shape.type === "square")
        {
            //...
        }
    }
    

  • FoxDev

    @swayde The way you'd handle that would be to use JS's OO support:

    Circle.prototype.Area = function () {/*code*/};
    Rectangle.prototype.Area = function () {/*code*/};
    Triangle.prototype.Area = function () {/*code*/};
    


  • @Maciejasjmj yeah, but then i'd just use CircleArea etc. and check in the caller... It's the same problem. Then we might as well send the class type as a string etc...



  • @swayde said in Is ruby dying?:

    @Maciejasjmj yeah, but then i'd just use CircleArea etc. and check in the caller... It's the same problem. Then we might as well send the class type as a string etc...

    Are you aware that objects can have methods in object oriented programming?



  • @ben_lubar said in Is ruby dying?:

    @swayde said in Is ruby dying?:

    @Maciejasjmj yeah, but then i'd just use CircleArea etc. and check in the caller... It's the same problem. Then we might as well send the class type as a string etc...

    Are you aware that objects can have methods in object oriented programming?

    I am. And i'm trying to come up with the justification i had for it not working in JS. It was probably something with inheritance.



  • For the record, if you're calling a different method body based on the argument types, the author of the code must already be able to determine the argument types, and therefore they can just call slightly differently named functions instead of employing compile-time name mangling.



  • @RaceProUK said in Is ruby dying?:

    @swayde The way you'd handle that would be to use JS's OO support:

    Circle.prototype.Area = function () {/*code*/};
    Rectangle.prototype.Area = function () {/*code*/};
    Triangle.prototype.Area = function () {/*code*/};
    

    Yeah, but that's not overloading - it's more like polymorphism. And you modify the prototype, which looks kinda iffy architecturally - it takes the code you're writing out of your part's scope and presents it everywhere that uses Circle. Which is okay for something like Area, but for something like DrawInTheToolbar you probably don't want to just slap it on the prototype and expose it to, say, your math library.


  • Garbage Person

    Our QA group has standardized on rspec for integration tests. No idea why.



  • @lucas1 you were asking for an argument by presenting a less than well informed opinion as fact, about something you haven't actually used.

    If this were about something you know well, and I don't, you wouldn't fucking hesitate to point out to me how little I know. Don't act surprised that someone does it to you when you're talking about something you seem to act like you know something about but have it solely off anecdotal evidence.

    Either that or we're back to you being a terrible communicator.



  • @Arantor said in Is ruby dying?:

    Either that or we're back to you being a terrible communicator.

    0_1480916876472_upload-314966a5-794c-4016-b876-1e77050a3bd2



  • @Arantor Python 2 is the only Turing complete one because it's the only one that can run Python 2 code.


  • Dupa

    @cartman82 said in Is ruby dying?:

    @lucas1 said in Is ruby dying?:

    @cartman82 TypeScript isn't really statically typed. JShint is a fucking linter FFS dude.
    It isn't static typing.
    You should have said Babel btw.

    It's typed enough.

    No one is digging all the way back to fucking Java and its crap. Type hinting FTW.

    I have this feeling @cartman82 was drunk posting yesterday.



  • @kt_ while I think you are right, I also think you accidentally a word.


  • Dupa

    @Arantor said in Is ruby dying?:

    @kt_ while I think you are right, I also think you accidentally a word.

    You right. Please don't send to a PHP concentration camp!



  • @kt_ that really depends who you accidentally out that sentence. I already live in a PHP concentration camp. Maybe Lucas should spend some time in one so he can understand what he's talking about.


  • Dupa

    @Arantor said in Is ruby dying?:

    @kt_ that really depends who you accidentally out that sentence. I already live in a PHP concentration camp. Maybe Lucas should spend some time in one so he can understand what he's talking about.

    Well, really, I wouldn't wish this on my worst enemy.

    But I'd happily wish it on @lucas1.


  • Discourse touched me in a no-no place

    @Maciejasjmj said in Is ruby dying?:

    Yeah, but that's not overloading - it's more like polymorphism.

    That's the right approach for calculating the area of a shape when the shape is considered to be the object of interest.

    but for something like DrawInTheToolbar you probably don't want to just slap it on the prototype and expose it to, say, your math library.

    That's because it is crossing concerns; it doesn't really make that much sense (in most apps) to think in terms of just drawing a rectangle or circle. Instead, you're usually drawing something shaped like that for a purpose, to illustrate something else. In other words, it's not just a circle, it's a radar, or a wheel, or a part of a circular volume control, or …

    This whole argument irritates me. Too many hypotheticals, too little grounding in the constraints of a real application. 😢


  • BINNED

    @kt_ said in Is ruby dying?:

    Please don't send to a PHP concentration camp!

    The way you're going, we may have to send you to a concatenation camp of some sort regardless.


  • β™Ώ (Parody)

    @cartman82 said in Is ruby dying?:

    The next big fortune 100 company / unicorn startup will not have their software based on .NET, open source or not.

    Eh...but there are already plenty of current fortune 100 companies with tons of .NET and Java. It just doesn't get the high profile attention that the current hotness (or even yesterday's) gets.



  • @RaceProUK Yes you can do it that way, but it really isn't method overloading. Also I suspect you are just using the args variable by proxy.


  • Discourse touched me in a no-no place

    @boomzilla said in Is ruby dying?:

    the current hotness

    Today's current hotness is tomorrow's old hat. Always.

    I'll take my hats pre-aged. At least then I know how shabby they're really going to look in a few years.



  • @Arantor said in Is ruby dying?:

    @lucas1 you were asking for an argument by presenting a less than well informed opinion as fact, about something you haven't actually used.

    No I wasn't. I said "these guys (who work for a large well known website) disagree". That isn't asking for an argument, it is pointing out the nuance and like most things in tech things tend to be swings and roundabouts.


  • BINNED

    @Arantor said in Is ruby dying?:

    So if Ruby is dying and .NET is dying and PHP is dying, does that mean the future is NodeJS? Because if it is, fuck that noise.

    Would you rather have the future be Ada or Haskell? 🚎

    @lolwhat said in Is ruby dying?:

    Well, is that the name of a trans hooker?

    Probably. Paging @Lorne-Kates ...


  • Winner of the 2016 Presidential Election

    @antiquarian said in Is ruby dying?:

    Would you rather have the future be Ada or Haskell? 🚎

    What's the 🚎 for? 😿


  • BINNED

    @Dreikin said in Is ruby dying?:

    What's the 🚎 for?

    It realistically won't happen unless I'm elected World Dictator, and possibly not even then. Besides, if it did happen, most of the stuff we see now on the front page (at least those of us who still bother with the front page) wouldn't compile and therefore wouldn't be submitted. Where would we be then?


  • Winner of the 2016 Presidential Election

    @antiquarian said in Is ruby dying?:

    Where would we be then?

    I dunno. How do you feel about universal health care and abortion on demand? And what's your position on unelective cilantro? Would you treat Taiwan as an independent state, a subsidiary of China, or go with the current status quo? Vim, Emacs, or ed?

    Obviously we need to know these things in order to form an informed opinion on the potential outcome of having you as world dictator. There're only so many bonus points you get from replacing JavaScript.

    I anticipate your response to the cilantro question to be quite divisive.



  • @antiquarian said in Is ruby dying?:

    Where would we be then?

    Haskell concentration camps?


  • BINNED

    @Dreikin said in Is ruby dying?:

    universal health care

    In a country with politicians who aren't corrupt? Meh, I don't have a problem with socialism between consenting adults. Here, on the the other hand (the US)? No way!

    @Dreikin said in Is ruby dying?:

    abortion on demand

    It's one of those issues without a clearly correct answer that's really just there to give us something to πŸ”₯ about.

    @Dreikin said in Is ruby dying?:

    And what's your position on unelective cilantro?

    In favor where appropriate (everywhere except dessert).


Log in to reply