Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work on Book/Documentation #8

Open
17 of 23 tasks
Electrux opened this issue Apr 7, 2020 · 7 comments
Open
17 of 23 tasks

Work on Book/Documentation #8

Electrux opened this issue Apr 7, 2020 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@Electrux
Copy link
Collaborator

Electrux commented Apr 7, 2020

The following things are yet to be implemented in the Feral Book.

  • Implement more chapters
    • 7 - Loops
    • 8 - "Member" Functions
      • For
      • While
      • Foreach
    • 9 - "Member" Functions
    • 10 - Modules/Imports
    • 11 - Scopes and Variable Assignment vs Copy
    • 12 - Standard Library
      • 1 - IO
      • 2 - Lang
      • 3 - Strings
      • 4 - Vectors
      • 5 - Maps
      • 6 - FS
      • 7 - OS
      • 8 - Runtime
      • 9 - Ptr
      • 10 - Sys
      • 11 - Builder
  • Review existing chapters
  • Implement highlighting for Feral code blocks (Highlight.js)
@Electrux Electrux added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Apr 7, 2020
@Electrux Electrux self-assigned this Apr 7, 2020
@Electrux Electrux changed the title Work on Documentation Work on Book/Documentation Apr 7, 2020
@BenjaminNavarro
Copy link
Contributor

Is there a way to get a list of the available types and functions available is a module? If so I could give a hand for the documentation

@Electrux
Copy link
Collaborator Author

There isn't an explicit method for that, but, you can see the available functions in a module by taking a look at the src->add_nativefn, vm.add_typefn, and vm.gadd calls in the INIT_MODULE block of each module.
add_nativefn is simple functions (eg. io.println),
add_typefn is for type bound (member) functions,
gadd is for functions that are not attached to the source file and can be globally called just by the function name (e. import)

You can find the core module files (C++) in library/ directory. The standard library module files are in src/ directory of Feral-Std repository.

Also, some modules have some functions in their .fer files as well (eg. vector standard library module), which you can find in the include/ directory.

Hope that is legible. Please be sure to ask if there is any doubt or question.
And, thanks a lot ❤️

@BenjaminNavarro
Copy link
Contributor

Ok thanks, that was I was mostly looking at. Do you intend the std part of the book to be a "how to" or more an API doc? Because want I would really want right now is more an API doc but I don't know if it should belong to the book or not.

@Electrux
Copy link
Collaborator Author

Oh I have been planning to make it more in the style of API doc with, say, an example for the relevant functions. That way, it is concise, as well as can be easily understood by anyone who reads it.
If required, the API doc could be separated later on from the book.
What do you think?

@BenjaminNavarro
Copy link
Contributor

Ok great. I'll starting listing everything currently present when I get a couple of minutes

@Electrux
Copy link
Collaborator Author

Sure,
Thanks a lot! 😁

@BenjaminNavarro
Copy link
Contributor

BenjaminNavarro commented Apr 11, 2020

I started to work on it and the draft for the PR is here Feral-Lang/Book#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants