Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Reflective, Meta Blocks. Classes and Modular Improvement. #50

Merged
merged 19 commits into from
Nov 25, 2018

Conversation

Thecarisma
Copy link
Contributor

Description

  • Reflective and Meta Programming
    Block, variables and classes can be dynamically modified at runtime. It allows inspection at runtime without knowing the structure or name of the object at compile time. It also allows instantiation of new objects and invocation of methods, creation of attributes.

  • Modular install from GitHub
    The modular environment has been updated to be able to install module from github using the command below

 $ modular install https://github.com/Youngestdev/NgBanks

or short form

 $ modular install Youngestdev/NgBanks

The command above will install the module NgBanks from github. If the module go be installed is from another branch or a tag the : can be use as a seperator for the repo and the branch or tag e,g

 $ modular install Youngestdev/NgBanks:branch-one

The command above will rather fetch the module from the one branch of the repository or to fetch from tag...

 $ modular install Youngestdev/NgBanks:tag-0.1

The tag version of the repository will be installed

NOTE : if the modular app has not been installed you can use the modular source in the environment folder to perform the same operation

 $ simple modular.sim install Youngestdev/NgBanks

Type Of Change

  • Bug Fix: Non breaking change which fixes an issue.
  • New feature: Non breaking change which adds a new functionality ( module, enviroment etc).
  • Breaking change - Fixes a feature that would cause existing functionality to not work as expected.
  • Documentation - Module or general documentation.

How Has This Been Tested ?

This has been extensively tested using new examples file below
reflectiveerrormsgdemo.sim
reflectiveoopdemo.sim
reflectivevmdemo.sim

Checklist:

  • I have created a supporting issue for this PR.
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests passed locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Thecarisma Thecarisma added the enhancement New feature or request label Nov 19, 2018
@Thecarisma Thecarisma added this to the 0.4.0 milestone Nov 19, 2018
@Youngestdev
Copy link
Contributor

#19

@Youngestdev
Copy link
Contributor

I'll be reviewing this later today

@Youngestdev Youngestdev changed the title add reflective and meta blocks and classes for more efficient oop and develop modular to install module from github repo Reflective, Meta Blocks. Classes and Modular Improvement. Nov 19, 2018
@Youngestdev
Copy link
Contributor

So the only problem is it doesn't install the module on my Linux PC. I think that's a path issue. But, does this work on your machine?

@Thecarisma
Copy link
Contributor Author

Yea it works, it should work on your machine too. The module should be installed at
var/simple/s0.3.36/modules/github.com/ you will need to set SIMPLE_MODULE_PATH to be able to use it else you will have to provide github.com before the module to use it e.g

call "github.com/folder/file.sim"

@Youngestdev
Copy link
Contributor

It actually doesn't work fine on mine, did you modify the install file on your end ?

@Thecarisma
Copy link
Contributor Author

Check your modules folder on linux. maybe /var/lib/simple/s0.3.36/modules/ if successfull you should find a github.com folder there. If it present export the SIMPLE_MODULE_PATH on your system

SIMPLE_MODULE_PATH=/var/lib/simple/s0.3.36/modules/

else it in the debug module folder

@Youngestdev
Copy link
Contributor

Youngestdev commented Nov 22, 2018 via email

@Youngestdev
Copy link
Contributor

Youngestdev commented Nov 22, 2018

Check your modules folder on linux. maybe /var/lib/simple/s0.3.36/modules/ if successfull you should find a github.com folder there. If it present export the SIMPLE_MODULE_PATH on your system

SIMPLE_MODULE_PATH=/var/lib/simple/s0.3.36/modules/

else it in the debug module folder

the github folder is created but the NgNews folder isn't copied according to the install.sim instruction. Here's a screenshot.

screenshot from 2018-11-22 17-57-06

@Thecarisma
Copy link
Contributor Author

It has been installed successfully. The structure of the install.sim has change has only a list is expected in the file. The NgNews module will be available if you call it like

call "github.com/NgNews/NgNews.sim"

If you want to use the module directly as

call NgNews.NgNews

You will need to add the variable SIMPLE_MODULE_PATH to your system environment
SIMPLE_MODULE_PATH=/var/lib/simple/s0.3.36/modules/

You can check online on how to set environment variable on linux

@Youngestdev
Copy link
Contributor

Youngestdev commented Nov 22, 2018 via email

@Thecarisma
Copy link
Contributor Author

That mean it fails I ll check it

@Youngestdev
Copy link
Contributor

Youngestdev commented Nov 22, 2018 via email

@Youngestdev Youngestdev merged commit b6f6932 into theratioproject:master Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants