Stepping code in the frontend

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

Stepping code in the frontend

sebastianconcept
Hi there,

anyone can explain the general idea of how the stepper debugger works? how it can step Amber code?

What I'm trying to understand is if I can use that same Amber feature to make something that is not the debugger but it needs to "wait" until it can continue executing code and returning the corresponding object.

It doesn't seem to be using generators and yield and it still creates the "wait" experience until you proceed or step over a message send.

Given that javascript doesn't have semaphores, how it can even do that?

And congratulations in advance in having achieved that level of awesome


--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Stepping code in the frontend

Herby Vojčík
Nico can give you details, but more or less, there's an interpreter - so once you begin stepping, you are not in fact running the compiled code, but interpreter tries to simulate it.

Sebastian Sastre wrote:

> Hi there,
>
> anyone can explain the general idea of how the stepper debugger works?
> how it can /step/ Amber code?
>
> What I'm trying to understand is if I can use that same Amber feature
> to make something that is not the debugger but it needs to "wait"
> until it can continue executing code and returning the corresponding
> object.
>
> It doesn't seem to be using generators and yield and it still creates
> the "wait" experience until you proceed or step over a message send.
>
> Given that javascript doesn't have semaphores, how it can even do that?
>
> And congratulations in advance in having achieved that level of awesome
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this gr
oup and stop receiving emails from it, send
> an email to [hidden email]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Stepping code in the frontend

sebastianconcept
right.

Sounds great.

Can you say if the stepping feature could be used programatically? there is any reason that would prevent that?




On Monday, August 11, 2014 6:01:40 PM UTC-3, Herby wrote:
Nico can give you details, but more or less, there's an interpreter - so once you begin stepping, you are not in fact running the compiled code, but interpreter tries to simulate it.

Sebastian Sastre wrote:

> Hi there,
>
> anyone can explain the general idea of how the stepper debugger works?
> how it can /step/ Amber code?
>
> What I'm trying to understand is if I can use that same Amber feature
> to make something that is not the debugger but it needs to "wait"
> until it can continue executing code and returning the corresponding
> object.
>
> It doesn't seem to be using generators and yield and it still creates
> the "wait" experience until you proceed or step over a message send.
>
> Given that javascript doesn't have semaphores, how it can even do that?
>
> And congratulations in advance in having achieved that level of awesome
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this gr
oup and stop receiving emails from it, send
> an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="m6uRa6dUbf8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+...@googlegroups.com
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="m6uRa6dUbf8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">amber-lang+unsubscribe@...>.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Stepping code in the frontend

Herby Vojčík
You need sources (it steps AST tree), and of course the compiler (so no amber/deploy), but afaict debugger is just a client of stepping mechanism which is in ASTInterpreter and you can use it yourself as you wish... but I presume it's not easy to combine it with non-stepped code, so you've been warned.

Sebastian Sastre wrote:

> right.
>
> Sounds great.
>
> Can you say if the stepping feature could be used programatically?
> there is any reason that would prevent that?
>
>
>
>
> On Monday, August 11, 2014 6:01:40 PM UTC-3, Herby wrote:
>
>     Nico can give you details, but more or less, there's an
>     interpreter - so once you begin stepping, you are not in fact
>     running the compiled code, but interpreter tries to simulate it.
>
>     Sebastian Sastre wrote:
>     > Hi there,
>     >
>     > anyone can explain the general idea of how the stepper debugger
>     works?
>     > how it can /step/ Amber code?
>     >
>     > What I'm trying to understand is if I can use t
hat same Amber

>     feature
>     > to make something that is not the debugger but it needs to "wait"
>     > until it can continue executing code and returning the
>     corresponding
>     > object.
>     >
>     > It doesn't seem to be using generators and yield and it still
>     creates
>     > the "wait" experience until you proceed or step over a message
>     send.
>     >
>     > Given that javascript doesn't have semaphores, how it can even
>     do that?
>     >
>     > And congratulations in advance in having achieved that level of
>     awesome
>     >
>     >
>     > --
>     > You received this message because you are subscribed to the Google
>     > Groups "amber-lang" group.
>     > To unsubscribe from this gr
>     oup and stop receiving emails from it, send
>     > an email to [hidden email] <javascript:>
>     > <mailto:[hidden email] <javascript:>>.
>     > For more options, visit https://groups.google.com/d/opto
ut
>     <https://groups.google.com/d/optout>.
>
> --
> 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]
> <mailto:[hidden email]>.
> For more options, visit https://groups.google.com/d/optout.

--
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/d/optout.