Loading ...
Sorry, an error occurred while loading the content.

Library/framework to manage uniformly *all* programming languages

Expand Messages
  • Gautier DI FOLCO
    Hi all, I m looking for a library or a framework to manage uniformly *all* programming languages. For example, I recently found this two plus plugins: -
    Message 1 of 10 , May 20 2:15 PM
    • 0 Attachment
      Hi all,

      I'm looking for a library or a framework to manage uniformly *all* programming languages.
      For example, I recently found this two plus plugins:
       - http://blogs.perl.org/users/ovid/2014/05/automatic-variable-highlighting-in-vim.html
       - http://www.reddit.com/r/programming/comments/25p6v3/coding_in_color/chjicw6

      They both do the same thing (highlight all the occurences of the identifier under the cursor's position) but they are language-specific.

      I want to do the same thing (or things like refactoring tools, etc.) for *all* the programming languages, is there an abstraction for that?

      Thanks by advance for your help.
      Regards.

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Xen
      Op Tue, 20 May 2014 23:15:18 +0200 schreef Gautier DI FOLCO ... You sound as if you want to write such an abstraction or its implementation yourself, but I
      Message 2 of 10 , May 20 2:55 PM
      • 0 Attachment
        Op Tue, 20 May 2014 23:15:18 +0200 schreef Gautier DI FOLCO <gautier.difolco@...>:

        I'm looking for a library or a framework to manage uniformly *all* programming languages.
        For example, I recently found this two plus plugins:
         - http://blogs.perl.org/users/ovid/2014/05/automatic-variable-highlighting-in-vim.html
         - http://www.reddit.com/r/programming/comments/25p6v3/coding_in_color/chjicw6

        They both do the same thing (highlight all the occurences of the identifier under the cursor's position) but they are language-specific.

        I want to do the same thing (or things like refactoring tools, etc.) for *all* the programming languages, is there an abstraction for that?

        You sound as if you want to write such an abstraction or its implementation yourself, but I rather doubt this is the case.

        You also sound a bit like those people who offer a vaguely described project on some freelance site that comes down to being a request for hacking.

        I think you will easily understand that "all" the programming languages is a category that doesn't exist.

        Besides, even if you wanted to offer that functionality in many languages, you would not abstract the *languages* but you would abstract the specific implementation of that feature so that it can handle more than one language description -- the language descriptions themselves would not be abstracted, they would simply hook into the specific domain of functionality (for example only the variables). Now you could build an entire framework of this but the benefit quite eludes me. 

        And I don't know much about refactoring but I also doubt you'd want to do this unattended for a myriad of languages all at once - where is the pain in using a tool for each language? Each language will have specific requirements anyway.

        So I think you should at the very least explain the reasoning behind what you want to do, if you want people to be able to help you at all....?

        Regards, Xen.


        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • Gautier DI FOLCO
        Thanks for your answer. ... Correct, I m lazy and I wanted to know if someone had this idea before me. ... Yes, I thought to mainstream programming
        Message 3 of 10 , May 21 1:09 AM
        • 0 Attachment
          Thanks for your answer.

          2014-05-20 23:55 GMT+02:00 Xen <xen@...>:
          You sound as if you want to write such an abstraction or its implementation yourself, but I rather doubt this is the case.

          Correct, I'm lazy and I wanted to know if someone had this idea before me.
           
          You also sound a bit like those people who offer a vaguely described project on some freelance site that comes down to being a request for hacking.

          :)
           
          I think you will easily understand that "all" the programming languages is a category that doesn't exist.

          Yes, I thought to "mainstream" programming languages.
           
          Besides, even if you wanted to offer that functionality in many languages, you would not abstract the *languages* but you would abstract the specific implementation of that feature so that it can handle more than one language description -- the language descriptions themselves would not be abstracted, they would simply hook into the specific domain of functionality (for example only the variables). Now you could build an entire framework of this but the benefit quite eludes me. 

          In fact I thought to code reduction.
          For example, to highlight all the identifiers we have to handle the identifiers. Refactorings like inlining or extracting require handling the identifiers too, and so on.
           
          And I don't know much about refactoring but I also doubt you'd want to do this unattended for a myriad of languages all at once - where is the pain in using a tool for each language? Each language will have specific requirements anyway.

          To have one mapping, one definition of refactorings, etc.
          For example, all the OOP refactorings work in OOP languages, why shall we reimplement them in each PL?
          My goal is to reduce the learning time, for example, if I learn a new OOP PL, I don't want to learn new bindings, I just want to learn how to code with it and I know that OOP Principles don't change.
           

          So I think you should at the very least explain the reasoning behind what you want to do, if you want people to be able to help you at all....?

          I'd try to.
          Tell me if it is clearer.

          Thanks by advance for your help,
          Regards.

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • xen
          Hi, thanks for your feedback on your own issue. ... Laziness is not a good starting point for something like this you know, because it mostly means you re
          Message 4 of 10 , May 22 8:30 AM
          • 0 Attachment
            Hi, thanks for your feedback on your own issue.

            > Correct, I'm lazy and I wanted to know if someone had this idea before me.

            Laziness is not a good starting point for something like this you know,
            because it mostly means you're asking people to do things you could very
            well do yourself for yourself. There is a fine line between asking for
            help because it is the most effective way forward, and asking for help
            because you can't be bothered to help yourself....

            > :)

            I'm basically insulting you and you're smiling in response? :P haha.

            > Yes, I thought to "mainstream" programming languages.

            Right.

            > In fact I thought to code reduction.
            > For example, to highlight all the identifiers we have to handle the
            > identifiers. Refactorings like inlining or extracting require handling the
            > identifiers too, and so on.

            Okay I don't know exactly what you mean, maybe something like what
            Facebook does to its Javascript code? They replace all occurrences of all
            identifiers with the smallest possible replacements that are possible as a
            matter of short strings being used. So if you examine their code, you will
            not find anything other than "a" or "vx" variables and function names. You
            can bet that's not how they wrote it, but they minimize the data
            transmission in terms of JS code and CSS descriptors, all the while using
            such elaborate automation schemes that the code that is left is still huge
            beyond comparison. So all of their visible code is generated and packed
            and extremely hard to debug by a user. You can't really see what it's
            doing so you either have to use some real good debugging tools, or just
            watch the network connections (GET queries) it tries to make as a result
            of that code execution, if you want to analyse the page.

            > To have one mapping, one definition of refactorings, etc.
            > For example, all the OOP refactorings work in OOP languages, why shall we
            > reimplement them in each PL?
            > My goal is to reduce the learning time, for example, if I learn a new OOP
            > PL, I don't want to learn new bindings, I just want to learn how to code
            > with it and I know that OOP Principles don't change.

            You are talking about VIM bindings for the plugins you use, right? So this
            is only a personal goal right? So you are intending to spend an awful lot
            of time developing a framework for yourself so that you can save time on
            learning some new editor bindings every time you learn a new OOP
            language?.....

            How often exactly do you intend to do that? I know I'm being inquisitive,
            but I just want to help you become clear on what it is you want to do, and
            not end up asking other people for help on something that would only be
            valuable to you if someone else took the pain of actually doing it for
            you..........

            I mean it is perfectly fine to ask for help, but not on something that you
            just want to be done FOR you so you can be a lazy ass mofo ;-).

            And I'm being this inquisitive because if someone else goes and helps you
            while not understanding what you exactly want to do, it will not end
            up helping you anyway.

            So get a grip on yourself! People don't learn a new programming language
            every few weeks. /Not even you/ :D. The number of mainstream languages is
            extremely limited and the number of native OOP languages even more so.
            Like, there is OOP in PHP but it's not exactly the mother of OOP
            languages. What I've seen of Python thus far doesn't seem like hugely OOP
            either. Then there's Ruby, which is also an interpreted scripting language
            as far as I know. Then you have the nearly deceased Java and what is left
            is C++/C#/Objective C and all that stuff.

            OOP in PHP is particularly strange. PHP has these weird concepts of error
            handling that I fail to grasp in their essence. I'm only familiar with
            Wordpress but it serves a case. Most if not the vast majority of exposed
            functions in Wordpress (all of it is exposed if it's not in an object) are
            just plain functions that are suitably named to avoid namespace
            collisions. All the error handling that exists seeems to be catered
            towards debugging your code instead of handling proper fail protection.
            Then they provide a OO layer if you want it, in case you want your code to
            be really user friendly and reusable. Part of that extention is the thing
            called "exceptions" which is neat and all but no native code uses it so
            you can only use it as a wrapper around the core functions or (likely)
            your own low level functions. So what it comes down to is that you end up
            manually checking NULL conditions all over the place, which is tiring,
            more so when a function can return both "NULL" and something else that
            evaluates to false. And you *can* provide a seemingly-neat OO wrapper that
            does graceful error handling (try, catch). But you will have to define
            every single Exception class that you need if you require any
            differentiation.

            Then there is Python. Excellence par excellence in terms of graceful error
            handling. I've never used it, yet, but that code is NEAT. I guess it is
            very much OOP, don't know the scope of that yet. But very very different
            from something like Java or C#.

            So all in all I really honestly believe that the goal of wanting to have
            one-size-fits-all refactoring application or whatever is just an idle
            fancy that you should let go off, and instead try to figure out what the
            real thing is you want to achieve, which will be much easier to
            accomplish, I am sure.

            It is a common experience of many tech helpers that people come to them
            and ask about specific solutions that are vague and elaborate, when after
            a while it turns out that the problem giver has skipped a few steps and
            settled on a supposed "wanted" solution when it's not what he/she really
            wanted after all. Meaning, perhaps you are being too specific in what you
            want and you should backtrack and explain more of your feelings.

            Anyway, good luck.

            Xen.

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • Miles Fidelman
            ... I m completely confused by this request. Isn t the point of language-specific editors and IDEs to go from those aspects that are common to all languages,
            Message 5 of 10 , May 22 8:48 AM
            • 0 Attachment
              Gautier DI FOLCO wrote:
              > I'm looking for a library or a framework to manage uniformly *all*
              > programming languages.

              I'm completely confused by this request. Isn't the point of
              language-specific editors and IDEs to go from those aspects that are
              common to all languages, and then add language-specific constructs to
              make life easier for folks programming in a specific language?

              To me, a "framework to manage uniformly *all* programming languages"
              sounds like:
              - English
              - vim, or vi, or ed, emacs, or Eclispse, or what have you, before adding
              language-specific extensions

              Or maybe:
              - a Turing tapae
              - butterflies (http://xkcd.com/378/) (speaking of which, is there a
              butterfly mode in vim?)

              Miles Fidelman





              --
              In theory, there is no difference between theory and practice.
              In practice, there is. .... Yogi Berra

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • BPJ
              ... The definition of which depends on which generation you belong to... /bpj -- -- You received this message from the vim_use maillist. Do not top-post!
              Message 6 of 10 , May 22 10:06 AM
              • 0 Attachment
                2014-05-21 10:09, Gautier DI FOLCO skrev:
                > Yes, I thought to "mainstream" programming languages.

                The definition of which depends on which generation you belong to...

                /bpj

                --
                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              • xen
                BPJ, can I ask you something out in public? Since you and Miles Fidelman are responding to this same person after I have written that lengthy piece, and you re
                Message 7 of 10 , May 22 12:54 PM
                • 0 Attachment
                  BPJ, can I ask you something out in public?

                  Since you and Miles Fidelman are responding to this same person after I
                  have written that lengthy piece, and you're completely ignoring my
                  contribution, I can only assume that I am coming across as arrogant.

                  And you guys are trying to tone me down. Which is reasonable, I guess.

                  And this seems to be a social phenomenon rather than something that can
                  also happen one-on-one. It seems to be about rules of seniority in a
                  group. It seems to be about new or inexperienced people having to take a
                  more modest place within a hierarchy when they first enter it, and to have
                  to "deserve" or "earn" a higher place up.

                  And it seems I have broken that rule a few times recently. Strangely
                  enough, it also happened on some YouTube comments. I had flamed a person
                  who had been flaming people, and although I felt really good about it,
                  other people pretty much repeated my sentiment without adding anything,
                  thereby devalueing what I had said and putting me "in my proper place".
                  Completely same phenomenon, but out on the open in a non-group of a
                  thousand million YouTube users.

                  I don't really understand this yet, but I'd like to learn about these
                  rules and what my arrogance seems to be. I don't want to keep repeating
                  that mistake.

                  My apologies if I come across as arrogant again now, but I'm sure it's
                  alright to ask this question of you people.

                  BTW, I haven't looked into my own thread yet (new vim user) but I will get
                  back to that when I have the proper time/energy/intention. I'm sure that's
                  not a problem.

                  Regards,

                  Xen.

                  --
                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/d/optout.
                • Miles Fidelman
                  ... At least in my case, my response has nothing to do with yours - which, by the way, I disagree with. Laziness is a GOOD thing in engineers - research,
                  Message 8 of 10 , May 22 4:23 PM
                  • 0 Attachment
                    xen wrote:
                    > BPJ, can I ask you something out in public?
                    >
                    > Since you and Miles Fidelman are responding to this same person after
                    > I have written that lengthy piece, and you're completely ignoring my
                    > contribution, I can only assume that I am coming across as arrogant.
                    >
                    > And you guys are trying to tone me down. Which is reasonable, I guess.

                    At least in my case, my response has nothing to do with yours - which,
                    by the way, I disagree with. Laziness is a GOOD thing in engineers -
                    research, don't reinvent the wheel, think before implementing, design
                    your way out of a job (or at least into the next one). Beyond that, it
                    wasn't (IMHO) on point.

                    My response was a somewhat snarky response to the original poster (and,
                    I think, on point).

                    Now thinking that your "contribution" was the be all and end all
                    response to the original poster - now that IS arrogant (or at least a
                    bit too full of yourself).

                    On the other hand, this is an Internet email list - nobody cares if you
                    come across as arrogant, what ultimately matters is if you're
                    substantive. In fact, again IMHO, nobody cares about you (or me) at
                    all. At best, leaving trolls aside: original-posters are looking for
                    answers to questions or to promote something; responders care about
                    giving back (maybe), gathering chits for future help, gaining cred - and
                    more cynically, showing off how smart, and/or clever, and/or snarky they
                    are; readers maybe learn something or at least are entertained.

                    Miles Fidelman



                    --
                    In theory, there is no difference between theory and practice.
                    In practice, there is. .... Yogi Berra

                    --
                    --
                    You received this message from the "vim_use" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php

                    ---
                    You received this message because you are subscribed to the Google Groups "vim_use" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                    For more options, visit https://groups.google.com/d/optout.
                  • Gautier DI FOLCO
                    ... I just wanted to know if this kind of abstraction was already implemented, it seems that it s not the case, no problem. I can try to do it, maybe fail, but
                    Message 9 of 10 , May 23 12:35 AM
                    • 0 Attachment
                      2014-05-22 17:30 GMT+02:00 xen <xen@...>:
                      Hi, thanks for your feedback on your own issue.


                      Correct, I'm lazy and I wanted to know if someone had this idea before me.

                      Laziness is not a good starting point for something like this you know, because it mostly means you're asking people to do things you could very well do yourself for yourself. There is a fine line between asking for help because it is the most effective way forward, and asking for help because you can't be bothered to help yourself....

                      :)

                      I'm basically insulting you and you're smiling in response? :P haha.


                      Yes, I thought to "mainstream" programming languages.

                      Right.


                      In fact I thought to code reduction.
                      For example, to highlight all the identifiers we have to handle the
                      identifiers. Refactorings like inlining or extracting require handling the
                      identifiers too, and so on.

                      Okay I don't know exactly what you mean, maybe something like what Facebook does to its Javascript code? They replace all occurrences of all identifiers with the smallest possible replacements that are possible as a matter of short strings being used. So if you examine their code, you will not find anything other than "a" or "vx" variables and function names. You can bet that's not how they wrote it, but they minimize the data transmission in terms of JS code and CSS descriptors, all the while using such elaborate automation schemes that the code that is left is still huge beyond comparison. So all of their visible code is generated and packed and extremely hard to debug by a user. You can't really see what it's doing so you either have to use some real good debugging tools, or just watch the network connections (GET queries) it tries to make as a result of that code execution, if you want to analyse the page.


                      To have one mapping, one definition of refactorings, etc.
                      For example, all the OOP refactorings work in OOP languages, why shall we
                      reimplement them in each PL?
                      My goal is to reduce the learning time, for example, if I learn a new OOP
                      PL, I don't want to learn new bindings, I just want to learn how to code
                      with it and I know that OOP Principles don't change.

                      You are talking about VIM bindings for the plugins you use, right? So this is only a personal goal right? So you are intending to spend an awful lot of time developing a framework for yourself so that you can save time on learning some new editor bindings every time you learn a new OOP language?.....

                      How often exactly do you intend to do that? I know I'm being inquisitive, but I just want to help you become clear on what it is you want to do, and not end up asking other people for help on something that would only be valuable to you if someone else took the pain of actually doing it for you..........

                      I mean it is perfectly fine to ask for help, but not on something that you just want to be done FOR you so you can be a lazy ass mofo ;-).

                      And I'm being this inquisitive because if someone else goes and helps you while not understanding what you exactly want to do, it will not end up helping you anyway.

                      So get a grip on yourself! People don't learn a new programming language every few weeks. /Not even you/ :D. The number of mainstream languages is extremely limited and the number of native OOP languages even more so. Like, there is OOP in PHP but it's not exactly the mother of OOP languages. What I've seen of Python thus far doesn't seem like hugely OOP either. Then there's Ruby, which is also an interpreted scripting language as far as I know. Then you have the nearly deceased Java and what is left is C++/C#/Objective C and all that stuff.

                      OOP in PHP is particularly strange. PHP has these weird concepts of error handling that I fail to grasp in their essence. I'm only familiar with Wordpress but it serves a case. Most if not the vast majority of exposed functions in Wordpress (all of it is exposed if it's not in an object) are just plain functions that are suitably named to avoid namespace collisions. All the error handling that exists seeems to be catered towards debugging your code instead of handling proper fail protection. Then they provide a OO layer if you want it, in case you want your code to be really user friendly and reusable. Part of that extention is the thing called "exceptions" which is neat and all but no native code uses it so you can only use it as a wrapper around the core functions or (likely) your own low level functions. So what it comes down to is that you end up manually checking NULL conditions all over the place, which is tiring, more so when a function can return both "NULL" and something else that evaluates to false. And you *can* provide a seemingly-neat OO wrapper that does graceful error handling (try, catch). But you will have to define every single Exception class that you need if you require any differentiation.

                      Then there is Python. Excellence par excellence in terms of graceful error handling. I've never used it, yet, but that code is NEAT. I guess it is very much OOP, don't know the scope of that yet. But very very different from something like Java or C#.

                      So all in all I really honestly believe that the goal of wanting to have one-size-fits-all refactoring application or whatever is just an idle fancy that you should let go off, and instead try to figure out what the real thing is you want to achieve, which will be much easier to accomplish, I am sure.

                      It is a common experience of many tech helpers that people come to them and ask about specific solutions that are vague and elaborate, when after a while it turns out that the problem giver has skipped a few steps and settled on a supposed "wanted" solution when it's not what he/she really wanted after all. Meaning, perhaps you are being too specific in what you want and you should backtrack and explain more of your feelings.

                      Anyway, good luck.


                      Xen.

                      --
                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      --- You received this message because you are subscribed to the Google Groups "vim_use" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
                      For more options, visit https://groups.google.com/d/optout.

                      I just wanted to know if this kind of abstraction was already implemented, it seems that it's not the case, no problem.
                      I can try to do it, maybe fail, but the route one takes is more important than the destination.

                      Thanks.

                      --
                      --
                      You received this message from the "vim_use" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php

                      ---
                      You received this message because you are subscribed to the Google Groups "vim_use" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                      For more options, visit https://groups.google.com/d/optout.
                    • BPJ
                      ... Mine neither -- I was commenting on the OP s remark, not yours, wasn t I? Besides I agreed witth you if anything: the set of all programing languages is
                      Message 10 of 10 , May 23 1:22 AM
                      • 0 Attachment
                        2014-05-23 01:23, Miles Fidelman skrev:
                        > At least in my case, my response has nothing to do with yours

                        Mine neither -- I was commenting on the OP's remark, not yours,
                        wasn't I? Besides I agreed witth you if anything: the set of "all
                        programing languages" is too big and too varied to be handled
                        uniformly, and the set of "mainstream" languages is variable
                        across time and whom you ask. That said a bit more coordination
                        when it comes to binding assignment might not be a bad idea,
                        although it should not and cannot be enforced -- it can only be
                        achieved by plugin developers looking at what others have done,
                        or even better by making things user-customizable. Which
                        functionality you use often or seldom also varies by individual,
                        and in time for each individual, I daresay.

                        /bpj

                        --
                        --
                        You received this message from the "vim_use" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php

                        ---
                        You received this message because you are subscribed to the Google Groups "vim_use" group.
                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                        For more options, visit https://groups.google.com/d/optout.
                      Your message has been successfully submitted and would be delivered to recipients shortly.