.js -> .rb

Hi
Whats the best way to convert a compiled ruby script back from Javascript
or bytecode to .rb?
Any useful special tools/gems for that?

thanks
Berg

Hello,

I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
How did you get Javascript files from ruby?

Cheers
Milan

···

On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:

Hi
Whats the best way to convert a compiled ruby script back from Javascript or bytecode to .rb?
Any useful special tools/gems for that?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Hi
ok, don't know if compiled is the correct word,
say converted to some lower layer (yarv, java, js, ...),
which then is interpreted.

'welcome,
Berg

···

Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch>:

Hello,

I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
How did you get Javascript files from ruby?

Cheers
Milan

On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:

Hi
Whats the best way to convert a compiled ruby script back from Javascript
or bytecode to .rb?
Any useful special tools/gems for that?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe
<ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Are you working with Opal? (Ruby->JS transpiler). That's the only way
your question makes sense to me. Otherwise, I'm not sure what you mean
when you want to... decompile Ruby in some fashion?

···

On Wed, Jan 13, 2016 at 7:35 AM, A Berger <aberger7890@gmail.com> wrote:

Hi
ok, don't know if compiled is the correct word,
say converted to some lower layer (yarv, java, js, ...),
which then is interpreted.

'welcome,
Berg

Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch>:

Hello,

I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
How did you get Javascript files from ruby?

Cheers
Milan

On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:

Hi
Whats the best way to convert a compiled ruby script back from Javascript
or bytecode to .rb?
Any useful special tools/gems for that?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Maybe you could provide us with the command that you're using to "compile".
That should clarify a lot.

···

On Wed, Jan 13, 2016 at 4:35 PM, A Berger <aberger7890@gmail.com> wrote:

Hi
ok, don't know if compiled is the correct word,
say converted to some lower layer (yarv, java, js, ...),
which then is interpreted.

'welcome,
Berg
Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch>:

Hello,

I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
How did you get Javascript files from ruby?

Cheers
Milan

On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:

Hi
Whats the best way to convert a compiled ruby script back from Javascript
or bytecode to .rb?
Any useful special tools/gems for that?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe
<ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Hello

I haven't used Opal yet.
I got a big js-File, which looks Rubyish, so it could be easier to first
convert it to Ruby, and then look what it does :slight_smile:
B.

···

Am 13.01.2016 16:43 schrieb "NBarnes" <nbarnes@gmail.com>:

Are you working with Opal? (Ruby->JS transpiler). That's the only way
your question makes sense to me. Otherwise, I'm not sure what you mean
when you want to... decompile Ruby in some fashion?

On Wed, Jan 13, 2016 at 7:35 AM, A Berger <aberger7890@gmail.com> wrote:
> Hi
> ok, don't know if compiled is the correct word,
> say converted to some lower layer (yarv, java, js, ...),
> which then is interpreted.
>
> 'welcome,
> Berg
>
> Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch>:
>>
>> Hello,
>>
>> I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
>> How did you get Javascript files from ruby?
>>
>> Cheers
>> Milan
>>
>> On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:
>>
>> Hi
>> Whats the best way to convert a compiled ruby script back from
Javascript
>> or bytecode to .rb?
>> Any useful special tools/gems for that?
>>
>> thanks
>> Berg
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

If that is your only problem I suggest you go through the js-code and look up functions or constructs you don’t understand.
Javascript isn’t too complicated, so the basic language should be readable even with little knowledge. And as a plus you learn some Javascript.

I have not yet heard of a Javascript to Ruby compiler.

And to hopefully clear things up a bit for you: Java, Javascript, etc. are not lower levels ruby is commonly compiled to but simply different languages.

Cheers,
Milan

···

Am 13.01.2016 um 17:35 schrieb A Berger <aberger7890@gmail.com>:

Hello

I haven't used Opal yet.
I got a big js-File, which looks Rubyish, so it could be easier to first convert it to Ruby, and then look what it does :slight_smile:
B.

Am 13.01.2016 16:43 schrieb "NBarnes" <nbarnes@gmail.com <mailto:nbarnes@gmail.com>>:
Are you working with Opal? (Ruby->JS transpiler). That's the only way
your question makes sense to me. Otherwise, I'm not sure what you mean
when you want to... decompile Ruby in some fashion?

On Wed, Jan 13, 2016 at 7:35 AM, A Berger <aberger7890@gmail.com <mailto:aberger7890@gmail.com>> wrote:
> Hi
> ok, don't know if compiled is the correct word,
> say converted to some lower layer (yarv, java, js, ...),
> which then is interpreted.
>
> 'welcome,
> Berg
>
> Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch <mailto:milan@milanovi.ch>>:
>>
>> Hello,
>>
>> I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
>> How did you get Javascript files from ruby?
>>
>> Cheers
>> Milan
>>
>> On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com <mailto:aberger7890@gmail.com>> wrote:
>>
>> Hi
>> Whats the best way to convert a compiled ruby script back from Javascript
>> or bytecode to .rb?
>> Any useful special tools/gems for that?
>>
>> thanks
>> Berg
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

"Looks like Rubyish" is not the same as "looks like rubbish" at all... (:

Actually, a non human-looking JavaScript file may be the output of any code optimizer/compresor which many sites and frameworks (including Rails) use to enhance JavaScript download times. But the original source is most probably still JavaScript (or CoffeeScript ot similar JS variant).

What makes it look like "rubyish" in your opinion? Is it so confidential that you can't afford to at least show some sample of it?

As others have already touched the subject, there's a Ruby => JavaScript transcoder called Opal, so in actuality, the original /may/ be Ruby. But that's very likely not the case here.

mortee

···

On 2016.01.13. 17:35, A Berger wrote:

Hello

I haven't used Opal yet.
I got a big js-File, which looks Rubyish, so it could be easier to first convert it to Ruby, and then look what it does :slight_smile:
B.

Am 13.01.2016 16:43 schrieb "NBarnes" <nbarnes@gmail.com <mailto:nbarnes@gmail.com>>:

    Are you working with Opal? (Ruby->JS transpiler). That's the only way
    your question makes sense to me. Otherwise, I'm not sure what you mean
    when you want to... decompile Ruby in some fashion?

    On Wed, Jan 13, 2016 at 7:35 AM, A Berger <aberger7890@gmail.com > <mailto:aberger7890@gmail.com>> wrote:
    > Hi
    > ok, don't know if compiled is the correct word,
    > say converted to some lower layer (yarv, java, js, ...),
    > which then is interpreted.
    >
    > 'welcome,
    > Berg
    >
    > Am 13.01.2016 16:17 schrieb "Milan van Zanten"
    <milan@milanovi.ch <mailto:milan@milanovi.ch>>:
    >>
    >> Hello,
    >>
    >> I'm not quite sure, what you mean. Ruby isn't compiled, but
    interpreted.
    >> How did you get Javascript files from ruby?
    >>
    >> Cheers
    >> Milan
    >>
    >> On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com > <mailto:aberger7890@gmail.com>> wrote:
    >>
    >> Hi
    >> Whats the best way to convert a compiled ruby script back from
    Javascript
    >> or bytecode to .rb?
    >> Any useful special tools/gems for that?
    >>
    >> thanks
    >> Berg
    >>
    >> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
    <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
    >> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
    >>
    >> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
    <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
    >> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
    >>
    >
    > Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
    <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
    > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
    >

    Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
    <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
    <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Hi
That file can't written by a human, it looks like the output of a
high-level lang - compiler. >some 1000 functions
Ok, not Java, but java-opcode.
I would say ruby is "some level" higher than js or some bytecode.
The question arising is how would I than call js from within ruby?
i could build the function-names+vars i call inside ruby, writing the code
around is much easier with Ruby than js.
Now you know the full story :slight_smile:
cheers,
Berg

···

Am 13.01.2016 17:48 schrieb "Milan van Zanten" <milan@milanovi.ch>:

If that is your only problem I suggest you go through the js-code and look
up functions or constructs you don’t understand.
Javascript isn’t too complicated, so the basic language should be readable
even with little knowledge. And as a plus you learn some Javascript.

I have not yet heard of a Javascript to Ruby compiler.

And to hopefully clear things up a bit for you: Java, Javascript, etc. are
not lower levels ruby is commonly compiled to but simply different
languages.

Cheers,
Milan

Am 13.01.2016 um 17:35 schrieb A Berger <aberger7890@gmail.com>:

Hello

I haven't used Opal yet.
I got a big js-File, which looks Rubyish, so it could be easier to first
convert it to Ruby, and then look what it does :slight_smile:
B.
Am 13.01.2016 16:43 schrieb "NBarnes" <nbarnes@gmail.com>:

Are you working with Opal? (Ruby->JS transpiler). That's the only way
your question makes sense to me. Otherwise, I'm not sure what you mean
when you want to... decompile Ruby in some fashion?

On Wed, Jan 13, 2016 at 7:35 AM, A Berger <aberger7890@gmail.com> wrote:
> Hi
> ok, don't know if compiled is the correct word,
> say converted to some lower layer (yarv, java, js, ...),
> which then is interpreted.
>
> 'welcome,
> Berg
>
> Am 13.01.2016 16:17 schrieb "Milan van Zanten" <milan@milanovi.ch>:
>>
>> Hello,
>>
>> I'm not quite sure, what you mean. Ruby isn't compiled, but
interpreted.
>> How did you get Javascript files from ruby?
>>
>> Cheers
>> Milan
>>
>> On 13.01.2016, at 16:09, A Berger <aberger7890@gmail.com> wrote:
>>
>> Hi
>> Whats the best way to convert a compiled ruby script back from
Javascript
>> or bytecode to .rb?
>> Any useful special tools/gems for that?
>>
>> thanks
>> Berg
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe
<ruby-talk-request@ruby-lang.org?subject=unsubscribe>>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Is it maybe a Jbuilder file?

Best

Tobias

···

On 13 Jan 2016, at 20:48, mortee <mortee.lists@kavemalna.hu> wrote:

"Looks like Rubyish" is not the same as "looks like rubbish" at all... (:

Actually, a non human-looking JavaScript file may be the output of any code optimizer/compresor which many sites and frameworks (including Rails) use to enhance JavaScript download times. But the original source is most probably still JavaScript (or CoffeeScript ot similar JS variant).

What makes it look like "rubyish" in your opinion? Is it so confidential that you can't afford to at least show some sample of it?

As others have already touched the subject, there's a Ruby => JavaScript transcoder called Opal, so in actuality, the original may be Ruby. But that's very likely not the case here.

mortee

On 2016.01.13. 17:35, A Berger wrote:

Hello

I haven't used Opal yet.
I got a big js-File, which looks Rubyish, so it could be easier to first convert it to Ruby, and then look what it does :slight_smile:
B.

Am 13.01.2016 16:43 schrieb "NBarnes" <nbarnes@gmail.com <mailto:nbarnes@gmail.com>>:
Are you working with Opal? (Ruby->JS transpiler). That's the only way
your question makes sense to me. Otherwise, I'm not sure what you mean
when you want to... decompile Ruby in some fashion?

On Wed, Jan 13, 2016 at 7:35 AM, A Berger < <mailto:aberger7890@gmail.com>aberger7890@gmail.com <mailto:aberger7890@gmail.com>> wrote:
> Hi
> ok, don't know if compiled is the correct word,
> say converted to some lower layer (yarv, java, js, ...),
> which then is interpreted.
>
> 'welcome,
> Berg
>
> Am 13.01.2016 16:17 schrieb "Milan van Zanten" < <mailto:milan@milanovi.ch>milan@milanovi.ch <mailto:milan@milanovi.ch>>:
>>
>> Hello,
>>
>> I'm not quite sure, what you mean. Ruby isn't compiled, but interpreted.
>> How did you get Javascript files from ruby?
>>
>> Cheers
>> Milan
>>
>> On 13.01.2016, at 16:09, A Berger < <mailto:aberger7890@gmail.com>aberger7890@gmail.com <mailto:aberger7890@gmail.com>> wrote:
>>
>> Hi
>> Whats the best way to convert a compiled ruby script back from Javascript
>> or bytecode to .rb?
>> Any useful special tools/gems for that?
>>
>> thanks
>> Berg
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe> <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

That file can't written by a human, it looks like the output of a high-level
lang - compiler. >some 1000 functions
Ok, not Java, but java-opcode.

Where does Java come from all of a sudden? And what is "java-opcode"?
Did you mean "Java bytecode"?

I would say ruby is "some level" higher than js or some bytecode.

Now you are talking about bytecode.

The question arising is how would I than call js from within ruby?
i could build the function-names+vars i call inside ruby, writing the code
around is much easier with Ruby than js.
Now you know the full story :slight_smile:

I for my part do not agree.

Kind regards

robert

···

On Wed, Jan 13, 2016 at 6:14 PM, A Berger <aberger7890@gmail.com> wrote:

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Hi
isnt java-bytecode the same as java-opcode?
Here parts of the script (selected different looking parts, all on the same
js-file) -
with which language/tools is this written?

....
Ext.apply(Ext, {
    extend: (function() {
      var o = d.constructor,
        p = function(r) {
          for (var q in r) {
            if (!r.hasOwnProperty(q)) {
              continue
            }
            this[q] = r[q]
          }
        };
      return function(q, y, u) {
        if (Ext.isObject(y)) {
          u = y;
          y = q;
          q = u.constructor !== o ? u.constructor : function() {
            y.apply(this, arguments)
          }
        }
        var s = function() {}, r, x = y.prototype;
        s.prototype = x;
        r = q.prototype = new s();
        r.constructor = q;
        q.superclass = x;
        if (x.constructor === o) {
          x.constructor = y
        }
        q.override = function(z) {
          Ext.override(q, z)
        };
        r.override = p;
        r.proto = r;
        q.override(u);
        q.extend = function(z) {
          return Ext.extend(q, z)
        };
        return q
      }
    }()),
    override: function(r, s) {
      if (r.$isClass) {
        r.override(s)
      } else {
        if (typeof r == "function") {
          Ext.apply(r.prototype, s)
        } else {
          var o = r.self,
            p, q;
          if (o && o.$isClass) {
            for (p in s) {
              if (s.hasOwnProperty(p)) {
                q = s[p];
                if (typeof q == "function") {
                  q.$name = p;
                  q.$owner = o;
                  q.$previous = r.hasOwnProperty(p) ? r[p] : k
                }
                r[p] = q
              }
            }
          } else {
            Ext.apply(r, s)
          }
        }
      }
      return r
    }
  });

....
$(function() {
  $("script").each(function(a, c) {
    if (c.src.split("/").pop().search(/^ui2.js/i) >= 0) {
      var b = c.src.split("/");
      b[b.length - 1] = "";
      jscolor.dir = b.join("/") + "assets/img/";
      return false
    }
  })
});

Anyone seen that yet?
Its a 4mb file of code like that

Berg

···

Am 13.01.2016 22:58 schrieb "Robert Klemme" <shortcutter@googlemail.com>:

On Wed, Jan 13, 2016 at 6:14 PM, A Berger <aberger7890@gmail.com> wrote:

> That file can't written by a human, it looks like the output of a
high-level
> lang - compiler. >some 1000 functions
> Ok, not Java, but java-opcode.

Where does Java come from all of a sudden? And what is "java-opcode"?
Did you mean "Java bytecode"?

> I would say ruby is "some level" higher than js or some bytecode.

Now you are talking about bytecode.

> The question arising is how would I than call js from within ruby?
> i could build the function-names+vars i call inside ruby, writing the
code
> around is much easier with Ruby than js.
> Now you know the full story :slight_smile:

I for my part do not agree.

Kind regards

robert

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

I'm pretty sure that's Javascript, not Java.

···

On Fri, Jan 15, 2016 at 8:39 AM, A Berger <aberger7890@gmail.com> wrote:

Hi
isnt java-bytecode the same as java-opcode?
Here parts of the script (selected different looking parts, all on the same
js-file) -
with which language/tools is this written?

....
Ext.apply(Ext, {
    extend: (function() {
      var o = d.constructor,
        p = function(r) {
          for (var q in r) {
            if (!r.hasOwnProperty(q)) {
              continue
            }
            this[q] = r[q]
          }
        };
      return function(q, y, u) {
        if (Ext.isObject(y)) {
          u = y;
          y = q;
          q = u.constructor !== o ? u.constructor : function() {
            y.apply(this, arguments)
          }
        }
        var s = function() {}, r, x = y.prototype;
        s.prototype = x;
        r = q.prototype = new s();
        r.constructor = q;
        q.superclass = x;
        if (x.constructor === o) {
          x.constructor = y
        }
        q.override = function(z) {
          Ext.override(q, z)
        };
        r.override = p;
        r.proto = r;
        q.override(u);
        q.extend = function(z) {
          return Ext.extend(q, z)
        };
        return q
      }
    }()),
    override: function(r, s) {
      if (r.$isClass) {
        r.override(s)
      } else {
        if (typeof r == "function") {
          Ext.apply(r.prototype, s)
        } else {
          var o = r.self,
            p, q;
          if (o && o.$isClass) {
            for (p in s) {
              if (s.hasOwnProperty(p)) {
                q = s[p];
                if (typeof q == "function") {
                  q.$name = p;
                  q.$owner = o;
                  q.$previous = r.hasOwnProperty(p) ? r[p] : k
                }
                r[p] = q
              }
            }
          } else {
            Ext.apply(r, s)
          }
        }
      }
      return r
    }
  });

....
$(function() {
  $("script").each(function(a, c) {
    if (c.src.split("/").pop().search(/^ui2.js/i) >= 0) {
      var b = c.src.split("/");
      b[b.length - 1] = "";
      jscolor.dir = b.join("/") + "assets/img/";
      return false
    }
  })
});

Anyone seen that yet?
Its a 4mb file of code like that

Berg

Am 13.01.2016 22:58 schrieb "Robert Klemme" <shortcutter@googlemail.com>:

On Wed, Jan 13, 2016 at 6:14 PM, A Berger <aberger7890@gmail.com> wrote:

> That file can't written by a human, it looks like the output of a
> high-level
> lang - compiler. >some 1000 functions
> Ok, not Java, but java-opcode.

Where does Java come from all of a sudden? And what is "java-opcode"?
Did you mean "Java bytecode"?

> I would say ruby is "some level" higher than js or some bytecode.

Now you are talking about bytecode.

> The question arising is how would I than call js from within ruby?
> i could build the function-names+vars i call inside ruby, writing the
> code
> around is much easier with Ruby than js.
> Now you know the full story :slight_smile:

I for my part do not agree.

Kind regards

robert

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Looks like generated JS, though. I don't know what it might have been
generated from.

···

On Fri, Jan 15, 2016 at 10:26 AM, NBarnes <nbarnes@gmail.com> wrote:

I'm pretty sure that's Javascript, not Java.

On Fri, Jan 15, 2016 at 8:39 AM, A Berger <aberger7890@gmail.com> wrote:

Hi
isnt java-bytecode the same as java-opcode?
Here parts of the script (selected different looking parts, all on the same
js-file) -
with which language/tools is this written?

....
Ext.apply(Ext, {
    extend: (function() {
      var o = d.constructor,
        p = function(r) {
          for (var q in r) {
            if (!r.hasOwnProperty(q)) {
              continue
            }
            this[q] = r[q]
          }
        };
      return function(q, y, u) {
        if (Ext.isObject(y)) {
          u = y;
          y = q;
          q = u.constructor !== o ? u.constructor : function() {
            y.apply(this, arguments)
          }
        }
        var s = function() {}, r, x = y.prototype;
        s.prototype = x;
        r = q.prototype = new s();
        r.constructor = q;
        q.superclass = x;
        if (x.constructor === o) {
          x.constructor = y
        }
        q.override = function(z) {
          Ext.override(q, z)
        };
        r.override = p;
        r.proto = r;
        q.override(u);
        q.extend = function(z) {
          return Ext.extend(q, z)
        };
        return q
      }
    }()),
    override: function(r, s) {
      if (r.$isClass) {
        r.override(s)
      } else {
        if (typeof r == "function") {
          Ext.apply(r.prototype, s)
        } else {
          var o = r.self,
            p, q;
          if (o && o.$isClass) {
            for (p in s) {
              if (s.hasOwnProperty(p)) {
                q = s[p];
                if (typeof q == "function") {
                  q.$name = p;
                  q.$owner = o;
                  q.$previous = r.hasOwnProperty(p) ? r[p] : k
                }
                r[p] = q
              }
            }
          } else {
            Ext.apply(r, s)
          }
        }
      }
      return r
    }
  });

....
$(function() {
  $("script").each(function(a, c) {
    if (c.src.split("/").pop().search(/^ui2.js/i) >= 0) {
      var b = c.src.split("/");
      b[b.length - 1] = "";
      jscolor.dir = b.join("/") + "assets/img/";
      return false
    }
  })
});

Anyone seen that yet?
Its a 4mb file of code like that

Berg

Am 13.01.2016 22:58 schrieb "Robert Klemme" <shortcutter@googlemail.com>:

On Wed, Jan 13, 2016 at 6:14 PM, A Berger <aberger7890@gmail.com> wrote:

> That file can't written by a human, it looks like the output of a
> high-level
> lang - compiler. >some 1000 functions
> Ok, not Java, but java-opcode.

Where does Java come from all of a sudden? And what is "java-opcode"?
Did you mean "Java bytecode"?

> I would say ruby is "some level" higher than js or some bytecode.

Now you are talking about bytecode.

> The question arising is how would I than call js from within ruby?
> i could build the function-names+vars i call inside ruby, writing the
> code
> around is much easier with Ruby than js.
> Now you know the full story :slight_smile:

I for my part do not agree.

Kind regards

robert

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

That looks like an "ugglified" Javascript file, i.e. a file which variables
and functions names have been reduced for faster transmission over the
internet, which some gems might but, but it doesn't mean that their source
is a ruby file, is just Javascript. And you seem to be confusing Java with
Javascript, they are two different languages.
Again,What you have in your hands is a Javascript file, not a low level
code or anything

···

On Fri, Jan 15, 2016, 1:27 PM NBarnes <nbarnes@gmail.com> wrote:

Looks like generated JS, though. I don't know what it might have been
generated from.

On Fri, Jan 15, 2016 at 10:26 AM, NBarnes <nbarnes@gmail.com> wrote:
> I'm pretty sure that's Javascript, not Java.
>
> On Fri, Jan 15, 2016 at 8:39 AM, A Berger <aberger7890@gmail.com> wrote:
>> Hi
>> isnt java-bytecode the same as java-opcode?
>> Here parts of the script (selected different looking parts, all on the
same
>> js-file) -
>> with which language/tools is this written?
>>
>> ....
>> Ext.apply(Ext, {
>> extend: (function() {
>> var o = d.constructor,
>> p = function(r) {
>> for (var q in r) {
>> if (!r.hasOwnProperty(q)) {
>> continue
>> }
>> this[q] = r[q]
>> }
>> };
>> return function(q, y, u) {
>> if (Ext.isObject(y)) {
>> u = y;
>> y = q;
>> q = u.constructor !== o ? u.constructor : function() {
>> y.apply(this, arguments)
>> }
>> }
>> var s = function() {}, r, x = y.prototype;
>> s.prototype = x;
>> r = q.prototype = new s();
>> r.constructor = q;
>> q.superclass = x;
>> if (x.constructor === o) {
>> x.constructor = y
>> }
>> q.override = function(z) {
>> Ext.override(q, z)
>> };
>> r.override = p;
>> r.proto = r;
>> q.override(u);
>> q.extend = function(z) {
>> return Ext.extend(q, z)
>> };
>> return q
>> }
>> }()),
>> override: function(r, s) {
>> if (r.$isClass) {
>> r.override(s)
>> } else {
>> if (typeof r == "function") {
>> Ext.apply(r.prototype, s)
>> } else {
>> var o = r.self,
>> p, q;
>> if (o && o.$isClass) {
>> for (p in s) {
>> if (s.hasOwnProperty(p)) {
>> q = s[p];
>> if (typeof q == "function") {
>> q.$name = p;
>> q.$owner = o;
>> q.$previous = r.hasOwnProperty(p) ? r[p] : k
>> }
>> r[p] = q
>> }
>> }
>> } else {
>> Ext.apply(r, s)
>> }
>> }
>> }
>> return r
>> }
>> });
>>
>> ....
>> $(function() {
>> $("script").each(function(a, c) {
>> if (c.src.split("/").pop().search(/^ui2.js/i) >= 0) {
>> var b = c.src.split("/");
>> b[b.length - 1] = "";
>> jscolor.dir = b.join("/") + "assets/img/";
>> return false
>> }
>> })
>> });
>>
>> Anyone seen that yet?
>> Its a 4mb file of code like that
>>
>> Berg
>>
>> Am 13.01.2016 22:58 schrieb "Robert Klemme" <shortcutter@googlemail.com > >:
>>>
>>> On Wed, Jan 13, 2016 at 6:14 PM, A Berger <aberger7890@gmail.com> > wrote:
>>>
>>> > That file can't written by a human, it looks like the output of a
>>> > high-level
>>> > lang - compiler. >some 1000 functions
>>> > Ok, not Java, but java-opcode.
>>>
>>> Where does Java come from all of a sudden? And what is "java-opcode"?
>>> Did you mean "Java bytecode"?
>>>
>>> > I would say ruby is "some level" higher than js or some bytecode.
>>>
>>> Now you are talking about bytecode.
>>>
>>> > The question arising is how would I than call js from within ruby?
>>> > i could build the function-names+vars i call inside ruby, writing the
>>> > code
>>> > around is much easier with Ruby than js.
>>> > Now you know the full story :slight_smile:
>>>
>>> I for my part do not agree.
>>>
>>> Kind regards
>>>
>>> robert
>>>
>>>
>>> --
>>> [guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
>>> - without end}
>>> http://blog.rubybestpractices.com/
>>>
>>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>
>>
>>
>> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
>> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
>>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Hi
the line about java was only because of the answer of Robert.
I should have done '---'* 1000 :wink:
How do you shorten such scripts?
Because of html-compresson that wouldnt make much difference?

So is it very complicated to call these functions from within Ruby?

thanks
Berg

Google "javascript uglifier".

Why would you want to call javascript code, which is supposed to be run inside the browser, from Ruby?

Then again, there's Opal which transcodes Ruby into JS, thus letting it be run in the browser, and also calling other JS code. I spared you the googling with this:

http://opalrb.org/

mortee

···

On 2016.01.15. 21:49, A Berger wrote:

Hi
the line about java was only because of the answer of Robert.
I should have done '---'* 1000 :wink:
How do you shorten such scripts?
Because of html-compresson that wouldnt make much difference?

So is it very complicated to call these functions from within Ruby?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Point of order: js isn't just a browser language any more. Look up node.js

···

On 17/01/2016 2:21 AM, "mortee" <mortee.lists@kavemalna.hu> wrote:

Google "javascript uglifier".

Why would you want to call javascript code, which is supposed to be run
inside the browser, from Ruby?

Then again, there's Opal which transcodes Ruby into JS, thus letting it be
run in the browser, and also calling other JS code. I spared you the
googling with this:

http://opalrb.org/

mortee

On 2016.01.15. 21:49, A Berger wrote:

Hi
the line about java was only because of the answer of Robert.
I should have done '---'* 1000 :wink:
How do you shorten such scripts?
Because of html-compresson that wouldnt make much difference?

So is it very complicated to call these functions from within Ruby?

thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe> <ruby-talk-request@ruby-lang.org?subject=unsubscribe><http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

That's right. Have you seen uglified node.js code though? (:

···

On 2016.01.17. 01:51, Matthew Kerwin wrote:

Point of order: js isn't just a browser language any more. Look up node.js

On 17/01/2016 2:21 AM, "mortee" <mortee.lists@kavemalna.hu > <mailto:mortee.lists@kavemalna.hu>> wrote:

    Google "javascript uglifier".

    Why would you want to call javascript code, which is supposed to
    be run inside the browser, from Ruby?

    Then again, there's Opal which transcodes Ruby into JS, thus
    letting it be run in the browser, and also calling other JS code.
    I spared you the googling with this:

    http://opalrb.org/

    mortee

    On 2016.01.15. 21:49, A Berger wrote:

    Hi
    the line about java was only because of the answer of Robert.
    I should have done '---'* 1000 :wink:
    How do you shorten such scripts?
    Because of html-compresson that wouldnt make much difference?

    So is it very complicated to call these functions from within Ruby?

    thanks
    Berg

    Unsubscribe:<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
    <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
    <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

    Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
    <mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
    <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>