Enhanced Amber REPL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Enhanced Amber REPL

Markus Kahl
Hey,

I've enhanced the Amber REPL a little because I wanted to play around a bit (with access to node.js) and it was missing a couple of things I'm used to.
Dunno how commonly used the REPL is, but do you think it'd make sense to create a pull request?
This way perhaps other people could get a more useful REPL, too.
Are there any coding standards I'd need to pay attention to?
My Smalltalk style is quite possibly horrible.

A little picture demonstrating some of the new REPL features

Additionally to the features shown in the screenshot (mainly variables) I've also implemented Ctrl+L to clear the screen.

~ Markus


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Manfred Kröhnert

Hello Markus,

don't hesitate to open a pull-request.
If there is something which needs some tweaking we will discuss it there.
It is also great if you write a short summary of the changes there so we don't have to go through the commits to extract that information :-)

And for the coding style there is a wiki page mentioning the most important things.

Regarding ':q to quit'.
Didn't the REPL already understand the 'quit' message?

Best regards,
Manfred

Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
Hey,

I've enhanced the Amber REPL a little because I wanted to play around a bit (with access to node.js) and it was missing a couple of things I'm used to.
Dunno how commonly used the REPL is, but do you think it'd make sense to create a pull request?
This way perhaps other people could get a more useful REPL, too.
Are there any coding standards I'd need to pay attention to?
My Smalltalk style is quite possibly horrible.

A little picture demonstrating some of the new REPL features

Additionally to the features shown in the screenshot (mainly variables) I've also implemented Ctrl+L to clear the screen.

~ Markus


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Markus Kahl
Hey,

alright thanks, I've just created one.
The repl didn't understand 'quit' as far as I know. Also no sign of anything like it in the code.

~ Markus

Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:

Hello Markus,

don't hesitate to open a pull-request.
If there is something which needs some tweaking we will discuss it there.
It is also great if you write a short summary of the changes there so we don't have to go through the commits to extract that information :-)

And for the coding style there is a wiki page mentioning the most important things.

Regarding ':q to quit'.
Didn't the REPL already understand the 'quit' message?

Best regards,
Manfred

Am 23.06.2013 20:45 schrieb "Markus Kahl" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="yks5OsVu6eUJ">mach...@...>:
Hey,

I've enhanced the Amber REPL a little because I wanted to play around a bit (with access to node.js) and it was missing a couple of things I'm used to.
Dunno how commonly used the REPL is, but do you think it'd make sense to create a pull request?
This way perhaps other people could get a more useful REPL, too.
Are there any coding standards I'd need to pay attention to?
My Smalltalk style is quite possibly horrible.

A little picture demonstrating some of the new REPL features

Additionally to the features shown in the screenshot (mainly variables) I've also implemented Ctrl+L to clear the screen.

~ Markus


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="yks5OsVu6eUJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Nicolas Petton
That's really cool!

About coding conventions, please read this page https://github.com/amber-smalltalk/amber/wiki/Coding-conventions
I can be quite annoying with this, but I think it is important to try stick to it as much as possible :)

Keep up the great work!
Nico

On Jun 24, 2013, at 12:01 PM, Markus Kahl <[hidden email]> wrote:

Hey,

alright thanks, I've just created one.
The repl didn't understand 'quit' as far as I know. Also no sign of anything like it in the code.

~ Markus

Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:

Hello Markus,

don't hesitate to open a pull-request.
If there is something which needs some tweaking we will discuss it there.
It is also great if you write a short summary of the changes there so we don't have to go through the commits to extract that information :-)

And for the coding style there is a wiki page mentioning the most important things.

Regarding ':q to quit'.
Didn't the REPL already understand the 'quit' message?

Best regards,
Manfred

Am 23.06.2013 20:45 schrieb "Markus Kahl" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="yks5OsVu6eUJ">mach...@...>:
Hey,

I've enhanced the Amber REPL a little because I wanted to play around a bit (with access to node.js) and it was missing a couple of things I'm used to.
Dunno how commonly used the REPL is, but do you think it'd make sense to create a pull request?
This way perhaps other people could get a more useful REPL, too.
Are there any coding standards I'd need to pay attention to?
My Smalltalk style is quite possibly horrible.

A little picture demonstrating some of the new REPL features

Additionally to the features shown in the screenshot (mainly variables) I've also implemented Ctrl+L to clear the screen.

~ Markus



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="yks5OsVu6eUJ">amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Manfred Kröhnert
In reply to this post by Markus Kahl
Hi Markus,

On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]> wrote:
Hey,

alright thanks, I've just created one.

Great!
 
The repl didn't understand 'quit' as far as I know. Also no sign of anything like it in the code.

Okay, then I just remembered incorrectly.
 
~ Markus

Keep going :-)
Manfred

 
Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:

Hello Markus,

don't hesitate to open a pull-request.
If there is something which needs some tweaking we will discuss it there.
It is also great if you write a short summary of the changes there so we don't have to go through the commits to extract that information :-)

And for the coding style there is a wiki page mentioning the most important things.

Regarding ':q to quit'.
Didn't the REPL already understand the 'quit' message?

Best regards,
Manfred

Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
Hey,

I've enhanced the Amber REPL a little because I wanted to play around a bit (with access to node.js) and it was missing a couple of things I'm used to.
Dunno how commonly used the REPL is, but do you think it'd make sense to create a pull request?
This way perhaps other people could get a more useful REPL, too.
Are there any coding standards I'd need to pay attention to?
My Smalltalk style is quite possibly horrible.

A little picture demonstrating some of the new REPL features

Additionally to the features shown in the screenshot (mainly variables) I've also implemented Ctrl+L to clear the screen.

~ Markus


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Hannes Hirzel
Hello Markus

With the current amber the q command in the REPL does not work properly.

I start the REPL loop in MSWindows with

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
Type :q to exit.

amber >> 1 + 1
res1: Number = 2

amber >> q
a block (in nil)
Repl >> processLine:
Repl >> assignNewVariable:do:
Repl >> parseAssignment:do:
BlockClosure >> value:value:
a block (in BlockClosure >> value:value:)
Repl >> eval:on:
Repl >> try:catch:
BlockClosure >> value
a block (in BlockClosure >> value)
Compiler >> evaluateExpression:on:
Compiler >> compileExpression:on:
Compiler >> compileNode:
InliningCodeGenerator >> compileNode:
SemanticAnalyzer >> visit:
MethodNode >> accept:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
SemanticAnalyzer >> visit:
SequenceNode >> accept:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
 .......

Regards
Hannes

On 6/24/13, Manfred Kröhnert <[hidden email]> wrote:

> Hi Markus,
>
> On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]> wrote:
>
>> Hey,
>>
>> alright thanks, I've just created one.
>>
>
> Great!
>
>
>> The repl didn't understand 'quit' as far as I know. Also no sign of
>> anything like it in the code.
>>
>
> Okay, then I just remembered incorrectly.
>
>
>> ~ Markus
>>
>
> Keep going :-)
> Manfred
>
>
>
>> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>>
>>> Hello Markus,
>>>
>>> don't hesitate to open a pull-request.
>>> If there is something which needs some tweaking we will discuss it
>>> there.
>>> It is also great if you write a short summary of the changes there so we
>>> don't have to go through the commits to extract that information :-)
>>>
>>> And for the coding style there is a wiki page mentioning the most
>>> important things.
>>>
>>> Regarding ':q to quit'.
>>> Didn't the REPL already understand the 'quit' message?
>>>
>>> Best regards,
>>> Manfred
>>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>>
>>>> Hey,
>>>>
>>>> I've enhanced the Amber REPL a little because I wanted to play around a
>>>> bit (with access to node.js) and it was missing a couple of things I'm
>>>> used
>>>> to.
>>>> Dunno how commonly used the REPL is, but do you think it'd make sense
>>>> to
>>>> create a pull request?
>>>> This way perhaps other people could get a more useful REPL, too.
>>>> Are there any coding standards I'd need to pay attention to?
>>>> My Smalltalk style is quite possibly horrible.
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>>
>>>> A little picture demonstrating some of the new REPL features
>>>>
>>>> Additionally to the features shown in the screenshot (mainly variables)
>>>> I've also implemented Ctrl+L to clear the screen.
>>>>
>>>> ~ Markus
>>>>
>>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Tom Rake
Hello Hanes,

The REPL quit command is  ':q' which works on my Window machine based on the current master. Typing just q results in a Amber trace for the undefined symbol q.



On Saturday, September 7, 2013 1:51:05 AM UTC-4, Hannes wrote:
Hello Markus

With the current amber the q command in the REPL does not work properly.

I start the REPL loop in MSWindows with

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
Type :q to exit.

amber >> 1 + 1
res1: Number = 2

amber >> q
a block (in nil)
Repl >> processLine:
Repl >> assignNewVariable:do:
Repl >> parseAssignment:do:
BlockClosure >> value:value:
a block (in BlockClosure >> value:value:)
Repl >> eval:on:
Repl >> try:catch:
BlockClosure >> value
a block (in BlockClosure >> value)
Compiler >> evaluateExpression:on:
Compiler >> compileExpression:on:
Compiler >> compileNode:
InliningCodeGenerator >> compileNode:
SemanticAnalyzer >> visit:
MethodNode >> accept:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
SemanticAnalyzer >> visit:
SequenceNode >> accept:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
 .......

Regards
Hannes

On 6/24/13, Manfred Kröhnert <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="heyylqP-XB8J">mkroeh...@...> wrote:

> Hi Markus,
>
> On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="heyylqP-XB8J">mach...@...> wrote:
>
>> Hey,
>>
>> alright thanks, I've just created one.
>>
>
> Great!
>
>
>> The repl didn't understand 'quit' as far as I know. Also no sign of
>> anything like it in the code.
>>
>
> Okay, then I just remembered incorrectly.
>
>
>> ~ Markus
>>
>
> Keep going :-)
> Manfred
>
>
>
>> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>>
>>> Hello Markus,
>>>
>>> don't hesitate to open a pull-request.
>>> If there is something which needs some tweaking we will discuss it
>>> there.
>>> It is also great if you write a short summary of the changes there so we
>>> don't have to go through the commits to extract that information :-)
>>>
>>> And for the coding style there is a wiki page mentioning the most
>>> important things.
>>>
>>> Regarding ':q to quit'.
>>> Didn't the REPL already understand the 'quit' message?
>>>
>>> Best regards,
>>> Manfred
>>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>>
>>>> Hey,
>>>>
>>>> I've enhanced the Amber REPL a little because I wanted to play around a
>>>> bit (with access to node.js) and it was missing a couple of things I'm
>>>> used
>>>> to.
>>>> Dunno how commonly used the REPL is, but do you think it'd make sense
>>>> to
>>>> create a pull request?
>>>> This way perhaps other people could get a more useful REPL, too.
>>>> Are there any coding standards I'd need to pay attention to?
>>>> My Smalltalk style is quite possibly horrible.
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>>
>>>> A little picture demonstrating some of the new REPL features
>>>>
>>>> Additionally to the features shown in the screenshot (mainly variables)
>>>> I've also implemented Ctrl+L to clear the screen.
>>>>
>>>> ~ Markus
>>>>
>>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="heyylqP-XB8J">amber-lang+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Markus Kahl
Exatly what Thomas said. Perhaps we should have an appropriate error message (var not found or similar) instead of the trace when you just type q, though.

Am Sonntag, 8. September 2013 01:54:15 UTC+1 schrieb Thomas Rake:
Hello Hanes,

The REPL quit command is  ':q' which works on my Window machine based on the current master. Typing just q results in a Amber trace for the undefined symbol q.



On Saturday, September 7, 2013 1:51:05 AM UTC-4, Hannes wrote:
Hello Markus

With the current amber the q command in the REPL does not work properly.

I start the REPL loop in MSWindows with

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl

C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
Type :q to exit.

amber >> 1 + 1
res1: Number = 2

amber >> q
a block (in nil)
Repl >> processLine:
Repl >> assignNewVariable:do:
Repl >> parseAssignment:do:
BlockClosure >> value:value:
a block (in BlockClosure >> value:value:)
Repl >> eval:on:
Repl >> try:catch:
BlockClosure >> value
a block (in BlockClosure >> value)
Compiler >> evaluateExpression:on:
Compiler >> compileExpression:on:
Compiler >> compileNode:
InliningCodeGenerator >> compileNode:
SemanticAnalyzer >> visit:
MethodNode >> accept:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitMethodNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
SemanticAnalyzer >> visit:
SequenceNode >> accept:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitSequenceNode:
SemanticAnalyzer >> visitNode:
SemanticAnalyzer >> visitAll:
Array >> collect:
BlockClosure >> value:
a block (in BlockClosure >> value:)
 .......

Regards
Hannes

On 6/24/13, Manfred Kröhnert <[hidden email]> wrote:

> Hi Markus,
>
> On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]> wrote:
>
>> Hey,
>>
>> alright thanks, I've just created one.
>>
>
> Great!
>
>
>> The repl didn't understand 'quit' as far as I know. Also no sign of
>> anything like it in the code.
>>
>
> Okay, then I just remembered incorrectly.
>
>
>> ~ Markus
>>
>
> Keep going :-)
> Manfred
>
>
>
>> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>>
>>> Hello Markus,
>>>
>>> don't hesitate to open a pull-request.
>>> If there is something which needs some tweaking we will discuss it
>>> there.
>>> It is also great if you write a short summary of the changes there so we
>>> don't have to go through the commits to extract that information :-)
>>>
>>> And for the coding style there is a wiki page mentioning the most
>>> important things.
>>>
>>> Regarding ':q to quit'.
>>> Didn't the REPL already understand the 'quit' message?
>>>
>>> Best regards,
>>> Manfred
>>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>>
>>>> Hey,
>>>>
>>>> I've enhanced the Amber REPL a little because I wanted to play around a
>>>> bit (with access to node.js) and it was missing a couple of things I'm
>>>> used
>>>> to.
>>>> Dunno how commonly used the REPL is, but do you think it'd make sense
>>>> to
>>>> create a pull request?
>>>> This way perhaps other people could get a more useful REPL, too.
>>>> Are there any coding standards I'd need to pay attention to?
>>>> My Smalltalk style is quite possibly horrible.
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>>
>>>> A little picture demonstrating some of the new REPL features
>>>>
>>>> Additionally to the features shown in the screenshot (mainly variables)
>>>> I've also implemented Ctrl+L to clear the screen.
>>>>
>>>> ~ Markus
>>>>
>>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to amber-lang+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Hannes Hirzel
Yes, something like 'var not found' or 'q is undefined'. For any
undefined variable there are these trace messages.

And: How do I load and execute a script?

--Hannes

On 9/8/13, Markus Kahl <[hidden email]> wrote:

> Exatly what Thomas said. Perhaps we should have an appropriate error
> message (var not found or similar) instead of the trace when you just type
> q, though.
>
> Am Sonntag, 8. September 2013 01:54:15 UTC+1 schrieb Thomas Rake:
>>
>> Hello Hanes,
>>
>> The REPL quit command is  ':q' which works on my Window machine based on
>> the current master. Typing just q results in a Amber trace for the
>> undefined symbol q.
>>
>>
>>
>> On Saturday, September 7, 2013 1:51:05 AM UTC-4, Hannes wrote:
>>>
>>> Hello Markus
>>>
>>> With the current amber the q command in the REPL does not work properly.
>>>
>>>
>>> I start the REPL loop in MSWindows with
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>> Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
>>> Type :q to exit.
>>>
>>> amber >> 1 + 1
>>> res1: Number = 2
>>>
>>> amber >> q
>>> a block (in nil)
>>> Repl >> processLine:
>>> Repl >> assignNewVariable:do:
>>> Repl >> parseAssignment:do:
>>> BlockClosure >> value:value:
>>> a block (in BlockClosure >> value:value:)
>>> Repl >> eval:on:
>>> Repl >> try:catch:
>>> BlockClosure >> value
>>> a block (in BlockClosure >> value)
>>> Compiler >> evaluateExpression:on:
>>> Compiler >> compileExpression:on:
>>> Compiler >> compileNode:
>>> InliningCodeGenerator >> compileNode:
>>> SemanticAnalyzer >> visit:
>>> MethodNode >> accept:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>> SemanticAnalyzer >> visit:
>>> SequenceNode >> accept:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>>  .......
>>>
>>> Regards
>>> Hannes
>>>
>>> On 6/24/13, Manfred Kröhnert <[hidden email]> wrote:
>>> > Hi Markus,
>>> >
>>> > On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]>
>>> wrote:
>>> >
>>> >> Hey,
>>> >>
>>> >> alright thanks, I've just created one.
>>> >>
>>> >
>>> > Great!
>>> >
>>> >
>>> >> The repl didn't understand 'quit' as far as I know. Also no sign of
>>> >> anything like it in the code.
>>> >>
>>> >
>>> > Okay, then I just remembered incorrectly.
>>> >
>>> >
>>> >> ~ Markus
>>> >>
>>> >
>>> > Keep going :-)
>>> > Manfred
>>> >
>>> >
>>> >
>>> >> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>> >>>
>>> >>> Hello Markus,
>>> >>>
>>> >>> don't hesitate to open a pull-request.
>>> >>> If there is something which needs some tweaking we will discuss it
>>> >>> there.
>>> >>> It is also great if you write a short summary of the changes there so
>>> >>>
>>> we
>>> >>> don't have to go through the commits to extract that information :-)
>>> >>>
>>> >>>
>>> >>> And for the coding style there is a wiki page mentioning the most
>>> >>> important things.
>>> >>>
>>> >>> Regarding ':q to quit'.
>>> >>> Didn't the REPL already understand the 'quit' message?
>>> >>>
>>> >>> Best regards,
>>> >>> Manfred
>>> >>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>> >>>
>>> >>>> Hey,
>>> >>>>
>>> >>>> I've enhanced the Amber REPL a little because I wanted to play
>>> around a
>>> >>>> bit (with access to node.js) and it was missing a couple of things
>>> I'm
>>> >>>> used
>>> >>>> to.
>>> >>>> Dunno how commonly used the REPL is, but do you think it'd make
>>> sense
>>> >>>> to
>>> >>>> create a pull request?
>>> >>>> This way perhaps other people could get a more useful REPL, too.
>>> >>>> Are there any coding standards I'd need to pay attention to?
>>> >>>> My Smalltalk style is quite possibly horrible.
>>> >>>>
>>> >>>>
>>> >>>> <
>>> https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>
>>>
>>> >>>>
>>> >>>> A little picture demonstrating some of the new REPL features
>>> >>>>
>>> >>>> Additionally to the features shown in the screenshot (mainly
>>> variables)
>>> >>>> I've also implemented Ctrl+L to clear the screen.
>>> >>>>
>>> >>>> ~ Markus
>>> >>>>
>>> >>>>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "amber-lang" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> >
>>> an
>>> > email to [hidden email].
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>> >
>>> >
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Manfred Kröhnert
Yes, printing an error message instead of showing a stacktrace sounds like a good addition.

As of now it is not possible to load and execute external scripts.
However, it should not be too hard to support this since one would have to do the same steps amberc does without writing the file back out again.
But Writing Packages to disk sounds like a nice addition, too.

Best,
Manfred






On Mon, Sep 9, 2013 at 6:14 AM, H. Hirzel <[hidden email]> wrote:
Yes, something like 'var not found' or 'q is undefined'. For any
undefined variable there are these trace messages.

And: How do I load and execute a script?

--Hannes

On 9/8/13, Markus Kahl <[hidden email]> wrote:
> Exatly what Thomas said. Perhaps we should have an appropriate error
> message (var not found or similar) instead of the trace when you just type
> q, though.
>
> Am Sonntag, 8. September 2013 01:54:15 UTC+1 schrieb Thomas Rake:
>>
>> Hello Hanes,
>>
>> The REPL quit command is  ':q' which works on my Window machine based on
>> the current master. Typing just q results in a Amber trace for the
>> undefined symbol q.
>>
>>
>>
>> On Saturday, September 7, 2013 1:51:05 AM UTC-4, Hannes wrote:
>>>
>>> Hello Markus
>>>
>>> With the current amber the q command in the REPL does not work properly.
>>>
>>>
>>> I start the REPL loop in MSWindows with
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>> Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
>>> Type :q to exit.
>>>
>>> amber >> 1 + 1
>>> res1: Number = 2
>>>
>>> amber >> q
>>> a block (in nil)
>>> Repl >> processLine:
>>> Repl >> assignNewVariable:do:
>>> Repl >> parseAssignment:do:
>>> BlockClosure >> value:value:
>>> a block (in BlockClosure >> value:value:)
>>> Repl >> eval:on:
>>> Repl >> try:catch:
>>> BlockClosure >> value
>>> a block (in BlockClosure >> value)
>>> Compiler >> evaluateExpression:on:
>>> Compiler >> compileExpression:on:
>>> Compiler >> compileNode:
>>> InliningCodeGenerator >> compileNode:
>>> SemanticAnalyzer >> visit:
>>> MethodNode >> accept:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>> SemanticAnalyzer >> visit:
>>> SequenceNode >> accept:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>>  .......
>>>
>>> Regards
>>> Hannes
>>>
>>> On 6/24/13, Manfred Kröhnert <[hidden email]> wrote:
>>> > Hi Markus,
>>> >
>>> > On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]>
>>> wrote:
>>> >
>>> >> Hey,
>>> >>
>>> >> alright thanks, I've just created one.
>>> >>
>>> >
>>> > Great!
>>> >
>>> >
>>> >> The repl didn't understand 'quit' as far as I know. Also no sign of
>>> >> anything like it in the code.
>>> >>
>>> >
>>> > Okay, then I just remembered incorrectly.
>>> >
>>> >
>>> >> ~ Markus
>>> >>
>>> >
>>> > Keep going :-)
>>> > Manfred
>>> >
>>> >
>>> >
>>> >> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>> >>>
>>> >>> Hello Markus,
>>> >>>
>>> >>> don't hesitate to open a pull-request.
>>> >>> If there is something which needs some tweaking we will discuss it
>>> >>> there.
>>> >>> It is also great if you write a short summary of the changes there so
>>> >>>
>>> we
>>> >>> don't have to go through the commits to extract that information :-)
>>> >>>
>>> >>>
>>> >>> And for the coding style there is a wiki page mentioning the most
>>> >>> important things.
>>> >>>
>>> >>> Regarding ':q to quit'.
>>> >>> Didn't the REPL already understand the 'quit' message?
>>> >>>
>>> >>> Best regards,
>>> >>> Manfred
>>> >>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>> >>>
>>> >>>> Hey,
>>> >>>>
>>> >>>> I've enhanced the Amber REPL a little because I wanted to play
>>> around a
>>> >>>> bit (with access to node.js) and it was missing a couple of things
>>> I'm
>>> >>>> used
>>> >>>> to.
>>> >>>> Dunno how commonly used the REPL is, but do you think it'd make
>>> sense
>>> >>>> to
>>> >>>> create a pull request?
>>> >>>> This way perhaps other people could get a more useful REPL, too.
>>> >>>> Are there any coding standards I'd need to pay attention to?
>>> >>>> My Smalltalk style is quite possibly horrible.
>>> >>>>
>>> >>>>
>>> >>>> <
>>> https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>
>>>
>>> >>>>
>>> >>>> A little picture demonstrating some of the new REPL features
>>> >>>>
>>> >>>> Additionally to the features shown in the screenshot (mainly
>>> variables)
>>> >>>> I've also implemented Ctrl+L to clear the screen.
>>> >>>>
>>> >>>> ~ Markus
>>> >>>>
>>> >>>>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "amber-lang" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> >
>>> an
>>> > email to [hidden email].
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>> >
>>> >
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Enhanced Amber REPL

Manfred Kröhnert


On Mon, Sep 9, 2013 at 7:21 PM, Manfred Kröhnert <[hidden email]> wrote:
Yes, printing an error message instead of showing a stacktrace sounds like a good addition.

As of now it is not possible to load and execute external scripts.
However, it should not be too hard to support this since one would have to do the same steps amberc does without writing the file back out again.
But Writing Packages to disk sounds like a nice addition, too.

Best,
Manfred






On Mon, Sep 9, 2013 at 6:14 AM, H. Hirzel <[hidden email]> wrote:
Yes, something like 'var not found' or 'q is undefined'. For any
undefined variable there are these trace messages.

And: How do I load and execute a script?

--Hannes

On 9/8/13, Markus Kahl <[hidden email]> wrote:
> Exatly what Thomas said. Perhaps we should have an appropriate error
> message (var not found or similar) instead of the trace when you just type
> q, though.
>
> Am Sonntag, 8. September 2013 01:54:15 UTC+1 schrieb Thomas Rake:
>>
>> Hello Hanes,
>>
>> The REPL quit command is  ':q' which works on my Window machine based on
>> the current master. Typing just q results in a Amber trace for the
>> undefined symbol q.
>>
>>
>>
>> On Saturday, September 7, 2013 1:51:05 AM UTC-4, Hannes wrote:
>>>
>>> Hello Markus
>>>
>>> With the current amber the q command in the REPL does not work properly.
>>>
>>>
>>> I start the REPL loop in MSWindows with
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>>
>>> C:\Users\User\Documents\projects>vendor\amber\bin\amber repl
>>> Welcome to Amber version 0.12.0-pre (NodeJS 0.10.17).
>>> Type :q to exit.
>>>
>>> amber >> 1 + 1
>>> res1: Number = 2
>>>
>>> amber >> q
>>> a block (in nil)
>>> Repl >> processLine:
>>> Repl >> assignNewVariable:do:
>>> Repl >> parseAssignment:do:
>>> BlockClosure >> value:value:
>>> a block (in BlockClosure >> value:value:)
>>> Repl >> eval:on:
>>> Repl >> try:catch:
>>> BlockClosure >> value
>>> a block (in BlockClosure >> value)
>>> Compiler >> evaluateExpression:on:
>>> Compiler >> compileExpression:on:
>>> Compiler >> compileNode:
>>> InliningCodeGenerator >> compileNode:
>>> SemanticAnalyzer >> visit:
>>> MethodNode >> accept:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitMethodNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>> SemanticAnalyzer >> visit:
>>> SequenceNode >> accept:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitSequenceNode:
>>> SemanticAnalyzer >> visitNode:
>>> SemanticAnalyzer >> visitAll:
>>> Array >> collect:
>>> BlockClosure >> value:
>>> a block (in BlockClosure >> value:)
>>>  .......
>>>
>>> Regards
>>> Hannes
>>>
>>> On 6/24/13, Manfred Kröhnert <[hidden email]> wrote:
>>> > Hi Markus,
>>> >
>>> > On Mon, Jun 24, 2013 at 12:01 PM, Markus Kahl <[hidden email]>
>>> wrote:
>>> >
>>> >> Hey,
>>> >>
>>> >> alright thanks, I've just created one.
>>> >>
>>> >
>>> > Great!
>>> >
>>> >
>>> >> The repl didn't understand 'quit' as far as I know. Also no sign of
>>> >> anything like it in the code.
>>> >>
>>> >
>>> > Okay, then I just remembered incorrectly.
>>> >
>>> >
>>> >> ~ Markus
>>> >>
>>> >
>>> > Keep going :-)
>>> > Manfred
>>> >
>>> >
>>> >
>>> >> Am Montag, 24. Juni 2013 09:27:39 UTC+1 schrieb Manfred Kröhnert:
>>> >>>
>>> >>> Hello Markus,
>>> >>>
>>> >>> don't hesitate to open a pull-request.
>>> >>> If there is something which needs some tweaking we will discuss it
>>> >>> there.
>>> >>> It is also great if you write a short summary of the changes there so
>>> >>>
>>> we
>>> >>> don't have to go through the commits to extract that information :-)
>>> >>>
>>> >>>
>>> >>> And for the coding style there is a wiki page mentioning the most
>>> >>> important things.
>>> >>>
>>> >>> Regarding ':q to quit'.
>>> >>> Didn't the REPL already understand the 'quit' message?
>>> >>>
>>> >>> Best regards,
>>> >>> Manfred
>>> >>> Am 23.06.2013 20:45 schrieb "Markus Kahl" <[hidden email]>:
>>> >>>
>>> >>>> Hey,
>>> >>>>
>>> >>>> I've enhanced the Amber REPL a little because I wanted to play
>>> around a
>>> >>>> bit (with access to node.js) and it was missing a couple of things
>>> I'm
>>> >>>> used
>>> >>>> to.
>>> >>>> Dunno how commonly used the REPL is, but do you think it'd make
>>> sense
>>> >>>> to
>>> >>>> create a pull request?
>>> >>>> This way perhaps other people could get a more useful REPL, too.
>>> >>>> Are there any coding standards I'd need to pay attention to?
>>> >>>> My Smalltalk style is quite possibly horrible.
>>> >>>>
>>> >>>>
>>> >>>> <
>>> https://lh3.googleusercontent.com/-lZCW70DDb4I/UcdBSVbifVI/AAAAAAAAAFA/gNgFWmL8c44/s1600/amber-repl.png>
>>>
>>>
>>> >>>>
>>> >>>> A little picture demonstrating some of the new REPL features
>>> >>>>
>>> >>>> Additionally to the features shown in the screenshot (mainly
>>> variables)
>>> >>>> I've also implemented Ctrl+L to clear the screen.
>>> >>>>
>>> >>>> ~ Markus
>>> >>>>
>>> >>>>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups
>>> > "amber-lang" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> >
>>> an
>>> > email to [hidden email].
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>> >
>>> >
>>> >
>>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Reading JSON

SebastianHC
In reply to this post by Markus Kahl
Hi!

I have one problem here.

I want to map Json to my data model.
Unfortunately one of the fields in JSON can either by a single object,
or an array of objects.
Is there a way to find out if a JSProxyObject is a collection, array or
single object?

Unfortunately JSProxyObject does not understand asArray....

How do you mapp JSON to your Amber data model?

I tried this with the most recent Amber sources from GitHub master branch.

Thanks!
Sebastian

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

Herby Vojčík
What's the problem with `JSON parse:` and using the result directly.

An array is always a JS Array instance, that is, Amber Array instance. No need to take care of JSObjectProxy.

Herby

Sebastian Heidbrink wrote:

> Hi!
>
> I have one problem here.
>
> I want to map Json to my data model.
> Unfortunately one of the fields in JSON can either by a single object,
> or an array of objects.
> Is there a way to find out if a JSProxyObject is a collection, array
> or single object?
>
> Unfortunately JSProxyObject does not understand asArray....
>
> How do you mapp JSON to your Amber data model?
>
> I tried this with the most recent Amber sources from GitHub master
> branch.
>
> Thanks!
> Sebastian
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

SebastianHC
Hi Herby,

you are right that is the case if a certain field or property within the
JSON is defined as array or object.
But the JSON I got states that a certain property can be a single object
or an array.
So if I want to handle this in my data model as an array in general then
I am in trouble right now.
I need to take the parsed JSON and the specific property and transform
the contents into my smalltalk objects.

like

jsonPropertyArrayOrObject do: [:each | myAmberSmalltalkArray add:
(myDataModelClass from: each)].

An object does not understand "do:" and a jsonPropertyArrayOrObject does
not understand "isArray" since it can alos be a JSObjectProxy...

Does this make sense?

Sebastian

Am 03.10.2013 05:31, schrieb Herby Vojčík:

> What's the problem with `JSON parse:` and using the result directly.
>
> An array is always a JS Array instance, that is, Amber Array instance.
> No need to take care of JSObjectProxy.
>
> Herby
>
> Sebastian Heidbrink wrote:
>> Hi!
>>
>> I have one problem here.
>>
>> I want to map Json to my data model.
>> Unfortunately one of the fields in JSON can either by a single
>> object, or an array of objects.
>> Is there a way to find out if a JSProxyObject is a collection, array
>> or single object?
>>
>> Unfortunately JSProxyObject does not understand asArray....
>>
>> How do you mapp JSON to your Amber data model?
>>
>> I tried this with the most recent Amber sources from GitHub master
>> branch.
>>
>> Thanks!
>> Sebastian
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

Herby Vojčík


Sebastian Heidbrink wrote:

> Hi Herby,
>
> you are right that is the case if a certain field or property within
> the JSON is defined as array or object.
> But the JSON I got states that a certain property can be a single
> object or an array.
> So if I want to handle this in my data model as an array in general
> then I am in trouble right now.
> I need to take the parsed JSON and the specific property and transform
> the contents into my smalltalk objects.
>
> like
>
> jsonPropertyArrayOrObject do: [:each | myAmberSmalltalkArray add:
> (myDataModelClass from: each)].
>
> An object does not understand "do:" and a jsonPropertyArrayOrObject
> does not understand "isArray" since it can alos be a JSObjectProxy...
>
> Does this make sense?

I see. Well, yes, there is nothing like `isProxy` or `asObject` (`yourself` could play the role of asObject, it already kind-of does it for JS primitives; but for proxy, this is all much more complicated - for example `copy` could crea
te Amber-usable copy of a wrapped object, but again, adding more API to JSObjectProxy may backfire when original object has such method as well).

> Sebastian

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

SebastianHC
Herby,

and there is no other way to parse Json right now? I mean something like
NeoJSON or STON?

Some Parser where I could define that this property must result in an Array?

Sebastian

Am 03.10.2013 07:21, schrieb Herby Vojčík:

>
>
> Sebastian Heidbrink wrote:
>> Hi Herby,
>>
>> you are right that is the case if a certain field or property within
>> the JSON is defined as array or object.
>> But the JSON I got states that a certain property can be a single
>> object or an array.
>> So if I want to handle this in my data model as an array in general
>> then I am in trouble right now.
>> I need to take the parsed JSON and the specific property and
>> transform the contents into my smalltalk objects.
>>
>> like
>>
>> jsonPropertyArrayOrObject do: [:each | myAmberSmalltalkArray add:
>> (myDataModelClass from: each)].
>>
>> An object does not understand "do:" and a jsonPropertyArrayOrObject
>> does not understand "isArray" since it can alos be a JSObjectProxy...
>>
>> Does this make sense?
>
> I see. Well, yes, there is nothing like `isProxy` or `asObject`
> (`yourself` could play the role of asObject, it already kind-of does
> it for JS primitives; but for proxy, this is all much more complicated
> - for example `copy` could crea
> te Amber-usable copy of a wrapped object, but again, adding more API
> to JSObjectProxy may backfire when original object has such method as
> well).
>
>> Sebastian
>
> Herby
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

Herby Vojčík


Sebastian Heidbrink wrote:
> Herby,
>
> and there is no other way to parse Json right now? I mean something like
> NeoJSON or STON?
>
> Some Parser where I could define that this property must result in an
> Array?

It is silly to want other parser in a platform where JSON.parse is
built-in, so I would say there is none and there will be none.

Add your own asObject/deproxy/whatever as extension method to Object and
JSObjectProxy, you're in Smalltalk after all.

> Sebastian

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

Herby Vojčík
> Add your own asObject/deproxy/whatever as extension method to Object
> and JSObjectProxy, you're in Smalltalk after all.

Or 'isArray ^false' when we're at it :-)

>> Sebastian
>
> Herby
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Reading JSON

SebastianHC
Thank you Herby!

Well, I am on your side.
I will solve try to solve this problem temporarily this way, but maybe I
can even ask for a general change of this delivered JSON.

This reminds me of a MayBe that I once needed to implement as a sub
class of boolean.
I had a typed data source and they managed to define a boolean that
could be "empty".... now represent that in Smalltalk "yes", "no", ???
"maybe" :-D

Well at least I didn't oversea anything in Amber regarding my
JsProxyObject kind of problem.

Sebastian


Am 03.10.2013 07:33, schrieb Herby Vojčík:

>> Add your own asObject/deproxy/whatever as extension method to Object
>> and JSObjectProxy, you're in Smalltalk after all.
>
> Or 'isArray ^false' when we're at it :-)
>
>>> Sebastian
>>
>> Herby
>>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.