This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
abort() { | |
echo "$*"; exit 1; | |
} | |
usage() { | |
echo $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script assumes you're using the directory layout described in the | |
# documentation at: https://voc.readthedocs.io/en/latest/tutorials/tutorial-0.html | |
set -e | |
#set -x | |
abort() { | |
echo "$*"; exit 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Magic: cafebabe | |
Version: 50.0 | |
Constant pool: (160 constants) | |
1: <Class python/buglong/SomeClass> | |
2: b'python/buglong/SomeClass' | |
3: <Class org/python/types/Object> | |
4: b'org/python/types/Object' | |
5: b'__VOC__' | |
6: b'Lorg/python/Object;' | |
7: b'class$init' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testhello/android.PythonActivity}: NameError: name '__all__' is not defined | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) | |
09-20 00:56:18.909 4981 4981 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6077) | |
09-20 00:56:18.909 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ egrep '^[a-zA-Z]+Error' log-compilation-full.txt | sed 's/object at 0x[^>]\+/object at 0x.../' | sort | uniq -c | sort -nr | |
260 AttributeError: 'Attribute' object has no attribute 'id' | |
82 NotImplementedError: Unknown context <_ast.Del object at 0x...> | |
76 NotImplementedError: Don't know how to resolve multiple comparators | |
40 AttributeError: 'NoneType' object has no attribute '_fields' | |
29 AttributeError: 'Class' object has no attribute 'add_class' | |
26 NotImplementedError: No handler for YieldFrom | |
26 NameError: <generator> | |
22 AttributeError: 'TRY' object has no attribute 'next_op' | |
20 TypeError: expected AST, got 'NoneType' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urwid | |
LOGO = ''' | |
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
MMM MMM | |
MMM MMMMMMMMMMMMMMMMMMMMMMMMMMM MMM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Draw a square in the screen, move it with arrow keys | |
""" | |
from __future__ import print_function, absolute_import, division | |
import urwid | |
BLOCK = u""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# For arrow-keys history and other cmdline goodies, install rlwrap and replace | |
# the first line by: #!/usr/bin/rlwrap bash | |
# This is a hack to simulate a REPL for VOC (http://pybee.org/voc) | |
# | |
# Behind the scenes, every time you try a new expression it appends it to a temporary | |
# file, recompiles it and re-runs it, omitting the previous output. | |
# | |
# This has the caveat that if some expression you enter raises an exception, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiling ouroboros/abc.py | |
Traceback (most recent call last): | |
File "/home/elias/src/voc-dev/voc/voc/python/ast.py", line 160, in visit | |
super().visit(node) | |
File "/home/elias/.pythonz/pythons/CPython-3.4.4/lib/python3.4/ast.py", line 245, in visit | |
return visitor(node) | |
File "/home/elias/src/voc-dev/voc/voc/python/ast.py", line 49, in dec | |
fn(self, node) | |
File "/home/elias/src/voc-dev/voc/voc/python/ast.py", line 341, in visit_AugAssign | |
self.context.load_name(node.target.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ asm.sh ../voc/dist/python-java-support.jar:. python.testgen.__init__ | |
java -cp /home/elias/apps/asm-5.2/lib/asm-5.2.jar:/home/elias/apps/asm-5.2/lib/asm-tree-5.2.jar:/home/elias/apps/asm-5.2/lib/asm-analysis-5.2.jar:/home/elias/apps/asm-5.2/lib/asm-util-5.2.jar:../voc/dist/python-java-support.jar:. org.objectweb.asm.util.CheckClassAdapter python.testgen.__init__ | |
org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size. | |
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Unknown Source) | |
at org.objectweb.asm.util.CheckClassAdapter.verify(Unknown Source) | |
at org.objectweb.asm.util.CheckClassAdapter.verify(Unknown Source) | |
at org.objectweb.asm.util.CheckClassAdapter.main(Unknown Source) | |
Caused by: java.lang.IndexOutOfBoundsException: Insufficient maximum stack size. | |
at org.objectweb.asm.tree.analysis.Frame.push(Unknown Source) | |
at org.objectweb.asm.tree.analysis.Frame.execute(Unknown Source) |