Skip to content

Commit ba14245

Browse files
committed
THIS PROJECT WAS MOVED TO QQUICK/TRANSCRYPT!
1 parent b3b44db commit ba14245

File tree

1,134 files changed

+1
-141016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,134 files changed

+1
-141016
lines changed

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.rst

Lines changed: 1 addition & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -1,178 +1 @@
1-
.. figure:: http://www.transcrypt.org/illustrations/ruler_banner2.png
2-
:alt: Logo
3-
:target: http://www.transcrypt.org
4-
5-
Python in the browser, precompiled for speed: http://www.transcrypt.org
6-
=======================================================================
7-
8-
- Precompiled into highly readable, efficient JavaScript, downloads kB's rather than MB's
9-
- Multiple inheritance, optional operator overloading, metaclasses, properties, class and function decorators, hierarchical modules etc.
10-
- Seamless integration with the universe of high-quality web-oriented JavaScript libraries, rather than the desktop-oriented Python ones
11-
- Pure Python 3.5 syntax, using Python's native parser
12-
- Debug directly from Python sourcecode, through integrated sourcemaps
13-
- Generates JavaScript for humans, resembling the Python source line by line, optionally annotated with source line numbers
14-
- Lightning fast JavaScript 5 and 6 code: call caching, for-loop optimization, in-line JavaScript etc.
15-
- Integrated static typechecking and minification at the tip of a command line switch
16-
- Also runs on top of node.js
17-
- Extensive documentation with many code examples
18-
- Apache 2.0 license
19-
- Pip-install and go!
20-
21-
Latest stable release: Athens
22-
=============================
23-
24-
To obtain the latest stable release including all updates, install it from PyPi as described in the `documentation
25-
<http://sterlicht.alwaysdata.net/transcrypt.org/docs/html/>`_.
26-
27-
Thanks to everyone who contributed!
28-
29-
Readability
30-
===========
31-
32-
As can be seen below, there's a simple parallel between the Python and the JavaScript code.
33-
In combination with the use of sourcemaps, this enables efficient debugging.
34-
Also, code can be tested from the command prompt using stubs.
35-
36-
.. figure:: http://www.transcrypt.org/illustrations/class_compare.png
37-
:alt: Screenshot of Python versus JavaScript code
38-
39-
**Classic OO with multiple inheritance in JavaScript**
40-
41-
Main differences with CPython
42-
=============================
43-
44-
- Web batteries: Seamless access to any existing JavaScript library has been favored over inclusion of many Python libraries in the distribution. There are some exceptions to this rule, e.g. math, cmath, random, itertools, time and turtle, and some more may follow, but in general the accent is on libraries that are relevant in the browser.
45-
- A few methods of builtin types are currently left out, especially when they (almost) duplicate functionality of other methods. Also method decorators (as opposed to function decorators and class decorators) are not supported, with the exception of @classmethod. This results from a deliberate choice to keep Transcrypt lean and fast.
46-
- No eval and exec of Python code. This is again part of the concept. Transcrypt code is compiled, optimized and minified in advance to warant fast page loads. In this respect its design goal is fundamentally different from tools that compile on the fly in the browser. Transcrypt is targeted towards building professional, extensive, real world web applications that load and run as fast as their JavaScript counterparts, but offers Pythonically clean, modular structure and maintainability.
47-
48-
Information for contributors
49-
============================
50-
51-
How to contribute
52-
-----------------
53-
54-
Transcrypt started out as a personal repo, owned by Jacques de Hooge.
55-
As the project caught on and the number of people contributing issues, ideas and code grew,
56-
the repo was transferred to the QQuick organisation, to be able to form a developer team on GitHub.
57-
58-
There was also a clear message in this: Transcrypt isn't owned by anyone in particular.
59-
It is the collective property of everyone using it or contributing to it.
60-
At the same time the need was felt to keep a very firm grip on code quality, especially of the core.
61-
62-
Everything under ../transcrypt/modules/org/transcrypt plus the file ../transcrypt/\_\_main\_\_.py is considered to be part of Transcrypt's core.
63-
A major design goal is to keep the core small and fast. This means that some CPython facilities were deliberately left out or simplified.
64-
Core development is still mainly done by Jacques, but with the input of many great ideas submitted as issues.
65-
If you want to improve something in the core, this is best initiated by first opening an issue for it.
66-
Opening a pull request directly can lead to disappointment, although all effort is made to take good ideas seriously.
67-
68-
All other parts of Transcrypt are referred to as periphery.
69-
While a good quality pull request for the periphery stands a reasonable chance of being accepted,
70-
still it is wise to start an issue beforehand, allowing coordination and preventing waste of effort.
71-
72-
A special place is taken by implementing standard libraries. While Transcrypt mostly relies on browser-centric JavaScript libraries,
73-
availability of a limited number of standard libraries will help acceptance by Python programmers. So you're most welcome to make a contribution here.
74-
The design goal again is: better 90% complete, fast, small, and reliable, than 100% complete, slow, bulky and buggy.
75-
If you contribute a library, please also contribute an autotest (see docs) and some documentation for it.
76-
The supported platforms are Windows and Linux (and, with that, OsX).
77-
78-
While being open and respectful to any good ideas, the final say as to what gets in and what doesn't, is with Jacques.
79-
So this is a dictatorial rather than a democratic project.
80-
Being a sailer himself, Jacques values the notion of having one captain on a ship.
81-
The captain doesn't own the ship, but he serves the passengers by consulting with the crew and plotting one stable course.
82-
83-
Another possibility to contribute libraries to Transcrypt is by submitting them as separate packages to PyPi.
84-
In that case be sure to add the keyword Transcrypt to allow people to find your package.
85-
Making your package pip-installable will also help it to catch on.
86-
Contributing packages via PyPi of course means total freedom for the developer.
87-
88-
Development build status
89-
------------------------
90-
91-
.. image:: https://travis-ci.org/QQuick/Transcrypt.svg?branch=master
92-
:target: https://travis-ci.org/QQuick/Transcrypt
93-
94-
The icon above shows the outcome of the continous integration test that is done on Linux after each commit.
95-
The test consists of running a set of testlets, systematically covering all facilities of Transcrypt. Each testlet performs an automated back to back test against CPython.
96-
97-
The full set of testlets is described in the documentation and comes with the distribution.
98-
Since the branching model has been deliberately kept simple, continuous integration may be transiently broken.
99-
In that case you can use the latest passing version, that you'll find by clicking on the icon above and then on 'Build History'.
100-
101-
Each release, on the other hand, is preceded by at least the following tests:
102-
103-
- The automated back to back test described above, not only on Linux but also on Windows and, in case of relevant issues, on OsX.
104-
- Automated compilation of the manual tests, human exercising of the resulting applications and a visual check of the results.
105-
- Automated compilation of the demo's, human exercising of the resulting applications and a visual check of the results.
106-
- A documentation build, followed by a visual sample check.
107-
108-
What's new in the latest commits
109-
--------------------------------
110-
111-
- Emulation of sync console I/O for educational purposes, text only
112-
- Autotest output now in tabular form for easy comparison, incl. source line nrs
113-
- Fix for issue #178: List Comprehensions / Operator Precedence Bug
114-
- Div. enhancements and fixes for CI tests
115-
- Enhancement for issue #139: 'yield from' now supported. EXPERIMENTAL
116-
- Enhancement for issue #89 and #149: __getattr__ and __setattr__ are now supported, requiring the -e 6 switch. Testlet 'proxies' added.
117-
- New aliases added to prevent name clashes. The orignal name can always be reached by prepending js_. So e.g. if you need 'clear' in JS, use 'js_clear' in Python. A complete list of aliases is in the docs. Any alias can be undefined to maintain backward compatibility, e.g __pragma__ ('noalias', 'clear').
118-
- Enhancement for issue #169: Add support for float('inf') and float('-inf')
119-
- Python 3.6 numbers with dashes added
120-
- Python 3.6 fstrings added
121-
- Travis CI test for the exceptions testlet repaired
122-
- Initial version of chapter 'Differences with CPython' added to docs
123-
- Travis CI activated
124-
- Procedural improvement for issue #160: Sphinx _build dir should be Git ignored (since it obscures code diffs)
125-
- Enhancement for issue #143: 'isinstance' deserves more compat
126-
- Enhancement for issue #149: Transpile docstrings on demand
127-
- Fix for issue #151: Problem with __include__ and special character inside js
128-
- Enhancement for issue #150: The 'in' operator (was O (n), is now O (1))
129-
- Enhancement for issue #147: str function should return string primitive, not 'new String ()'
130-
- Fix for issue #145: List sorting (fails due to erroneous compare operator)
131-
- Fix for issue #144: List comprehensions and opov (don't go well together, missing 'this' pointer)
132-
- Fix for issue #138: Parse error using 'yield' in expression, 'send' missing (see testlet iterators_and_generators) and the discussion at the issue.
133-
- Fix for issue #140: commandline --help / -h switch broken
134-
- Enhancement for issue #128: metaclasses (only __new__ overridable) + test case / doc example
135-
- Enhancement for issue #136: dict.get not implemented
136-
- Fix for issue #134: %= operator translated incorrectly
137-
- Enhancement for issue #130: Add pragma to optionally handle % the JS way
138-
- Fix for issue #127: Can't use key 'keys' in a dict
139-
- Enhancement issue #113: Use for ... of pervasively for js6 + autotest
140-
- Fix for issue #125: strings not iterable (js6 only) + autotest
141-
- Release 12
142-
- Local classes now arbitrarily nestable, issue #120
143-
- Operator % has now Python rather than JS behaviour, issue #123 + autotest
144-
- Slicing bug fixed (stop beyond list end), issue #122 + autotest
145-
146-
.. figure:: http://www.transcrypt.org/illustrations/plotly_demo.png
147-
:alt: Plotly demo
148-
149-
**Plotly demo**
150-
151-
- Plotly.js demo added: lim (Numscrypt -> Maturity) Transcrypt + Numscrypt + Plotly = Live Science Demos in the Browser with native JS performance, all Plotly.js plot types are supported
152-
- __pragma__ ('jskeys'/'nojskeys') added make Plotly.js code match Plotly.js docs for convenience, locally voiding the need for quotes around dir keys
153-
- 'Star us on GitHub' command line option added
154-
- Fix for 'unexpected indent' when rebuilding
155-
- Fix for accidentally deleting current path from sys.path in some installations
156-
- Fix for 'cannot import __symbols__' bug when using -r with autotest.
157-
- Exception hierarchy improved, all Transcrypt runtime exceptions now derive from Exception
158-
- Non-standard attribute 'stack' added to Exception to obtain stack trace in de-facto JavaScript compatible way
159-
- Attempt to iterate over non-iterable now results in exception (only when using -e 6 switch) (see issue #112))
160-
- Iterating over TypedArrays and other non-list iterables fixed (only needed for when using -e 6 switch) (see issue #112)
161-
- Release 9
162-
- Truthyness of instances of custom classes fixed (see issue #110)
163-
- Source map generation bug fixed (see issue #104)
164-
- Optional static type validation using mypy (experimental)
165-
- Small doc improvements
166-
- Some more fixes for Numscrypt
167-
- Fix to enable Numscrypt development
168-
- \*args now also can be used in calling pure javascript methods (see issue #102)
169-
- Pragma's else and elif fixed for use in .py rather than .js files
170-
171-
Other packages you might like
172-
=============================
173-
174-
- Multi-module Python source code obfuscator: https://pypi.python.org/pypi/Opy
175-
- PLC simulator with Arduino code generation: https://pypi.python.org/pypi/SimPyLC
176-
- A lightweight Python course taking beginners seriously (under construction): https://pypi.python.org/pypi/LightOn
177-
- Event driven evaluation nodes: https://pypi.python.org/pypi/Eden
178-
- Numscrypt (under construction, very early stage), experimental port of a microscopic part of NumPy to Transcrypt, using JavaScript typed arrays: https://pypi.python.org/pypi/Numscrypt
1+
This project was moved!

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)