Giter Club home page Giter Club logo

Comments (9)

luizperes avatar luizperes commented on September 4, 2024

@ryukinix @rafaelcn @leonardohn

from brain.

ryukinix avatar ryukinix commented on September 4, 2024

Which cases you think pre-processing can be really necessary & useful with brainfuck?

from brain.

luizperes avatar luizperes commented on September 4, 2024

@ryukinix using macros to have the possibility to "extend" the language/ make repetitive tasks easier

from brain.

ryukinix avatar ryukinix commented on September 4, 2024

Macros are really nice, but how you wish implement this? C-like syntax with #define ?

from brain.

luizperes avatar luizperes commented on September 4, 2024

Yeah, C-style(ish) macro...
I imagine that we can do that by using pipes.
Example:

| +++++ |

Each pipe would have a number related to it... Inside the code we would call the macros like:

+ make number 1 because is the first macro
^ call macro

In this case we would need two more operators | and ^, which is bad. Do you have pros and cons?

from brain.

luizperes avatar luizperes commented on September 4, 2024

@ryukinix I was thinking of changing a bit the code above... What if it was like that?

| number_five +++++ |
| arithmetic.brain |

In the first case, I'm creating a macro called number_five, in the second case, I'm including a file. What do you think? In this case we only need the operator pipe |

from brain.

rafaelcn avatar rafaelcn commented on September 4, 2024

Discussing about this feature with @luizperes in a call was revealing, while this is a nice idea it brings a bit of complexity to Brain (As it was not complex enough [literal joke here]), adding operators expands the range of errors that we could possibly get. That's one of the drawbacks, we just have to study carefully when and how to implement this great feature!

from brain.

luizperes avatar luizperes commented on September 4, 2024

@ryukinix @rafaelcn Thinking and re-thinking, I realized that what @rafaelcn made so much sense. We should not add more complexity (more than planned) on Brain. As we want to use this language to solve AI problems as well, I do not think that we should add this new layer of complexity. Well, pointed @rafaelcn .

from brain.

luizperes avatar luizperes commented on September 4, 2024

Anyone is welcome to re-open this discussion.

from brain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.