Run squirrel code on computer for testing purposes?

Is there a way to run squirrel code on mac for testing my code behavior?
I dont need any special libraries of agent/device, but just to see that all the rest of my code working on data received from http packets is working properly.

if there’s no way on mac, other platforms via VM is ok

You can easily grab the source and compile it and run it on your mac (or other supported platform). There is an interactive prompt (although it doesn’t have history, which is annoying), or you can run scripts.

For a long while I used to build my scripts with additional files that gave me “fake” support for the imp built-ins so my code would just work, but I gave up maintaining that.

i have compiled it and got bin/sq
but how do i use it? Its not like the python interpreter…it has no memory.
How do i write squirrel script and load it with

What do you mean fake support? You have added libraries that gives extra functionality?

You can pass bin/sq a script and it will run it.

And yes, I do have a small library I use to bootstrap the imp stuff (although I haven’t maintained it very well).

Here is a simple one:

class Server { function log(string) { print(string + "\ "); } } server <- Server();

With that, your code that calls server.log(“Hello World”) will work.

If you run the sq program interactively, try:

print(1+1)

or

`>myGlobalArray <- []

myGlobalArray.push(1) (hit enter)
print(myGlobalArray[1]) (hit enter)
2
`

I see.
so its very limited. maybe for small tests its OK

If you have an Imp, why not just use it?
I don’t understand, what’s the dis/advantage?