Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Tochukwu Nkemdilim
@TNkemdilim

Also we shouldn't say the feature in Simple is rivalry. This is something that any language core team could merge if:

  1. It is inline with the compiler's goal and objectives
  2. Adopters we it as a valuable feature
  3. It profers a competitive advantage over seemingly competing language
  4. Isn't costly to implement
  5. We aren't trading performance for the feauture
  6. Etc.

Also if we were to compare it with yorlang. I don't suspect yorlang will be developed into becoming a fully mature laguage, based on examining the language owners point of view.

For me, what I'll also want to know is Simple's vision. As the only closely related statement I saw about this on the readme is,

"SIMPLE is a plain and innovative programming with multi-paradigm. It can be embedded in C/C++ projects. The language is portable to various OS including windows, macOS, any linux and unix distros and other OS. The language is small and fast."

For emphasis: a plain and innovative language .

Of which such a feature falls under.

Hence it's better to come up with a more concise vision statement, if that was not what was meant.

Adewale Azeez
@Thecarisma
Thank you @TNkemdilim for clearifying a lot of things. The dynamic keyword will be user requested at best, the actual reason i commented it out is that having it will make it difficult to d3bug a program if the code base has different syntax
And a question might come up as why it there in the first place, simple lang is made to allow beginner and advance developer to adopt it also to have no language barrier as all lang are english by native, so if such feature exist simple-lang can be used to teach people in the deepest part of the world
Adewale Azeez
@Thecarisma
Most of the languages are yes cross platform but what about applications written in it, I have seen a lot of application which are written in cross platform languages but it will always require some extra setup, mods and dep to get the app to work at all
Adewale Azeez
@Thecarisma
As for Vision is to make system and mobile programming great with one code base for all platforms with no platform drawback, a true write once run everywhere (TWORA)
Simplicity cannot be our vision, the name simple-lang already spelt that out loudly
Adewale Azeez
@Thecarisma
A vision and mission has not been decided upon, and the vision above is subjective to changes. I have notice most languages drifting completely away from system programming as a goal
simple-lang is not at all against the web, there even exists a private repo maintained by I and @Youngestdev which is the simple-lang core (vm, scanner and parser) under javascript which is will allow simple-lang to run seamlessly on the web to further support it TWORA vision
@/all I hope i made some senses
Busari Habib
@Bahat159
You made your point @TNkemdilim, I want simple to be a standalone language which won't have to depend on any other language to fully operate, if you don't know we have the expertise to develop and operating system from scratch with the language whenever it's needed, the assembly language to embed in it will be dealth with, as for the yorlang it won't go further than what It is, its just for those who want to play around with a new toy,
Simple is going to be great, we will develop it to its fullest ability with time, we will also embrace our beloved language and hack it ourselves before others do,but now let continue to develop the language, it shouldn't be too complex, with th current development muxh will be removed from ehat it aleady has, sorry to say but thays the truth, it will soon be hacked for any leakage and vulnerability issues, we have the expertise to work it as well. If it will grow to were I envisioned it will just like our beloved C language.
Adewale Azeez
@Thecarisma

What is everybody take on using the character to print value with extra line at the end

@"Hello World"

Does any body find this odd and has an alternative or wants it out, pending the next release which will be a Minor Major release.

Also any bad design decision in the language should be pointed out now, there ll be no major changes to syntax after this release
Busari Habib
@Bahat159
@ from sed or awk right?? This things will only make the language complex and hard to read, remember we have different programmers with this one would have iyd preference
Adewale Azeez
@Thecarisma
So you opting in for the removal, i second the removal,as the @ in future by frameworks, compilers and IDE for more semantic and compilation option and feature
the Console module is bouyant enough to handle any operations with the system standard streams
Adewale Azeez
@Thecarisma
And please @Bahat159 what is iyd preference
Abdulazeez Abdulazeez Adeshina
@Youngestdev
Well, the @ can stay. It'd be useful in large programs. The display keyword should be used in smaller programs
Busari Habib
@Bahat159
I mean different ways of writing their programs
Adewale Azeez
@Thecarisma

@Youngestdev for both large and small programs the Console is the better alternative, check my recent update the examples no more uses display and @ instead they uses the stdout, stderr and stdin from the Console module. This will ensure more security and more advance way of printing and reading from standard stream. the following are being alternated

stdout.print() #instead of display
stdout.println() #instead of `@`

The displaycan be spared for use for quick debug and short samples like the native hello world. the std streams in console are very efficient as they also resolve escape characters and the printf() which works like the native C printf is under development

Prince E. Darlington
@iamcoderisk
hello guys?
Azeez, you have done well, but i was thinking of having stdout imported for reusability sake; thereby enhancing the gradual usage of print() and println()
Tochukwu Nkemdilim
@TNkemdilim
I second @iamcoderisk
Prince E. Darlington
@iamcoderisk
i could send a PR on this if we agree
Adewale Azeez
@Thecarisma
@iamcoderisk imported in what way, stdout is in the Console module which will have to be imported before using stdout, stderr and stdin, please elaborate
Adewale Azeez
@Thecarisma

@/all I am adding compilation to object code to simple-lang to get ride of the module and make the entire source into one file of bytes codes like javac. The compiled source will be independent of the modules, such that when the compiled version is taken to another computer which does not have the modules it will execute. The advantages are below :

  1. Compile the source to one object file
  2. The compiled version is independent of the modules but still dependent of the dynamic modules
  3. It can be easily embeded in wrapper applications
  4. Very useful for creating polymorphic code
  5. It make the simple source secure as it not human readable
  6. Speed upexecution time as the scanner, parser, analysing are skipped, just read compiled file the run bytecode in VM

Disadvantage

  1. It not human readable and cannot be manually edited (likely an advantage)

to compile to object code after implementation

$ simple --simplify simple.sim

It generate a corresponding object file in the same folder

It not a compilation to machine code like C/C++, it compile to bytecode simple-lang vm can understand just like what java does by compiling to a bytecode file javac that can be executed on all the java distro.
Another advantage is that since simple-lang resolve called file during parsing time, it compilation is complete on a system it will give not import issues on whichever platfor it executed
Adewale Azeez
@Thecarisma
I currently adopt .complex as the file extension for the compile source as it opposite to simple and is not human readable
I need your inputs.
Adewale Azeez
@Thecarisma
A new PR requesting reviewers simple-lang/simple#59
appcypher
@appcypher
ping. What's up fellas?
Adewale Azeez
@Thecarisma
Heyo, alot of upgrade and update has been going on
You can check the major push here simple-lang/simple#59
@appcypher It ll be great to have you review the MAC OS build since it the only PR that has been stalled for months
appcypher
@appcypher
I'm assuming that PR is going to be stale by now which means more work.
What I should probably have done before is to fix the modules that can work and leave the more complicated modules like the GUI module for the future.
Tackling the behemoth as a whole was a bad idea.
Adewale Azeez
@Thecarisma
Yes the PR is stall, great idea you can fix other modules and leave out the GUI dynamic module for now
appcypher
@appcypher
Is simplelang grammar documented somewhere?
Adewale Azeez
@Thecarisma
The old grammar is currently outdated, I making a new grammar and testing it against ALTR 4 for compatibility with EBNF
appcypher
@appcypher
Sweet. I will like to see it when it is done
Adewale Azeez
@Thecarisma
@/all the new grammar is available here https://simple-lang.sourceforge.io/simple.g4.txt
Sonkeng Maldini
@sdmg15
What's the purpose of that ? :thinking_face:
Adewale Azeez
@Thecarisma
It used to understand how the source code (.sim) is treated at scanning and parsing level, i.e the structure of the language
Adewale Azeez
@Thecarisma

e.g the rule

...
assignment
    : Identifier assignmentOperator ( Identifier | Number | String | List | invokeBlock )
    | Identifier assignmentOperator classInit
    | Identifier assignmentOperator propertyStmt
    ;
...
Identifier
    : [a-zA-Z_] [a-zA-Z_0-9]*
    ;
...
assignmentOperator
    : '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '<<=' | '>>=' | '&=' | '|=' | '^='
    ;

The 'assignment' rule is how simple-lang parse assignment statement
e.g

 Identifier assignmentOperator ( Identifier | Number | String | List | invokeBlock )
=
Identifier = A valid identifier 
assignmentOperator = one of the assignment operator in the above rules
(Identifier = as abover)
(Number = a valid integer)
(String = A valid string)
(List = a list item)
(invokeBlock = calling a block)

With the above that means this is valid
Name = "Sokeng" because (Name is an Identifier, = is an assignmentOperator, "Sokeng" is a string) which satisfy the rule
Identifier assignmentOperator ( Identifier | Number | String | List | invokeBlock )

So this is invalid
Name = *+# because this satisfies the rule Identifier assignmentOperator arithmethicOperator* and it not part of the assignment rule
I ll prepare a blog for more elaboration on it, also it antlr grammar you can simply look up antl grammar on google for more info
appcypher
@appcypher
Nice!
Adewale Azeez
@Thecarisma
@/all the final commit to be packed for March one has been push please kindly test if you ve got the time
@appcypher please provide a mac distro with just the simple and simple.dylib for now, minus the modules
Adewale Azeez
@Thecarisma
Documentation for the simple-lang has begin, all modules should be thorougly commented, the current doc is at https://github.com/simple-lang/simple-docs
Adewale Azeez
@Thecarisma

change the constructor implementation in this Commit simple-lang/simple@aa11a35

Before the commit the constructor behave like this. The class constructor has to be the name of the class, the draw back which is the super class constructor will not be called if the class does not have it own constructor. e.g

c = new Class() #error constructor not found

class Super
   block Super()

class Child

After the commit, constructor are simply class method with the name init in this manner if a constructor is not implemented in a class, before throwing a constructor not found exception all the super class will be queried and the first init will be the constructor

c = new Class() #display hello

class Super
   block init()
     display "Hello"

class Child