[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] rkelly 1.0.1 Released

Aaron Patterson

6/8/2009 10:10:00 PM

I have no idea how this happened, but I'm sure that someone pulling out a
Beretta was involved. Anyway, here it is:

rkelly version 1.0.1 has been released!

* <http://rkelly.rubyforg...

The RKelly library will parse JavaScript and return a parse tree.

Changes:

### 1.0.1

* Bugfixes

* Fixed nondeterministic file order loading issue.

## Example

##
# Iterate over and modify a JavaScript AST. Then print the modified
# AST as JavaScript.
require 'rkelly'

parser = RKelly::Parser.new
ast = parser.parse(
"for(var i = 0; i < 10; i++) { var x = 5 + 5; }"
)

ast.each do |node|
node.value = 'hello' if node.value == 'i'
node.name = 'hello' if node.respond_to?(:name) && node.name == 'i'
end
puts ast.to_ecma # => awesome javascript

* <http://rkelly.rubyforg...

--
Aaron Patterson
http://tenderlovem...

10 Answers

Eleanor McHugh

6/9/2009 3:18:00 PM

0

On 8 Jun 2009, at 23:10, Aaron Patterson wrote:
> I have no idea how this happened, but I'm sure that someone pulling
> out a
> Beretta was involved. Anyway, here it is:
>
> rkelly version 1.0.1 has been released!
>
> * <http://rkelly.rubyforg...
>
> The RKelly library will parse JavaScript and return a parse tree.

You are a sick puppy - and I love you for it :)


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-...
----
raise ArgumentError unless @reality.responds_to? :reason


Aaron Patterson

6/9/2009 3:45:00 PM

0

On Wed, Jun 10, 2009 at 12:18:04AM +0900, Eleanor McHugh wrote:
> On 8 Jun 2009, at 23:10, Aaron Patterson wrote:
>> I have no idea how this happened, but I'm sure that someone pulling
>> out a
>> Beretta was involved. Anyway, here it is:
>>
>> rkelly version 1.0.1 has been released!
>>
>> * <http://rkelly.rubyforg...
>>
>> The RKelly library will parse JavaScript and return a parse tree.
>
> You are a sick puppy - and I love you for it :)

This is what happens when you sit next to Ryan all day. ;-)

--
Aaron Patterson
http://tenderlovem...

Ryan Davis

6/9/2009 5:19:00 PM

0


On Jun 9, 2009, at 08:44 , Aaron Patterson wrote:

> On Wed, Jun 10, 2009 at 12:18:04AM +0900, Eleanor McHugh wrote:
>> On 8 Jun 2009, at 23:10, Aaron Patterson wrote:
>>> I have no idea how this happened, but I'm sure that someone pulling
>>> out a
>>> Beretta was involved. Anyway, here it is:
>>>
>>> rkelly version 1.0.1 has been released!
>>>
>>> * <http://rkelly.rubyforg...
>>>
>>> The RKelly library will parse JavaScript and return a parse tree.
>>
>> You are a sick puppy - and I love you for it :)
>
> This is what happens when you sit next to Ryan all day. ;-)

Pthththth

_I_ don't own a single pain of zubaz pants. I'm not even remotely the
cause of your sickness.


Tony Arcieri

6/9/2009 5:27:00 PM

0

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

On Mon, Jun 8, 2009 at 4:10 PM, Aaron Patterson
<aaron@tenderlovemaking.com>wrote:

> I have no idea how this happened, but I'm sure that someone pulling out a
> Beretta was involved. Anyway, here it is:
>
> rkelly version 1.0.1 has been released!
>
> * <http://rkelly.rubyforg...
>
> The RKelly library will parse JavaScript and return a parse tree.
>

Hey, this is an awesome library, but there's one thing I should point out
about your description on Rubyforge:

This library will parse Javascript and turn it into Ruby. The ruby generated
> should be functionally equivalent to the Javascript.
>

At the time I was looking for a JavaScript-to-JavaScript compiler to do some
code futzing. When I found RKelly, I was like "hey great, a Racc grammar
for JavaScript!" However I was too lazy to check the README and started
trying to pull the grammar/parser into my project first before discovering
that it was a fully fledged JavaScript-to-JavaScript compiler.

You might want to note that it also outputs JavaScript on the Rubyforge
description.

--
Tony Arcieri
medioh.com

Eleanor McHugh

6/9/2009 5:35:00 PM

0

On 9 Jun 2009, at 18:19, Ryan Davis wrote:
>
> On Jun 9, 2009, at 08:44 , Aaron Patterson wrote:
>
>> On Wed, Jun 10, 2009 at 12:18:04AM +0900, Eleanor McHugh wrote:
>>> On 8 Jun 2009, at 23:10, Aaron Patterson wrote:
>>>> I have no idea how this happened, but I'm sure that someone pulling
>>>> out a
>>>> Beretta was involved. Anyway, here it is:
>>>>
>>>> rkelly version 1.0.1 has been released!
>>>>
>>>> * <http://rkelly.rubyforg...
>>>>
>>>> The RKelly library will parse JavaScript and return a parse tree.
>>>
>>> You are a sick puppy - and I love you for it :)
>>
>> This is what happens when you sit next to Ryan all day. ;-)
>
> Pthththth
>
> _I_ don't own a single pain of zubaz pants. I'm not even remotely
> the cause of your sickness.

Hmmm... sitting next to the author of Wilson and RubyInline... all day
long? That's gotta have some kind of osmotic influence...


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-...
----
raise ArgumentError unless @reality.responds_to? :reason


Eric Hodel

6/9/2009 6:55:00 PM

0

On Jun 9, 2009, at 10:27, Tony Arcieri wrote:
>> The RKelly library will parse JavaScript and return a parse tree.
>
> Hey, this is an awesome library, but there's one thing I should
> point out
> about your description on Rubyforge:
>
>> This library will parse Javascript and turn it into Ruby. The ruby
>> generated
>> should be functionally equivalent to the Javascript.
>
> At the time I was looking for a JavaScript-to-JavaScript compiler to
> do some
> code futzing. When I found RKelly, I was like "hey great, a Racc
> grammar
> for JavaScript!" However I was too lazy to check the README and
> started
> trying to pull the grammar/parser into my project first before
> discovering
> that it was a fully fledged JavaScript-to-JavaScript compiler.
>
> You might want to note that it also outputs JavaScript on the
> Rubyforge
> description.

I think you missed the first line:

>> I have no idea how this happened, but I'm sure that someone pulling
>> out a
>> Beretta was involved.

Judging from this sentence, I bet Aaron wouldn't mind someone taking
over rkelly.

Tony Arcieri

6/9/2009 11:06:00 PM

0

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

On Tue, Jun 9, 2009 at 12:54 PM, Eric Hodel <drbrain@segment7.net> wrote:

> I think you missed the first line:
>
> I have no idea how this happened, but I'm sure that someone pulling out a
>>> Beretta was involved.
>>>
>>
> Judging from this sentence, I bet Aaron wouldn't mind someone taking over
> rkelly.
>

Heh, guess you're not an R Kelly fan...

I pull out my Beretta
He walks up to the closet
He comes up to the closet
Now he's at the closet
Now he's opening the closet

--
Tony Arcieri
medioh.com

Ryan Davis

6/9/2009 11:27:00 PM

0


On Jun 9, 2009, at 16:06 , Tony Arcieri wrote:

> On Tue, Jun 9, 2009 at 12:54 PM, Eric Hodel <drbrain@segment7.net>
> wrote:
>
>> I think you missed the first line:
>>
>> I have no idea how this happened, but I'm sure that someone pulling
>> out a
>>>> Beretta was involved.
>>>>
>>>
>> Judging from this sentence, I bet Aaron wouldn't mind someone
>> taking over
>> rkelly.
>>
>
> Heh, guess you're not an R Kelly fan...

We sit next to and code with aaron every day... Fan or not, we bet
Aaron would'nt mind someone taking over the project.


Eleanor McHugh

6/10/2009 12:04:00 AM

0

On 10 Jun 2009, at 00:06, Tony Arcieri wrote:
> On Tue, Jun 9, 2009 at 12:54 PM, Eric Hodel <drbrain@segment7.net>
> wrote:
>
>> I think you missed the first line:
>>
>> I have no idea how this happened, but I'm sure that someone pulling
>> out a
>>>> Beretta was involved.
>>>>
>>>
>> Judging from this sentence, I bet Aaron wouldn't mind someone
>> taking over
>> rkelly.
>>
>
> Heh, guess you're not an R Kelly fan...
>
> I pull out my Beretta
> He walks up to the closet
> He comes up to the closet
> Now he's at the closet
> Now he's opening the closet

And now that South Park episode finally makes sense...


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-...
----
raise ArgumentError unless @reality.responds_to? :reason


Tony Arcieri

6/10/2009 1:18:00 AM

0

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

On Tue, Jun 9, 2009 at 5:26 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:

> We sit next to and code with aaron every day... Fan or not, we bet Aaron
> would'nt mind someone taking over the project.
>

Well, through a roundabout manner I have come upon yet another of
tenderlove's projects, Johnson, which seems intended as an RKelly
replacement and is better suited for our needs anyway.

I forsee transitioning what I wrote with RKelly to Johnson shortly and begin
writing tests which actually execute the JavaScripts we're compiling.

--
Tony Arcieri
medioh.com