RFC - One word alias for require_relative

Discussion in 'Ruby' started by Ilias Lazaridis, Jun 11, 2011.

  1. I can't resist...

    Remember this, Ilias?

    And then:

    Your English skills aren't a problem; after all, Matz has good but not
    flawless English also. Your conduct is... well, I suppose we can now add
    "hypocritical" to the list.
     
    David Masover, Jun 17, 2011
    #81
    1. Advertisements

  2. Indeed it does, and this is probably why I respond to him as much as I do,
    because I started out the same way.

    This is going to be a long one. I'll try not to tell this story more than
    once, because it's so long, and borders on actually being offtopic.



    I wanted a language which was "fast enough", where "fast enough" meant "at
    least as fast as Java, and better if it can approach C++", which compiled to
    portable bytecode, preferrably bytecode for VMs people are likely to have
    (Java or .NET) but a new VM would be acceptable, could run in 32-bit or 64-bit
    modes, had flexible syntax with minimal verbosity, was extremely dynamic
    semantically but ran as fast as static code, handled unicode well, had good
    multiprocessing primitives (like Erlang)...

    The list goes on. And on. And on.

    I rejected Ruby at first because it was "too slow", and because I didn't see a
    way it could be much faster, especially because I didn't quite understand the
    difference between symbols and strings. Also, it runs from source, and didn't
    seem to have any good compilers -- at the time, I thought I wanted to do game
    development, and while I wanted my game to be almost automatically portable
    (compile once, run anywhere, so I don't have to convince anyone to let me make
    a Linux version), I also didn't want to actually ship source.

    While I suppose I had a good rationale for almost every question I asked, I
    followed a very similar pattern to Ilias. I'd get annoyed when people would
    answer my real question instead of the one I asked, because then we'd be
    arguing about architecture, not realizing how much I had to learn about that.
    I would also wander from group to group -- I'm not sure I ever made an
    appearance on Ruby-Talk directly, but I suspect I hit the IRC channel at some
    point. I was really excited about Perl6 before it really was anything
    resembling an actual language. I tried Squeak, and rejected it because 64-bit
    support was experimental, and it seemed that it might be difficult to port
    software between 32-bit and 64-bit, and even if it would work perfectly
    eventually, the amount of work it was taking them to make a 64-bit Squeak VM
    suggested that either the language was too difficult to port or the community
    was too small to react to these kinds of changes in technology.

    Basically, I spent my teenage years like this. I would often be tempted to
    reinvent various wheels, and I still am.

    But when it came down to it, when I really had to, I could program. It started
    off really sloppy, and I actually still occasionally support programs I wrote
    as a teenager. Still, I was able to get things done, at first mostly in Perl,
    just little things, avoiding any project big enough that it would warrant The
    Perfect Language.

    The turning point was probably my first programming job, at a startup. For the
    first time, I was forced to work with other people, and to actually program
    roughly 8 hours a day, every day. For the first six months or so, it was
    entirely JavaScript, running on HD-DVDs. For the next six months or so, it was
    mostly Ruby -- Blu-Ray won, but we took our Rails backend for the HD-DVD stuff
    and adapted it into a music widget.

    The second time through, I saw a lot more of Ruby's brilliance. Plus, the
    performance had improved significantly, to the point where it was still common
    knowledge that "Ruby is Slow", but I could no longer see any major design
    decisions which made Ruby _pointlessly_ slow -- any decisions that would tend
    to make implementations slow weren't just carelessness, they were deliberate
    tradeoffs between performance and programmer productivity.

    I had to learn, the hard way, that there is no "perfect" language. While I can
    think of some things I wish some language did that no languages do yet, I no
    longer believe that there could ever be a language which is semantically
    "better" than all other languages in all ways. One thing many people on this
    list will be familiar with is Ruby vs JavaScript -- and I have to say, there
    are tons of things I miss about each in the other, and some of them are
    mutually exclusive. I like that every interaction with an object in Ruby is
    actually sending it a message (a method call, usually), but that's
    incompatible with JavaScript's idea that objects are just hashes of methods
    and values.

    That, and I actually learned to program.

    The biggest change in my thinking now is that, when I was a teenager asking
    the kind of questions Ilias does, I wasn't speaking from experience where a
    given construct actually bothered me. It just bothered me from some idealistic
    standpoint which had no connection to any program I have ever or will ever
    write. These days, when I complain that (for example) autoload didn't actually
    call the system require, I actually do have a good reason for wanting to
    intercept the behavior of autoload.

    That is, I've gone from being an idealistic, dogmatic, theoretical programmer
    to being an actual, practicing, empirical programmer. It just took me five or
    ten years, and I probably made some enemies along the way.



    So as rude and arrogant as he is, and as little as he deserves (or wants) my
    pity, it's kind of painful for me to see Ilias making the exact same mistakes
    I did, and then grew out of -- and frustrating when he refuses to hear a word
    of it.

    Hopefully this is useful, or at least interesting. Thanks for your patience,
    whoever's actually read this far. At the very least, now you see why it's so
    hard for me to actually not feed this troll.
     
    David Masover, Jun 17, 2011
    #82
    1. Advertisements

  3. Ilias Lazaridis

    Ryan Davis Guest

    Yeah... but...

    % curl -s http://legacy.lazaridis.com/resumes/lazaridis.html | grep -i =
    years
    <li>20 years - Solving Technical Problems Abstractly </li>
    <li>18 years - IT Business </li>
    <li>15 years - Software Developement </li>
    <li>12 years - Product Management </li>
    <li>10 years - Digital Electronic Design </li>
    <li>05 years - Public System Analysis (Open Source Domain) </li>

    (not that I believe Ilias)
     
    Ryan Davis, Jun 17, 2011
    #83
  4. unsubscribe
    =
     
    Kane Williams, Jun 17, 2011
    #84
  5. [...] - (story of Mr. Masover's live, which I've not read)
    Wow, this (off-topic, off-context, my-personal-experiences-to-others-
    by-brute-force) Troll is really a special one.

    Get serious, Mr. Masover.

    The only troll you feed is yourself.

    And it seems that I make you very hungry.
    $ CopyAndPaste -shttp://lazaridis.com/244.html

    25 years - IT Business, Solving Technical Problems Abstractly
    15 years - Software Developement
    10 years - Digital Electronic Design & Product Management
    05 years - Public System Analysis (Open Source Domain)

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    #85
  6. [...]

    Clearly kind of off-topic/off-context obsessed.

    Dismissed!

    ..

    http://lazaridis.com
     
    Ilias Lazaridis, Jun 17, 2011
    #86
  7. I am *responding* to "collaborative trolling attacks".

    No defamation at all.

    It is now within the archives:

    You and the others, are... trolling within my threads.

    You *are* the real trolls, by definition.

    Simple as that.

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    #87
  8. Ilias Lazaridis

    KlausG Guest

    No, it's easy. Here are some 7 letter words:

    1000.times.collect { 7.times.inject("") { |w,c| w <<
    (97+rand*26).to_i.chr } }

    Choose one that suits you and use it with the alias method

    --klaus
     
    KlausG, Jun 17, 2011
    #88
  9. My own suggestions didn't pass the requirements.

    I order the list

    involve 'lib/alter' # 2011-06-16 by Sam Duncan
    locally 'lib/alter' # 2011-06-11 by Rob Biedenharn
    uniload 'lib/alter' # my
    request 'lib/alter' # my
    include 'lib/alter' # my
    relative 'lib/alter' # my

    -

    Original situation of headers

    require_relative "lib/baselib"
    require "sinatra"

    Use of "involve" results in very clean headers:

    involve "lib/baselib"
    require "sinatra"

    -

    Applying the change:

    module Kernel
    alias involve require_relative
    end

    -

    Btw: I am the project-manager (on my own project), and as I'm alone
    for now, I had to fulfil the role of the executing project-member as
    well (posting this RFC here).

    This thread gives additionally some valuable insights subjecting the
    topic "trolling" and "trolls", uncovering some "trouble-makers" of
    comp.lang.ruby (or ruby-talk).

    Many thanks to the very few people which managed to stay in-topic and
    in-context.

    Time to close this thread.

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    #89
  10. Ilias Lazaridis

    Gary Wright Guest

    I can't believe I'm adding to this conversation...

    Ruby already has an idiom for naming two related methods so how about:

    require "a/b" # the usual
    require! "a/b" # require relative to __FILE__
     
    Gary Wright, Jun 17, 2011
    #90
  11. Ilias Lazaridis

    Gary Wright Guest

    It doesn't exist, I was just suggesting it as a possibility...

    Gary Wright
     
    Gary Wright, Jun 17, 2011
    #91
  12. Exactly. While I'm an old unix hack, I really like the descriptiveness of
    this method. I know *exactly* what it's doing, without having to learn
    some new obscure word.

    Matt
     
    Matthew K. Williams, Jun 17, 2011
    #92
  13. Ilias Lazaridis

    Ryan Davis Guest

     
    Ryan Davis, Jun 17, 2011
    #93
  14. This could become my new favourite.

    "!" is used as a convention, to clarify that a method "modifies the
    object"

    "!" could be used for stand-alone functions (e.g. the "flat" Kernel
    functions which do not operate strictly on an object) to clarify (by
    convention) "you should know what you do, possible risks" or simply
    "alternate implementation".

    And with an additional space, headers look clean, too:

    require! "lib/baselib"
    require "sinatra"

    Yes, this could be the "winner".

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    #94
  15. Is this so? I've seen many which mention the employers/customers
    anonymous, with an "references on request".
    I don't care what the masses think and believe, especially those of
    your kind.
    You're getting ordinary.

    You can do better.

    (but the thread is now closed, possibly in the next one)

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    #95
  16. You worked only on NDA'd projects for 20 years, and you can't even
    mention past *clients*? Yeah, right.
    Well, let's get a little less ordinary: Why did you leave Siemens a
    year after finishing your training as electrician? Provide the
    Arbeitszeugnis[0] of your time at Siemens.

    What happened to your first attempt at self-employment? Provide the
    name and (expired by now, alas) registration of the business, or the
    district court where the business was registered.

    What's your further education after you made it to journeyman electrician?

    Why didn't you decide to visit a Fachhochschule[1] to gain academic credent=
    ials?

    What are your certifications in programming, program management, and design=
    ?

    Until proven otherwise, we are free to assume that:

    A) Siemens fired you (an extraordinary event back in the late 1980s,
    since Siemens was like Japanese car makers in that time: If you were
    good, you were set for *life*).
    B) You don't have any credentials in software development.
    C) You aren't qualified to be admitted to a Fachhochschule.
    D) You never worked since you were fired by Siemens, living off of
    unemployment grants.


    Explanations for non-Germans:

    [0] An Arbeitszeugnis is a diploma of sorts which details how well--or
    not--an employee behaved and worked during their time at an employer.
    It's by no means confidential (though private, and Ilias can't be
    compelled to provide the Arbeitszeugnis).

    [1] A Fachhochschule is roughly equivalent to a technical college in
    the US, and allows those without the necessary credentials in second
    level education (called "Fachhochschulreife", which is usually *not*
    attained if you visited a lower rung,
    not-very-intellectually-demanding school called "Hauptschule", or if
    one wasn't good enough to visit the 10th year of schooling at a
    "Realschule") to attain a degree in a field related to their trained
    job after some time spent working in their learned field. Usually,
    expertise can be provided in a less formal manner, for example
    references to clients that one worked for, if one wants to study in a
    field that one didn't train in.

    --=20
    Phillip Gawlowski

    A method of solution is perfect if we can forsee from the start,
    and even prove, that following that method we shall attain our aim.
    =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Leibnitz
     
    Phillip Gawlowski, Jun 17, 2011
    #96
  17. =20
    Yes, EVERYONE in this list already knows this, Ilias. But it makes one =
    wonder, if you don't care about what people like us think and believe, =
    why are you even here in the first place?

    If only you were capable of ever listing to yourself, much less anyone =
    else, the world would have been saved your inane trolling. But alas, =
    this is simply entertainment now. The question now is: How far can Ilias =
    go in self-affirming his own uselessness?

    Of course for myself the definition of insanity comes to mind. No-one =
    can show Ilias who he really is, so I shall stop trying.

    Jason=
     
    Jason Roelofs, Jun 17, 2011
    #97
  18. Ilias Lazaridis

    Tony Arcieri Guest

    [Note: parts of this message were removed to make it a legal post.]

    That's quite the euphemism for "trolling mailing lists". I'd say the fact
    you put it on your resume makes you a professional troll, but professionals
    get paid.
     
    Tony Arcieri, Jun 17, 2011
    #98
  19.  
    Ilias Lazaridis, Jun 17, 2011
    #99
  20. On 17 Éïýí, 23:15, Phillip Gawlowski <>
    wrote:
    [...]

    What about this:

    I'm a 13year old kid, which likes to play with the regulars on the
    language forums.

    Now, the thread has reached 100 posts, its _really_ time to close it.

    Have fun, confused soul!

    ..
     
    Ilias Lazaridis, Jun 17, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.