This is quite interesting, I'm going to give it a try.
Why would you want to shorten the name? Users can always make an alias
if they want it shorter - the name goscript is very explicit (and
good, imho). Erlang uses "escript" and I think that's not explicit
enough..
Good job!
alex.
--
a lex 13 x
http://www.a13x.info
My opinion is, especially after the experience of doing web
development with Java, Python, and Erlang, that nothing beats rapid
web development with interpreted (and dynamic) languages.
Hot-reloading is a huge time-saver (technically, it's not really a
hot-reload, as the dev. server in python, for example, monitor file
changes and restarts the server if it sees a change; due to the fact
that it's so fast to start up, it's practically hot-reloading :).
However, in production, it's widely recommended to turn this feature
off and to "preload" your applications. This is where Goscript and
compiled Go apps could fit fantastically well - power of rapid
development with compiled code in production. I would think there's a
use for that.
-alex
--
Any changes that your program support .goscript instead of simple .g files?
In Gedit the file ".g" seems to belong to another language (GAP ->
http://www.gap-system.org/Overview/overview.html)
I am working on a simple task automation tool for Go and goscript is
just what I was missing.
I already made some minor changes to go.lang syntax file to handle the
first line of goscript.
Will send you a pull request sonn.
Thanks,
--
André Moraes
http://andredevchannel.blogspot.com/
--
André Moraes
http://andredevchannel.blogspot.com/
Slightly offtopic, gos means soda in Icelandic. Not particularly
interesting, just thought it was kind of funny.
Ideally, I would like to see .go being used, but that would require
changing the compiler (ie. to ignore the hashbang at the top), which
probably wouldn't be such a marvelous idea. The .gos is good, I
guess..
-alex
--
-alex.
--
The use may call 6g on a script file and that will not work (since the
first line will be the #!), also, some automated tools scans the
entire directory looking for .go files and checking dependency and
other stuff (which doesn't make much sense in scripts).
The ".g" was the best choice, but it is already used as mentioned before.
https://github.com/andrebq/chimp
I just commited the code yesterday, it uses Archos goscript.
Don't have to many automated task, but has one for compiling and
linking things (see the samples).
Very very very easy to use.
Did you have in mindo how to use goscripts to script go programs?
Reading a little abou tinyc they have libtcc library to make dynamic
code generation.
Maybe wrapping goscript in some lib and working a little to make easy
to communicate with another go process will be very nice (net channel
maybe).
I just cited because that is the goal of the project.
And by "automate" i mean: write the task once and then run it as many
times you want.
Here and I thought that Go's advantage over Python *was* that it is a
systems language which generates native code rather then requiring an
interpreter.
> - it could be handy for writing plugins (as Go scripts) for a compiled
> application, itself written in Go (not unlike lisp for Emacs or Python
> for Blender, but definitely handier).
The problem with builtin scripting languages is that you end up having to
use whatever language the application developer happens to like. Much
better is to provide a scripting interface that *any* language can interface
with. Nothing procludes a fully compiled language from leveraging such an
interface.
Goscript don't make Go interpreted, it compiles go on-the-fly
>> - it could be handy for writing plugins (as Go scripts) for a compiled
>> application, itself written in Go (not unlike lisp for Emacs or Python
>> for Blender, but definitely handier).
>
> The problem with builtin scripting languages is that you end up having to
> use whatever language the application developer happens to like. Much
> better is to provide a scripting interface that *any* language can interface
> with. Nothing procludes a fully compiled language from leveraging such an
> interface.
Agreed, the scripts written in Go should be started as different
process and something like netchan used to coordinate the
communication.
In *UNIX systems starting process isn't really a big deal and the
isolation is much better than many scripts running on the same
process.
That is probably the best way to script Go something like:
https://github.com/nsf/gocode