460
Subscribers
+124 hours
+357 days
+9130 days
Posts Archive
461
```java
SaynaaModule module = state.newModule(module_name);
state.moduleSetGlobal(module, "context", state.getContext());
state.moduleSetGlobal(module, "saynaadir", state.getSaynaaDir());
state.moduleSetGlobal(module, "bindClass", JavaBridge.class, "findClass");
state.moduleSetGlobal(module, "new", this, "newJavaObject");
state.moduleSetGlobal(module, "getField", JavaBridge.class, "getFieldValue");
state.moduleSetGlobal(module, "setField", JavaBridge.class, "setFieldValue");
state.moduleSetGlobal(module, "tostring", JavaBridge.class, "javaToString");
state.moduleSetGlobal(module, "instanceof", JavaBridge.class, "instanceOf");
state.moduleSetGlobal(module, "callStatic", JavaBridge.class, "callStaticJavaMethod");
state.moduleSetGlobal(module, "length", JavaBridge.class, "lengthOf");
state.moduleSetGlobal(module, "testing", this, "testing");
state.registerModule(module);
461
🔨 1 new commit to SaynaaIDE:main:
f871305: moved 'java' module form c/c++ to java by Mohammed Abdifitaax (Mahdiware)
461
🔌 New pull request saynaa-lang#43 Refactor native API and add CLI for Saynaa
by: @Mahdiware
- Updated native API to remove auto-detect functions and introduced LoadScript function.
- Modified nativeapi.h to reflect changes in function signatures and added LoadScriptResult struct.
- Created a new Makefile for CLI to compile and link Saynaa code.
- Implemented main.c for CLI to load and run scripts, handling bytecode and source files.
- Added example scripts (test1.sa and test2.sa) for testing the CLI functionality.
Reply to this message to post a comment on GitHub.
461
🔨 1 new commit to SaynaaIDE:main:
b150ef9: Refactor Saynaa module and improve bytecode handling
- Removed SaynaaOnClickListener class as it was no longer needed.
- Updated FileUtil to increment asset copy version from 12 to 13.
- Enhanced saynaa_compiler.c with new functions for constant folding and improved binary operation handling.
- Added checksum validation to bytecode writing in saynaa_bytecode.c.
- Introduced global variable preservation and restoration in saynaa_module.c to maintain state across module executions.
- Improved error handling and code readability across various files. by Mohammed Abdifitaax (Mahdiware)
461
🔨 2 new commits to saynaa-lang:fix/compiler:
69e925d: Implement constant folding for binary operations in the compiler by Mohammed Abdifitaax (Mahdiware)
7a99c57: Implement constant folding for binary operations in the compiler by Mohammed Abdifitaax (Mahdiware)
461
🔨 1 new commit to saynaa-os:main:
49f5170: Add scanf and related functions to libc, enhance terminal handling, and implement window manager features
- Implemented scanf, vscanf, sscanf, and vsscanf functions in libc for formatted input.
- Added termios.h for terminal I/O control, including struct termios and related constants.
- Enhanced terminal input handling in the shell to support echoing characters based on terminal settings.
- Updated clear command in userspace to use sys_write instead of syscall1 for better compatibility.
- Created a new startwm program to initialize the window manager and background processes.
- Refactored terminal.c to improve input handling and output rendering, including support for PTY.
- Added keyboard mode setting in the window manager to manage input correctly.
- Introduced a scanfdemo program to demonstrate the usage of scanf for user input. by Mohammed Abdifitaax (Mahdiware)
461
Almost 99.999% of the Android API integration is now complete. What’s left is mainly performance optimization.
Right now, I’m working on a major upgrade — moving my language from an interpreter to a JIT compiler. This is a big step, and it requires redesigning some core parts, including the bytecode system. Currently, it’s stack-based (like Python), but I’m transitioning it to an argument-based model (similar to Lua). This change should significantly improve performance.
This process will take around 2 months or more to complete.
At the moment, I’m quite busy, so I’ll be maintaining the project on a limited schedule — about one day every two weeks.
461
view.setOnClickListener({
onClick: function(v)
v.setText("View Renamed")
end
})
Interface is optional, now461
🔨 1 new commit to SaynaaIDE:main:
03ac031: disabled: arm computed goto crash by Mohammed Abdifitaax (Mahdiware)
461
+1
If you download the app, you can find the source code inside the /assets folder within the app. If you install it, the app uses a DocumentProvider, which allows you to read or modify the
/data/data/com.android.saynaa/files/folder without needing root access. I’m aware that when the app launches for the first time, it takes a bit of time (not too much). This is because the app reads the source code and processes it through several stages to initialize, such as: Lexer → Parser → Bytecode → VM Also, on the first run, the source code from the assets is copied into
/data/data/com.android.saynaa/files/I will improve and optimize this in the best way In shaa-Allah, I will turn it into an Android IDE that can be used to develop Android APKs—especially mod menus (though mod menus are not the focus right now because they rely on Services; currently, I am focusing more on how Activities are managed).
461
+1
90% of andlua feature are done
- import.lua 100% done
- loadlayout.lua 95% done
- dynamic finding undefined variable into java.bindClass
- and so on
461
🔨 1 new commit to saynaa-lang:big-update:
5b28b49: Refactor bytecode handling and enhance map functionality
- Updated bytecode functions to return a unified Result type instead of custom status enums, improving consistency across the codebase.
- Introduced new map operations: MAP_APPEND for inserting values with auto-incremented integer keys.
- Enhanced map structure to maintain insertion order of keys and support value-only entries.
- Added tests for map insertion order and value-only maps to ensure correct behavior.
- Implemented string manipulation methods, including substring extraction, reversal, repetition, byte access, formatting, matching, and global substitution.
- Improved error handling and status messaging for bytecode operations. by Mohammed Abdifitaax (Mahdiware)
461
+2
Lazy resolution, worked perfectly, and also i tested, loadlayout.sa like as loadlayout.lua andlua has
