Comments (9)
@ryukinix @rafaelcn @leonardohn
from brain.
Which cases you think pre-processing can be really necessary & useful with brainfuck?
from brain.
@ryukinix using macros to have the possibility to "extend" the language/ make repetitive tasks easier
from brain.
Macros are really nice, but how you wish implement this? C-like syntax with #define
?
from brain.
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.
@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.
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.
@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.
Anyone is welcome to re-open this discussion.
from brain.
Related Issues (20)
- Makefile rules build and install are mixed and confused HOT 27
- Create .deb package and a ubuntu ppa channel for Brain HOT 4
- Change Docker Directory HOT 1
- Benchmark HOT 5
- Nested if statements HOT 2
- Small mistake on AST Expr.h method HOT 1
- BreakExpr for nested stmts HOT 3
- Fix compiler warnings HOT 1
- Missing the 'armhfp' HOT 9
- Travis file bug HOT 4
- Makefile and bash scripts problems HOT 3
- Uninitialized flag HOT 8
- Segmentation fault! HOT 20
- Create a wiki to make the README.md small and cleaner HOT 3
- Rename expression files (and classes) HOT 5
- Implement linker for binaries
- Make tape cell size custom
- Infinite loop compiler
- Implement mov instruction '&'
- guys, are you still alive? the last commit happened in 2020 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brain.