
SharpScript - mythz
https://sharpscript.net
======
mythz
One of its coolest features (just added in the latest release) is Gist Desktop
Apps:

[https://sharpscript.net/docs/gist-desktop-
apps](https://sharpscript.net/docs/gist-desktop-apps)

Where Sharp Apps can also be published to Gists where they can be run on-the-
fly without installation, they're always up-to-date, have tiny footprints are
fast to download and launch that can also run locally, off-line and cross-
platform across Windows, macOS and Linux OS's.

YouTube demo: [https://youtu.be/FlKeaav0gt8](https://youtu.be/FlKeaav0gt8)

~~~
kevin_thibedeau
I'll stick with the tried and true "curl attack_vector | sh".

~~~
merlincorey
I imagine people are downvoting this because it's a joke, but aside from being
a pretty good joke, it's actually surfacing a relevant security issue.

Is it really safe that these gists are "always up to date", meaning they can
be updated without you necessarily being informed.

Essentially this is a `pad-left` situation all over again - micromodules
controlled by other people can be deleted or changed at any time, and some of
these micromodules may become very widely distributed and relied upon.

~~~
mythz
left pad is a transitive dependency issue, running an "Always up-to-date"
version is no different to visiting a Website that can be shutdown at anytime,
except once you've run a Gist App once, you can run it locally offline
indefinitely:

[https://sharpscript.net/docs/gist-desktop-apps#run-apps-
offl...](https://sharpscript.net/docs/gist-desktop-apps#run-apps-offline)

So you have the flexibility of both options [1]:

    
    
         web open App # downloads and runs latest version
         web run  App # runs local offline version
    

[1] [https://sharpscript.net/docs/gist-desktop-apps#github-
sharp-...](https://sharpscript.net/docs/gist-desktop-apps#github-sharp-app-
commands)

~~~
newacctjhro
The difference is that web apps are on a tight sandbox.

~~~
mythz
The issue with leftpad was that it was a transitive dependency that was yanked
and broke everyone depending on it. Gists don't have any dependencies, their
encapsulated within the Gist where all code is easily inspectable and publicly
verifiable, maintained by a verified GitHub User and all changes have a public
audit trail.

Yes the sandbox is the difference between Desktop Apps and Web Apps, which is
the point, Desktop Apps can do things Web Apps can't do and when you're
running a Desktop App you're trusting the publisher just like you are with
every other process running on your System.

------
vxNsr
I'm still kinda confused about what the purpose is, it at first sounded like
it was a vba-replacement for any .net app but the examples all treat it like a
regular scripting language.

~~~
mythz
It's multi-purpose:
[https://news.ycombinator.com/item?id=20742459](https://news.ycombinator.com/item?id=20742459)

------
XJ6
Is there a license page? I can't see one which is a shame.

~~~
chc
It says on the home page that it's part of ServiceStack.Common, and covered by
the same terms:
[https://servicestack.net/terms](https://servicestack.net/terms)

Unfortunately, this appears to mean it is not free software (though it is
_gratis_ for some use cases).

~~~
TAForObvReasons
The actual Project repo
[https://github.com/ServiceStack/ServiceStack](https://github.com/ServiceStack/ServiceStack)
appears to be AGPL3 with some exceptions, which probably explains why the info
is buried

~~~
mythz
The Exceptions are for OSS projects, where it can be used as the OSS license
for that project.

Regardless it's completely free to use for both commercial/non-commercial
usage.

~~~
jaxbot
If I make project Foo, which leverages #Script, and make Foo MIT-licensed, by
your statement #Script is now also MIT licensed in this project. So then
Company Blah wants to use Foo, which happens to just be thin
wrapper/modification around #Script, and is now permitted to take it and fork
it into closed-source repos, yes? That is what this statement implies.

Regardless, this is why getting clever with software licenses, and giving
guarantees in the form of comments instead of actual license legalese, is
problematic. The intention might be clear, but the governance is only by law,
and this appears to be in conflict with your statements.

~~~
TAForObvReasons
More broadly, "clever" software licenses really hamper adoption. Even if it's
not exactly AGPL and it has lots of exceptions, the mere mention is enough to
scare off many developers and companies.

~~~
mythz
Then forget this OSS license option even exists, which you're never going to
use unless you build a custom distribution of ServiceStack without a
commercial license. The AGPL/FLOSS license exists to allow free usage in OSS
projects without needing to pay for a commercial license.

Regardless #Script is unrestricted and free under the commercial license,
which is what all official ServiceStack NuGet packages are released under.

------
iddan
SS is a problematic extension from historical point of view...

~~~
bdcravens
Not the first use of this file extension:

[https://filext.com/file-extension/SS](https://filext.com/file-extension/SS)

------
rishav_sharan
Can this interface with nuget libs to crrate desktop apps as well? Can i use
it with , say, sdl and create a pong game?

~~~
mythz
Yeah it's an embeddably dynamic scripting language that can be used within
.NET Core / .NET Framework Apps:

[https://sharpscript.net/docs/introduction](https://sharpscript.net/docs/introduction)

To use any library you just need to provide a script method exposing the
functionality you want available in your #Script:

[https://sharpscript.net/docs/methods](https://sharpscript.net/docs/methods)

~~~
rishav_sharan
That's fantastic! Color me interested.

Just want to point out that the maintainers should make this aspect more
prominent in the home page as at a quick glance I thought SS is good only for
creating apis/web servers.

~~~
mythz
Thx for the tip, made the feature more prominent in the home page:
[https://sharpscript.net](https://sharpscript.net)

------
felixfbecker
Is there any benefit to this over PowerShell?

~~~
mythz
Did you have a look at the features on
[https://sharpscript.net](https://sharpscript.net) ?

The only time it compares with PowerShell is when it's used to execute Sharp
Scripts [1] which is only 1 of its use-cases. You can embed it inside
.NET/Core Apps [2], build entire Web Apps with #Script [3], run those Apps
from a Gist on-the-fly without an install [4], deploy it on the Server without
any CI [5], use it as a replacement to Razor [6], use it to develop Web APIs
[7], use it to render emails [8], live documents [9], query Databases, HTTP
APIs, AWS/Azure File Storage [1]. All with a familiar JS-expression syntax
[10] that's highly extensible [11] and can run in a user-defined sandbox [12]
where all functionality available to Scripts running in each Context can be
controlled.

[1] [https://sharpscript.net/docs/sharp-
scripts](https://sharpscript.net/docs/sharp-scripts)

[2]
[https://sharpscript.net/docs/introduction](https://sharpscript.net/docs/introduction)

[3] [https://sharpscript.net/docs/sharp-
apps](https://sharpscript.net/docs/sharp-apps)

[4] [https://sharpscript.net/docs/gist-desktop-
apps](https://sharpscript.net/docs/gist-desktop-apps)

[5] [https://sharpscript.net/docs/deploying-sharp-
apps](https://sharpscript.net/docs/deploying-sharp-apps)

[6] [https://sharpscript.net/docs/sharp-
pages](https://sharpscript.net/docs/sharp-pages)

[7] [https://sharpscript.net/docs/sharp-
apis](https://sharpscript.net/docs/sharp-apis)

[8] [https://sharpscript.net/usecases/email-
templates](https://sharpscript.net/usecases/email-templates)

[9] [https://sharpscript.net/usecases/live-
documents](https://sharpscript.net/usecases/live-documents)

[10]
[https://sharpscript.net/docs/syntax](https://sharpscript.net/docs/syntax)

[11] [https://sharpscript.net/docs/introduction#net-
usage](https://sharpscript.net/docs/introduction#net-usage)

[12]
[https://sharpscript.net/docs/sandbox](https://sharpscript.net/docs/sandbox)

~~~
felixfbecker
And which of these things cannot be done with PowerShell?

------
soapdog
if the author is reading, be aware that `.ss` is used by a lot of Scheme
implementations.

~~~
elcomet
He should have used '.sh'

~~~
mythz
.sh is for shell scripts which is the only time where #Script stand-alone .ss
scripts are used, overloading .sh would confuse what’s a Bash Script or a
#Script Script, which are completely different.

~~~
Sammi
Woosh

------
eterps
Unfortunate file extension name IMO, but I'm probably just old.

~~~
keymone
Hamburg’s car plates all start with HH and nobody cares (or at least I didn’t
find anybody who does).

~~~
Ididntdothis
I knew a guy in Stuttgart who wanted a license plate “S-S” and got rejected.

