Comments (5)
Concept | In Bython v0.x | In Bython v1.x | In GCC |
---|---|---|---|
High-level language | bython | bython | C |
Compiler | Bython | Bython | GCC |
Low-level language | python | python | machine code |
Compiler source code is written in | python | bython | C |
Does compiler need compilation | No | Yes | Yes |
Compiler binary is in | python | python | machine code |
from bython.
There are a couple of real advantages of relying on regular python for parsing, these include:
- All modules for Python automatically work for bython as well (I'm doing a lot of scientific computing, so having the scipy-stack available is necessary). No inbetween translators is necessary.
- All language features of Python is available as soon as Python is updated. There's a reason that e.g. PyPy is still on 3.5 and not on 3.6, it's because they have to rewrite everyting, and that's a huge amount of work. You want fancy substitution of variables in strings as introduced in 3.6? You got it, no need to update Bython.
- Now, it's up to the users what parser they want to use. Want to combine Bython with Cython? No problem. What about PyPy? Not an issue. Simply compile with the
-c
flag and run with your interpreter of choice.
Bython was simply meant as a translator from curly braces to indentation, and I think it's best to keep it like that and use other software for the interpreting.
from bython.
Definitely. Yet there is a critical bug ( #14 ) that MUST be fixed. After that, x.py
SHOULD by semantically identical to bython -c (py2by x.py)
. Then we can initiate transpilation (and manual minor modification) from src/*.py
to src/*.by
.
from bython.
@mathialo Basically, bootstrapping
here (in my opinion) means:
(here bython is a language just like C, while Bython
is a bython-to-python compiler just like GCC)
Bython
transpiler itself (source code) should be written in bython, not python because bython is much better as a language;- Whenever a new version of
Bython
is to be released, we impose an older version ofBython
on the source code to obtain python binaries (yeah python IS human-readable, but not SO readable as bython 😏 ); - The binaries are published. Anyone who wants to use
Bython
can simply download the binaries, copy them to /usr/local/bin, runbython -c
, ...
from bython.
Ah, I see, I misunderstood. Of course, I think that should be a goal. I also agree on your table above that we keep Bython 0.x written in Python for now, but it should be written in Bython and compiled to Python as of version 1.0 (whenever that may be).
from bython.
Related Issues (20)
- Consider support curly brace dicts. HOT 1
- [Request] Help writing my bython syntax module for vim
- Transpiling? HOT 1
- Bython modifies braces within strings. HOT 4
- Bython for VSCode/PyCharm? HOT 1
- Add -r that works like python -c, for one-liners HOT 1
- Also get rid of forced newlines? HOT 5
- Dict fails HOT 4
- by2py Bug: Removes every colon HOT 3
- why HOT 14
- Any tmLanguage grammar available for bython?
- Bython doesn't work when curly braces are in their own line HOT 1
- Merge pull requests?
- Convert || to or and && to and HOT 15
- Consider parsing tokenized version of code HOT 1
- This is awesome: just require an editor syntax highlighting HOT 2
- Set initializers should work for bython HOT 1
- ILLEGAL!
- Allow contributions?
- Everything
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 bython.