Open sadernalwis opened 5 months ago
Hi @sadernalwis ,
Thank you for taking the time to review and reformat the code in the library. I appreciate your effort in making it more readable.
Since you have a good understanding of the code and have shown interest in improving it, would you be willing to help further? I would be happy to give you full access to make the code more readable and to enhance the documentation. Your insights and contributions would be incredibly valuable in making the library more accessible and user-friendly for everyone, including professionals.
If youโre interested, please let me know, and we can set up the necessary permissions and discuss how best to collaborate.
Thanks again for your contribution and for considering this!
code more readable and to enhance the documentation Absolutely, I'd love to help. Its a bit ocd of me i guess, but this format is the only way that i can read and understand code faster. also i could later expand some advantages of the format.
Honestly I believe the back-end should belong in the ic_cdk; maybe one day either-case, I see 4 context separation for docs:
The four contexts you proposed make a lot of sense and will definitely make the documentation more comprehensive and user-friendly.
Let's proceed with this plan:
I'll set up the necessary permissions for you to start contributing directly to the repository. Once that's done, we can begin by outlining the documentation for each context. Feel free to share any additional thoughts or examples you have on the advantages of the format you prefer.
Looking forward to collaborating with you!
Canister dev (technical)
Wallet Maker (half n half)
Using JS (technical)
ic-reactor
Using UI (user guide)
Advatages of wide-line formatting, otherthan visibility and readability;
macro_rules!
and proc_macros
op_stack
rule layer for operations like
...( |user_map|{let mut user_ids = UserIds::new();for (user_id, user) in user_map.iter() {if user.can_operate(operation) {user_ids.push(user_id.to_owned());}}callback(&user_ids)})}
//becomes a generic copy/concat/move macro/command
2. Easier to convert identified patterns and build a wallet rules heuristic layer for dynamic wallet generation.
this will essentially make the `b3wallet` repo an autobuild product.
4. Can build a python module to extract sections or generate various template/boilerplate project files for a dev.
example:easy Python parsing of `.rs` files broken by line separated block. without complex parsing. I use the below method for NLP data preprocessing of adocs and code blocks.
```python
def selected_block(script):
script = TextOps.pull(script,force=False) if type(script) is str else script
line_begin = script.current_line_index
lines = script.lines
def trace(iter,index,op):
out_lines = []
if op=='FORWARD':
while index < len(script.lines):
line = iter[index].body.split('#')[0].strip()
if line.strip(): out_lines.append(line)
else: return out_lines
index+=1
elif op=='BACKWARD':
while index > -1:
line = iter[index].body.split('#')[0].strip()
if line.strip(): out_lines.append(line)
else: return list(reversed(out_lines))
index-=1
return out_lines
return trace(lines, line_begin, 'BACKWARD')+trace(lines, line_begin, 'FORWARD')[1:]
async def process_adoc_file(self, file_path, channel, folder_path=''):
try:
with open(file_path, "r", encoding="utf-8") as file:
content = file.readlines()
for line in content:
sline = line.strip()
if sline:
if sline.startswith("image::"):
image_url, alt_text = self.extract_image_info(sline)
image_url = join(folder_path,image_url)
elif "link:" in line:
link_parts = line.split("link:", 1)[1].strip().split("[", 1)
link_url = link_parts[0].strip()
link_text = link_parts[1].split("]", 1)[0].strip() if len(link_parts) > 1 else ""
# print(f"Link detected: {link_url} (Link text: {link_text})")
elif sline.startswith("video::") or sline.startswith("audio::"):
media_url = sline.split("::")[1].strip()
media_url = join(folder_path,media_url)
print(media_url)
else: print(line.strip()) # Send other lines as text
else: break
except Exception as e:
print(f"Error processing file: {str(e)}")
generally first code block being the use
, last being the documentation bit.
u can generate docs like autobuild.py generate doc <module_names>
Thank you for your insights and the detailed explanation of wide-line formatting and its advantages. Your input is incredibly valuable.
Your idea to mix things up with backend code generation using your Python autobuilder code is super interesting and something I hadn't thought of. I was considering a project called B3Forge that generates user interface code based on each function, making it easily editable.
Additionally, it would later generate backend code based on user function selection. Your idea is exactly what I needed.
Have you heard about my B3Forge project on the forum?
So, basically, we can add the backend builder on the interface with your autobuilder, right? Is that doable? I'd love to work with you on this. Your expertise and ideas could significantly enhance the B3Forge project. Let's make this conversation public on the B3Forge post or in a separate post to engage more developers and get broader feedback.
Sorry about the delay. Have to do the rounds..๐
autobuilder
: I have 2 ideas of how we can figure out WASM/Rust compilation of the dynamic wallet. Doable!No problem, I had some off-days lately too.
- I will join the discusssion.
I love to have you there!
2. I have 2 ideas of how we can figure out WASM/Rust compilation of the dynamic wallet. Doable!
I cannot wait to hear about your ideas.
3. One of my colleagues, @usama9500 has agreed to help us out with the Docs. More Hands!
Thank you, that should be perfect.
Thank you ๐
I think we might approach organizing and explaining based on this structure and will refine further based on the features:
App:
Operation:
Timer and Task:
Memory Map, Heap, Partitions:
WASM Kit:
Bugs and Logs:
Wallet Maker (Half Technical, Half User-Friendly)
Using JavaScript (Technical)
Using UI (User Guide)
Regarding the Python Module for document automation, my prior experience is with document management tools, including Notion, Gitbook, Readme, and Github, and some static website generators like Hugo and Sphinx. I am not sure how it works, will need help setting it up.
Some of the concerns regarding the module:
Hi Usama,
Thank you for your responses and your willingness to help.
Itโs great to have you here! Iโm impressed by your approach to evolving the code and documentation. However, I must admit that I have no experience in Python and these types of tasks. Your structured plan for organizing the documentation is very thorough and aligns well with our goals.
The goal here is to have a decentralized and open-source set of tools that simplifies the process of creating dApps on the Internet Computer. You guys pretty much know what youโre doing, and your expertise is invaluable.
Please let me know if thereโs anything you need from me or any tasks that you think I should handle to support this effort. Iโm here to help and ensure we move forward smoothly.
Looking forward to collaborating with you both!
Best regards, Behrad
Thank you, Berhad.
I had some unavailability the past week; however, I am fully available now and ready to get started!
For the documentation, let's use GitHub. We can set up a repository specifically for B3Pay Documentation.
Concerning the code, could we arrange a meeting to discuss how the codebase is organized on GitHub? I'd appreciate an overview of the directory/file structure for each feature, based on the outline provided here: https://github.com/B3Pay/b3_utils/issues/2#issuecomment-2148861399
Hi @usama9500,
Thank you for getting back to me. I'm glad to hear that you're available now and ready to get started!
Using GitHub for the B3Pay Documentation sounds perfect. I'll set up a repository specifically for that purpose.
I also wanted to mention that we have a new project coming to the organization called Scaffold-IC. It's essentially a clone of Scaffold-ETH for the Internet Computer network. This project combines all the libraries and features available inside B3Pay, allowing developers to interact with pre-built apps created with those libraries and customize them for their specific use cases.
Regarding the code, let's arrange a meeting to discuss the organization of the codebase on GitHub. Iโll provide an overview of the directory and file structure for each feature based on the outline you provided.
Please let me know your availability for the meeting, and we can schedule a time that works for both of us. Here are a few time slots that work for me:
Looking forward to our discussion!
Thank you, Behrad, for your time!
I am available tomorrow, 23 June, between 4 PM and 6 PM CET.
My email: usama.ahmed95@gmail.com
Could you please send me an invite or provide me with your email address so I can send a Google Meet invite?
I have sent you the invitation for a Zoom call tomorrow starting at 5 PM CET. Does that work for you?
Yes works for me!! Thank you!
See you soon.
So back at it Gents!
@b3hr4d So the 2 ideas:
rust
template code files from UI/UX and redirect to Android App and the App compiles rust
to wasm
in jvm
or native
WKT
or WKB
(monolithic if possible??) or wasm
blocks and upload to a system canister directly on frontend.shall we schedule a call next week?
Hi @sadernalwis,
Thank you for getting back to us!
Regarding your first idea about combining Rust template code files from UI/UX and redirecting to an Android App that compiles Rust to Wasm in JVM or native, Iโm a bit unclear on how this process would work. Could you please provide more details or an example to help me understand it better?
Additionally, I wanted to let you know that I'm currently on a trip and will be back in 2 weeks. Would it be possible to schedule a call after I return to discuss these ideas in more detail?
Looking forward to our collaboration!
I know what u meant by this needing documentation .. ๐ been studying this. did a full reformat. (super-tight no-quarter for lines format ๐) doubt you'll like it. pretty sure no rust pro would like it.๐ beautiful code tho..