YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

New Topic Post Reply
Any tutorials?
Guest
#1 Posted : Saturday, April 19, 2014 9:26:09 PM(UTC)
Rank: Guest

Groups:
Joined: 7/25/2010(UTC)
Posts: 23

Thanks: 0 times
Was thanked: 1 time(s) in 1 post(s)
Hello all,

I am new to the squirrel programming language and am interested in using it. I have examined the doc PDFs for language and syntax features, and it appears to be relatively easy to pick up. However, I am having trouble understanding how to actually compile and run the code. Is there anyone that can provide guidance in what compilers to use, tutorials, etc.? Also, I plan to write a graph (shortest-path first) program in squirrel, does this seem manageable with the language?

Thanks,
a fellow programmer
bluehazzard
#2 Posted : Sunday, April 20, 2014 11:53:01 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 1/1/2013(UTC)
Posts: 58
Location: italy

Thanks: 14 times
Was thanked: 3 time(s) in 3 post(s)
Guest wrote:

Also, I plan to write a graph (shortest-path first) program in squirrel, does this seem manageable with the language?


squirrel is touring complete, so you can program everything you want...

for tutorials, yes, there aren't much out there, but if you look at the examples in the squirrel source code, or at the examples at the sqrat code (the test codes). you will get it, because squirrel is a easy language under the line...

greetings
wizzard
#3 Posted : Sunday, April 20, 2014 3:28:33 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/19/2013(UTC)
Posts: 133

Thanks: 4 times
Was thanked: 21 time(s) in 20 post(s)
I think there are a few misconceptions in this thread, but maybe you already knew these things about Squirrel. Squirrel is "designed to be a light-weight scripting language." This means that it is supposed to be built on top of C++, and meant to extend your C++ code.

If you use Squirrel to make a graphing program, you will need to code, in C++, the mechanisms that allow you to draw on the screen, and then expose those mechanisms to Squirrel.

For this reason, Squirrel doesn't come with some compiler that you can just start coding with. You must download the library and compile it yourself in C++ prior to being able to compile and run Squirrel code.

As soon as you compile Squirrel, you will be left with a standalone compiler (sq.exe in the bin folder on Windows), but its use to you will not be vast. You will need to embed Squirrel into your C++ application (see minimal.c in the etc folder of the Squirrel download)..

As for tutorials, there are not any good ones that I know of, but Squirrel uses traditional makefiles, and has enough decent documentation such that it isn't hard for someone who has used a software library before to get started with it.
Guest
#4 Posted : Tuesday, August 12, 2014 10:21:13 PM(UTC)
Rank: Guest

Groups:
Joined: 7/25/2010(UTC)
Posts: 23

Thanks: 0 times
Was thanked: 1 time(s) in 1 post(s)
Hi all,

As far, as i know, -c switch compiles the given source file (.nut) into a bytecode file (out.cnut) and also, there is another switch, like -o , for "specifies output file for the -c option", but it doesn't work for me as expected at all. Could some give an example, on how to use it correctly, please?

Regards,
a SQ newbie
fagiano
#5 Posted : Thursday, August 14, 2014 9:25:30 AM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 1,059

Thanks: 0 times
Was thanked: 79 time(s) in 61 post(s)
Code:
sq -c -o outputfilename scriptsource.nut
Follow me on Twitter @squirrellang
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.126 seconds.