soul-lang / SOUL

The SOUL programming language and API
Other
1.71k stars 96 forks source link

It needs libraries, modules, preprocessor, something #78

Open ghost opened 2 years ago

ghost commented 2 years ago

Nobody wants to reinvent the same functions over and over

thezhe commented 2 years ago

Not sure if this is exactly what you're looking for, but I'm actively developing a virtual analog effects library called SOUL-VA. It has some useful functions vectorization as well as some support for filters and anti-derivative anti-aliasing. As far as I know there aren't any other SOUL libraries, although I remember seeing some sort of Docker thing for sharing SOUL snippets some months ago on GitHub... maybe someone is still using that. Even with the lack of activity here, I still prefer to use SOUL over other high-level/DSLs. Hope that helps a little bit.

ghost commented 2 years ago

That is cool, what I mean is I can not find any thing in the language that supports loading your library like Python's import, or Lua's require, or C #include and linker. import is a reserved keyword but there doesn't seem to be any kind of modular programming feature to make reusable code. It looks like a cool language but without modular code reusability there isn't any purpose to use it over C/C++, Lua, Python etc.

thezhe commented 2 years ago

Yeah, I don't know any way to '#include' other than via the source line in .soulpatch. I simply use SOUL to force myself to stop obsessively micro-optimizing in C/C++ and assembly :)

ghost commented 2 years ago

Nevermind, I don't understand this thing yet at all. I think you make a patch file and can import all your libraries into it from there. I will try to use your library to test it.

thezhe commented 2 years ago

No worries, the latest commit uses a more traditional library structure if you need an example.