alt.hn

8/17/2026 at 10:18:05 PM

scScript for Linux

https://scapplications.com/

by OptionOfT

8/18/2026 at 6:55:54 AM

People should really put a few examples on their webpage when they introduce a language, like a hello world, making a http request, writing a ping/pong server, etc.

by supriyo-biswas

8/18/2026 at 8:56:19 AM

Yes! That is why the 3rd line says: "...or to see sample code (Intro 1)." You just had to click on "Intro 1".

by SA9G

8/17/2026 at 10:27:19 PM

I wanted to write a love note to C... and if you hate it, it is all my fault.

by SA9G

8/17/2026 at 11:59:19 PM

It looks interesting.

Isn't the same kind of thing available from LLVM?

  clang -emit-llvm -c main.c -o - | lli

by kreelman

8/18/2026 at 1:01:36 AM

You could run C that way... but scScript is a scripting language using C-like syntax with features designed for scripting. For example, it provides dual variadic parameter/arg lists. Turns out having "in" (pass-by-val) and "out" (pass-by-ref) parameters are more pleasant (at least to me) than trying to return N values out of a function (especially since script languages run away from pointers). Perhaps it is a testament to my ignorance, but I am not aware of another language that does this.

The difficulty in designing a language is not so much implementing a compiler, but the iterative process of implementing and fine-tuning a given aesthetic... a given flavor as it were and it has to work well. Of course the other side is testing the damn thing... so my hats off to QA!

Nevertheless, I am sure good tool users could save a lot of time instead of hand implementing everything, as I would. So thumbs up to LLVM.

by SA9G

8/18/2026 at 4:18:55 AM

No other language that does what? Have out parameters? Many have that, even Pascal.

by panzi

8/18/2026 at 4:49:19 AM

No (scripting) language with 2 parameter lists, the second all Var (to use the Pascal syntax). I could have included a Var keyword instead to differentiate, but a) that would complicate the variadic nature of scScript parameter lists and b) didn't quite look C-like to my eyes. (Then again I also have two Map functions in there for arrays and dicts.... so I should not claim purity.) (Yes, I stole them from LISP :-)

by SA9G

8/18/2026 at 1:22:47 AM

i haven't looked at the code yet but i love the website. just how open source project websites should be! ♥

by billywhizz

8/18/2026 at 1:50:58 AM

May Odin smile upon you :-) And thanks for not laughing at my art!!

by SA9G

8/18/2026 at 8:59:01 AM

Combining mark-sweep with refcounting is bold. Most small VMs just pick one.

by sage981

8/18/2026 at 9:30:04 AM

If by "bold" you mean daft, then you are right :-)

Mark/Sweep GC is easy, well contained, and simple to test. RefCounting affects everything, obviously does not work for circular refs, and is an incredible pain to test/debug. While RefCounting gives you generally continuous smooth performance, it can stop the world if a particularly large/complex data structure is being collected. So all in all, I would skip RefCounting next time. (scScript does have a compile option to turn it off.)

by SA9G

8/18/2026 at 4:03:39 AM

The dual in/out parameter idea is interesting. Looking forward to trying it.

by Sulfide6416

8/18/2026 at 1:45:15 AM

Can this trans-compile to C? (And vice versa?)

by mofosyne

8/18/2026 at 2:02:34 AM

So you want to generate C code instead of ByteCodes.... and then compile the C? I suppose, if you broke out the runtime memory management (and a few other things) into a library. But I am not sure why you would....

If you want pure speed, then you would rather have it generate machine instructions instead of higher-level ByteCode ops. But you would not be using a scripting language if you want pure speed.

Perhaps if you only want a double-arglist variant of C (you must call it scC!) then you could write a front end processor! And by you, I mean not me :-)

by SA9G

8/18/2026 at 12:20:08 PM

Honestly I didn't understand anything from the page, why C that is bytecode compiled, don't we suffer making C just to have the speed? Examples? What showing the bytecode means?

by pmkary

8/18/2026 at 9:50:08 AM

congrats, but Tcl is enough for me.

by uwagar

8/19/2026 at 7:31:09 AM

Seeing a lot of mentions of Tcl over the past couple days. Why so much love? When do you reach for it?

by lkirkwood

8/20/2026 at 2:01:02 PM

because its the integrated scripting language in my app. great for setting things in the app and can do things like

proc a {} { puts "a"}

proc b {} { puts "b"}

set c a

$c ;# prints a

set c b

$c ;# prints c

by uwagar