Hacking STDIN linux

mon projet TermCurs
my project, allowed me to understand how to properly hack under Linux
so a lot of system resources less
USE openfile TTY
it was in front of my eyes but… the hacking is done in pure zig-lang

I also worked a lot with MultiArrayList and Arraylist to make a proper and dynamic GRID

my project is to make a terminal such as an IBM 5250/3270 type AS400.
I resume my project made under nim-lang a designer code generator. Currently I have laid the foundations
the link for those interested.

Thank you

6 Likes

Hello, I made a lot of new function in my project to make a lib that looks like ncurse, and which I will use later to make a designer.
I also included a function to use regex in Go-lang
if you look it lets you see how C headers communicate with Zig-lang
functions :
panel
label
button
frame
grid
menu
outstanding Field input output

I am proud to present the TERMCURS library
it will be definitively validated with the generator designer project. Hoping to have no more changes, but I’m sure there will be additions of functions.
TERMCURS

2 Likes

hello

version ZIG 0.10.1

Removed Go regex module
Setting up the use of regex.h
Results hundreds of KB less
currently gencurs makes 156k

Gencurs currently only does on-screen definition,
I am testing the termcurs lib.
as soon as I have finished the fields I will start generating code…

2 Likes

Small point to make about the readme on your library - you may want to move the the status updates to a separate page. I can see you’ve done a lot of documenting about the changes you’ve made, but scrolling up and down, it’s not obvious what the project actually does. Usually when I read the readme on a library, it’s to get a sense of what the library does first and then I can look at the push/git activity to get a sense of what has been updated.

Just trying to be helpful! :slight_smile:

3 Likes

thank you very much, I do during my retirement, I advance every week, and I do this alone, among other things I have only been using ZIG since October 2022, and at times I spend more time reading than develop
because I would like to keep it simple, thank you for the advice. I will do as you suggest.

it’s done, I hope this is more explicit, while waiting for my generator of source to be operational.

2 Likes

It’s better!

the project is alive and evolving it is in phase 2 what I write what I see

humm I have to get down to doing a doc

TermCurs

1 Like

Hello, many changes, especially in the way “allocators” are handled. I have also sanitized the terminal management, separated Forms / Grid / Menu functions, and save and restore functions are active; it’s still in testing.
I believe the foundations have been laid, and now I can start generating the menu and the grid.
I also changed the layout in the readme.

Termcurs

1 Like

Deep modification of Termcurs, taking into account function keys F1…F36, code review, and testing. I have read a lot of other people’s code. I was fortunate that someone wanted to tackle Regex simplification in pure ZIG and ensure it works for forms with programmable (random) regex construction.

As a result, I had to rework my entire application. I apologize if there are still some bugs; this was a very significant modification. It is ongoing and evolving. I am currently defining the menus, and once I am done, I will complete the introduction of Json, followed by the generation of ZIG code.

I also spend time reading what others are doing, which gives me ideas, and I correct my code for better clarity and simplification.

Termcurs

1 Like

Termcurs

Now that the entire designer allows for saving and restoring the code, this has allowed me to test my functions, and especially to take a little tour of the Zig language. I opted for working and writing with maximum use of the Zig language, so I don’t use addressing or hex code; everything is in Zig.

now i will generate some code and for that i will use the module “MUSTACHE-ZIG”

In the current state, one could very well use JSON files and encapsulate them in the program, and why not make the forms in the project dynamic… I did this on the AS400.

1 Like

Hello, there has been significant progress in my Termcurs project.
Both in the core code (a lot of clarity regarding keyboard input handling) and in testing to validate behavior.
The source generator is starting to behave quite well.
It’s not all finished yet, but it’s already functional.

As a test, I will use directory management for defining zones and creating tables that reference the directory.

See you soon!

Creating a database with a repository is a very strategic approach, especially if the goal is to ensure data consistency and integrity.

A repository is essentially a “single source of truth” for all critical business data. It allows data to be centralized and normalized so that it is consistent and accessible by all systems and applications.

Here are some steps and key points for defining a database with a repository:

Needs Analysis: Understand the business needs and the types of data that will be stored. Identify the relationships between these data.
Database Schema Design: Draw a data model that represents the structure of your database. This includes defining tables, fields, primary keys, and foreign keys.

Data Normalization: Organize data to reduce redundancy and improve data integrity. Data should be divided into logical entities.

Repository Definition: Create the repository as a central entity in your database. This includes managing metadata, data validation rules, and update policies.

Implementation of Consistency Controls: Add constraints and integrity rules (such as referential integrity constraints) to ensure that data remains consistent.

Security and Access: Implement security mechanisms to protect sensitive data and define appropriate access levels for users.

Testing and Validation: Test the database to ensure it meets requirements and functions correctly. Include load and performance tests to ensure it can handle the expected data volumes.

Documentation: Write comprehensive documentation on the database structure, data management rules, and usage procedures.

By using Zig to develop this suite of programs, you will benefit from a language that favors security and performance.
If you have specific questions or need concrete examples for some of these steps, feel free to ask.
Your project has every chance of success with good planning and rigorous execution

That’s why I created a terminal-based designer, TERMCURS, which can be found on GitHub. It allows me to define my input and visualization screens where fields manage data consistency. Then, I redefined the ZFIELD mode, which allows me to have finer control over a field corresponding to a standard found on mainframes like the AS/400, as well as ZDCML, which allows me to handle numeric zones with 38 digits or more. With this, I can tackle creating a repository.

As an additional note, I chose the Zig language because it seemed coherent and free of ambiguities. Although it is not yet in version 1, it already has a very advanced approach. A standout feature is its referential integrity control, which I value highly coming from the IBM mainframe world.

Of course, it could use more usual documentation, but we have direct access to its composition through its language documentation, and it has a very active community. Sometimes I have to search for how to write certain things because I come from an IBM world where everything has already been thought out. Fortunately, I have been working with C since 1995 and have extensive experience in my field on IBM.