Re: what is best way to interpret simple smalltalk code in regular js app?

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

Re: what is best way to interpret simple smalltalk code in regular js app?

Herby Vojčík
There is an API for that somewhere in Compiler. Either look in Compiler
tests and look for 'evaluate' or 'evaluation', or just evaluate
something like '4 foo' in workspace and find out the call in debugger
stack trace.

Then, just call it from JS just as any Smalltalk call (eg. see how
augmentPage is called in `amber init`-created app's index.html).

Herby

Micael Alastor wrote on 31. 10. 2018 16:34:

> Hi Amber-smalltalkers
> So what is best way to interpret simple smalltalk code inside regular js
> app?
>
> smth like
>
> |x| x := 25. x+75
> or
> |myvar| myvar := 9001.(myvar> 1.2e4) ifTrue:[-1] ifFalse:[42]
>
> Can I somehow use Amber for this task or is there any better solutions?
> Of course it's possible to write another simplified smalltalk
> interpreter but I think it's not the smartest choice.
> Help me pls =)
>
> --
> 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.