packager icon indicating copy to clipboard operation
packager copied to clipboard

Another type of compiling project (Environment)

Open piw-piw opened this issue 2 years ago • 6 comments

I have a quick idea. Can you create C/C++/C# library for scratch projects. Like conversion to javascript, but to C file with .dll library.

It will be all files/folders, not 20 files like in Electron: app_name.exe ScratchLibrary.dll assets

piw-piw avatar May 07 '22 18:05 piw-piw

It wold be hard, and C doesn't really work well on all devices (for example linux, it can be hard to get it working on it without wine). Conversion to js is possible because Scratch-vm is made with js, so all you need to do is run the Scratch-vm with the project. Idk how you wold do it with C without it taking months.

TheShovel avatar May 09 '22 11:05 TheShovel

Conversion to js is possible because Scratch-vm is made with js, so all you need to do is run the Scratch-vm with the project

If you mean the TurboWarp compiler (and not simply the Electron/node.js environment), that is somewhat different (it still uses the scratch-vm, but it's a modified version that actually compiles scripts to JavaScript ahead of time instead of interpreting them).

CST1229 avatar May 09 '22 13:05 CST1229

god damn that would be a milestone. it's like javascript is a dynamically typed program. Compiling it into C which is static typed would case more boilerplate code.

compiling kids programming language into c, god damn

SK-Fast avatar May 09 '22 16:05 SK-Fast

Conversion to js is possible because Scratch-vm is made with js, so all you need to do is run the Scratch-vm with the project

If you mean the TurboWarp compiler (and not simply the Electron/node.js environment), that is somewhat different (it still uses the scratch-vm, but it's a modified version that actually compiles scripts to JavaScript ahead of time instead of interpreting them).

I do know about that. But it still needs the vm, that is made in js, so compiling to C just isn't something that someone wold have the time to do.

TheShovel avatar May 09 '22 16:05 TheShovel

[...] I do know about that. But it still needs the vm, that is made in js, so compiling to C just isn't something that someone wold have the time to do.

This is packager.

piw-piw avatar May 09 '22 19:05 piw-piw

[...] I do know about that. But it still needs the vm, that is made in js, so compiling to C just isn't something that someone wold have the time to do.

This is packager.

Sorry, didn't mean compile, I meant package.

TheShovel avatar May 09 '22 20:05 TheShovel